Main Content

Other RTL Description Rule Parameters

These parameters belong to the RTL description rules section of the Coding standards tab of the HDL Code Generation > Global Settings pane of the Configuration Parameters dialog box. Use these parameters to customize RTL description rules of the Industry standard guidelines. These rules pertain to checking the multiplier width, whether to minimize use of variables, and initial statements to provide initial value for RAMs.

Minimize use of variables

Specify whether to minimize use of variables. This check corresponds to CGSL-2.G of the Industry standard guidelines.

Settings

Default: Off

On

Minimize use of variables.

Off

Do not minimize use of variables.

Dependency

To select the Minimize use of variables check box, set the HDL coding standard parameter to Industry.

Command-Line Information

To set this property:

  1. Create an HDL coding standard customization object.

    cso = hdlcoder.CodingStandard('Industry');

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

    For example, to minimize use of variables, enter:

    cso.MinimizeVariableUsage.enable = true;

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

See Also

Check for initial statements that set RAM initial values

Specify whether to check for initial statements that set RAM initial values. This check corresponds to CGSL-2.C.D.1 of the Industry standard guidelines.

Settings

Default: On

On

Check for initial statements that set RAM initial values

Off

Do not check for initial statements that set RAM initial values.

Dependency

To clear the Check for initial statements that set RAM initial values check box, set the HDL coding standard parameter to Industry.

Command-Line Information

To set this property:

  1. Create an HDL coding standard customization object.

    cso = hdlcoder.CodingStandard('Industry');

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

    For example, to disable the check for initial statements that set RAM initial values, enter:

    cso.InitialStatements.enable = false;

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

See Also

Check multiplier width

Specify whether to check multiplier bit width. This check corresponds to CGSL-2.J.F.5 of the Industry standard guidelines.

Settings

Default: On

On

Check multiplier width.

Maximum

Maximum multiplier bit width, specified as a positive integer. The default is 16.

Off

Do not check multiplier width.

Dependency

To clear the Check multiplier width check box, set the HDL coding standard parameter to Industry.

Command-Line Information

To set this property:

  1. Create an HDL coding standard customization object.

    cso = hdlcoder.CodingStandard('Industry');

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

    For example, to enable the check for multiplier width with a maximum bit width of 32, enter:

    cso.MultiplierBitWidth.enable = true;
    cso.MultiplierBitWidth.width = 32;

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

See Also