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.
Specify whether to minimize use of variables. This check corresponds to CGSL-2.G of the Industry standard guidelines.
Default: Off
Minimize use of variables.
Do not minimize use of variables.
To select the Minimize use of variables check box, set
the HDL coding standard parameter to
Industry
.
To set this property:
Create an HDL coding standard customization object.
cso = hdlcoder.CodingStandard('Industry');
Set the MinimizeVariableUsage
property of the
HDL coding standard customization object.
For example, to minimize use of variables, enter:
cso.MinimizeVariableUsage.enable = true;
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);
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.
Default: On
Check for initial statements that set RAM initial values
Do not check for initial statements that set RAM initial values.
To clear the Check for initial statements that set RAM initial
values check box, set the HDL coding
standard parameter to Industry
.
To set this property:
Create an HDL coding standard customization object.
cso = hdlcoder.CodingStandard('Industry');
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;
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);
Specify whether to check multiplier bit width. This check corresponds to CGSL-2.J.F.5 of the Industry standard guidelines.
Default: On
Check multiplier width.
Maximum multiplier bit width, specified as a positive integer. The default is 16.
Do not check multiplier width.
To clear the Check multiplier width check box, set the
HDL coding standard parameter to
Industry
.
To set this property:
Create an HDL coding standard customization object.
cso = hdlcoder.CodingStandard('Industry');
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;
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);