Main Content

Check signal, port, and parameter name length

Specify whether to check signal, port, and parameter name length

Since R2020b

Model Configuration Pane: Global Settings / Coding standards

Description

Specify whether to check signal, port, and parameter name length. This check corresponds to CGSL-1.A.C.3 of the Industry standard guidelines.

Dependencies

To clear the Check signal, port, and parameter name length check box, set the HDL coding standard parameter to Industry.

Settings

on (default) | off

Default: On

on

Check signal, port, and parameter name length.

Minimum

Minimum name length, specified as a positive integer. The default is 2.

Maximum

Maximum name length, specified as a positive integer. The default is 40.

off

Do not check signal, port, and parameter name length.

Tips

To set this property:

  1. Create an HDL coding standard customization object.

    cso = hdlcoder.CodingStandard('Industry');

  2. Set the SignalPortParamNameLength property of the HDL coding standard customization object.

    For example, to enable the check for signal, port, and parameter name length, with 5 as the minimum length and 30 as the maximum length, enter:

    cso.SignalPortParamNameLength.enable = true;
    cso.SignalPortParamNameLength.length = [5 30];

  3. Set the HDLCodingStandardCustomizations property to the HDL coding standard customization object, specify the coding standard, and generate code.

    For example, if your DUT is sfir_fixed/symmetric_fir, enter:

    makehdl('sfir_fixed/symmetric_fir', 'HDLCodingStandard','Industry', ...
            'HDLCodingStandardCustomizations',cso);

Recommended Settings

No recommended settings.

Programmatic Use

Parameter: SignalPortParamNameLength property of hdlcoder.CodingStandard object
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Version History

Introduced in R2020b