Main Content

Represent constant values by aggregates

Constants represented by aggregates

Model Configuration Pane: Global Settings / Coding style

Description

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.

Dependencies

This option is enabled when the target language (specified by the Language option) is VHDL.

Settings

off (default) | on

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);

Tips

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

Recommended Settings

No recommended settings.

Programmatic Use

Parameter: UseAggregatesForConst
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2012a