Main Content

Check for presence of reals in generated HDL code

Specify whether to check for reals in the generated HDL code

Model Configuration Pane: Global Settings / Advanced


Specify whether to check for reals in the generated HDL code.


Error | None | Warning

Default: Error


Do not check for reals in the generated HDL code.


Checks and warns of presence of real data types in the generated HDL code. Real data types in the generated HDL code are not synthesizable on target FPGA devices.


Checks and generates an error if the generated HDL code uses real data types. If you are generating code for simulation purposes and not for synthesizing your design, you can change this setting to Warning or None. To generate synthesizable HDL code, select the model configuration parameter Use Floating Point.


To set this property, use the functions hdlset_param or makehdl. To view the property value, use the function hdlget_param.

For example, you can specify this property while generating HDL code for the symmetric_fir subsystem inside the sfir_fixed model using either of these methods.

  • Use hdlset_param to set the parameter on the model. Then generate HDL code using makehdl.


  • Pass the property as an argument to the makehdl function.


Recommended Settings

No recommended settings.

Programmatic Use

Parameter: TreatRealsInGeneratedCodeAs
Type: character vector
Value: 'None' | 'Warning' | 'Error'
Default: 'Error'

Version History

Introduced in R2017b