RTL Customization Parameters for Constants and MATLAB Function Blocks
This page describes parameters that reside in the HDL Code Generation > Global Settings > Coding Style tab of the Configuration Parameters dialog box.
Inline MATLAB Function block code
Inline HDL code for MATLAB Function blocks.
Settings
Default: Off
On
Inline HDL code for MATLAB Function blocks to avoid instantiation of code for custom blocks.
Off
Instantiate HDL code for MATLAB Function blocks and do not inline.
Command-Line Information
Property:
InlineMATLABBlockCode |
Type: character vector |
Value:
'on' | 'off' |
Default:
'off' |
To set this property, use the functions hdlset_param
or makehdl
. To view the property value, use
the function hdlget_param
.
For example, to enable inlining of the code:
mdl = 'my_custom_block_model'; hdlset_param(mdl,'InlineMATLABBlockCode','on');
For example, to enable instantiation of HDL code:
mdl = 'my_custom_block_model'; hdlset_param(mdl,'InlineMATLABBlockCode','off');
Represent constant values by aggregates
Specify whether constants in VHDL® code are represented by aggregates, including constants that are less than 32 bits. This option does not affect generated HDL code for MATLAB Function blocks.
Settings
Default: Off
On
HDL Coder™ represents constants as aggregates. The following VHDL constant declarations show a scalar less than 32 bits represented as an aggregate:
GainFactor_gainparam <= (14 => '1', OTHERS => '0');
Off
The coder represents constants less than 32 bits as scalars and constants greater than or equal to 32 bits as aggregates. The following VHDL code was generated by default for a value less than 32 bits:
GainFactor_gainparam <= to_signed(16384, 16);
Dependency
This option is enabled when the target language (specified by the Language option) is VHDL.
Command-Line Information
Property:
UseAggregatesForConst |
Type: character vector |
Value:
'on' | 'off' |
Default:
'off' |
To set this property, use the functions hdlset_param
or makehdl
. To view the property value, use
the function hdlget_param
.