Main Content

Indexing for scalarized port naming

Starting index for the names of scalarized vector ports

Since R2022a

Model Configuration Pane: Global Settings / Coding style

Description

Specify the starting index for the names of scalarized vector ports. For an example, see Scalarization of Vector Ports in Generated VHDL Code.

Dependencies

This option is applied when the model configuration parameter Scalarize ports is set to on or DUT Level. For more information, see Scalarize ports.

Settings

Zero-based (default) | One-based

Default: Zero-based

Zero-based

The starting index for the names of scalarized vector ports is 0. For example, if you have an input u that is a 1x10 vector of type uint16 that has been scalarized, the generated HDL code snippet might look like this code:

ENTITY Subsystem IS
  PORT( u_0        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_1        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_2        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_3        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_4        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_5        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_6        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_7        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_8        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_9        :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        );
END Subsystem;

One-based

The starting index for the names of scalarized vector ports is 1. For example, if you have an input u that is a 1x10 vector of type uint16 that has been scalarized, the generated HDL code snippet might look like this code:

ENTITY Subsystem IS
  PORT( u_1      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_2      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_3      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_4      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_5      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_6      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_7      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_8      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_9      :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        u_10     :   IN    std_logic_vector(15 DOWNTO 0);  -- uint16
        );
END Subsystem;

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: ScalarizedPortIndexing
Type: character vector
Value: 'Zero-based' | 'One-based'
Default: 'Zero-based'

Version History

Introduced in R2022a