Main Content

Check for Data Type Conversion blocks with incompatible settings

Check ID: com.mathworks.HDL.ModelChecker.runNFPDTCChecks

Check conversion mode of Data Type Conversion blocks.


This check displays a warning when Data Type Conversion blocks in your model convert from a floating-point data type to a fixed-point data type or vice-versa, and has Input and output to have equal parameter set to Stored Integer (SI).

HDL Coder™ does not support Data Type Conversion blocks that use the Stored Integer (SI) conversion mode and convert between floating point and fixed point data types. During this conversion, the Stored Integer (SI) mode does not preserve the underlying stored integer bits of the floating point input signal.

Results and Recommended Actions

To fix this warning, click Modify Settings and the code generator replaces Data Type Conversion blocks in Stored Integer (SI) mode with Float Typecast blocks.

Using the Float Typecast block, you can access the stored integer bits of a floating point input signal when converting between floating point and fixed point data types. The block works similar to the typecast function.

See Also

Getting Started with HDL Coder Native Floating-Point Support