| Contents | Index |
| On this page… |
|---|
The maximum Simulink fixed-point word size is 128 bits. HDL does not have such a limit. This can lead to cases in which the generated HDL code is not bit-true to the generated model.
When the result of a computation in the generated HDL code has a word size greater than 128 bits:
The coder issues a warning.
Computations in the generated model (and the generated HDL test bench) are limited to a result word size of 128 bits.
This word size limitation does not apply to the generated HDL code, so results returned from the HDL code may not match the HDL test bench or the generated model.
When the binary point in double-precision computations is very large or very small, the scaling can become inf or 0. The limits of precision can be expressed as follows:
log2(realmin) ==> -1022
log2(realmax) ==> 1024
Where these limits are exceeded, the binary point is saturated and a warning is issued. If the generated HDL code has binary point scaling greater than 2^1024, the generated model has a maximum scaling of 2^1024.
Similarly if the generated HDL code has binary point scaling smaller than 2^-1022, then the generated model has scaling of 2^-1022.
The coder disables the following model parameters during code generation, and restores them after code generation completes:
Block Reduction (BlockReductionOpt)
Conditional input branch execution (ConditionallyExecuteInputs)
These properties are always disabled in the generated model, even if they are enabled in the source model.
![]() | Defaults and Options for Generated Models | Code Generation Reports, HDL Compatibility Checker, Block Support Library, and Code Annotation | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |