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 for conditional and if-else statements that are specified by the Industry standard guidelines.
Specify whether to check for length of conditional statements that are described separately within a process. This check corresponds to CGSL-2.F.B.1 of the Industry standard guidelines.
Default: On
Check for length of conditional statements in a process. The default length is 1.
Do not check for length of conditional statements in a process.
To clear the Check for conditional statements in
processes 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 ConditionalRegionCheck
property of
the HDL coding standard customization object.
For example, to check for four conditional statements in a process, enter:
cso.ConditionalRegionCheck.enable = true; cso.ConditionalRegionCheck.length = 4;
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 if-else statement chain length. This check corresponds to CGSL-2.G.C.1c of the Industry standard guidelines.
Default: On
Check if-else statement chain length.
Maximum if-else statement chain length, specified as a positive integer. The default is 7.
Do not check if-else statement chain length.
To clear the Check if-else statement chain length 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 IfElseChain
property of the HDL
coding standard customization object.
For example, to check for if-else statement chains with length greater than 5, enter:
cso.IfElseChain.enable = true; cso.IfElseChain.length = 5;
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 if-else statement nesting depth. This check corresponds to CGSL-2.G.C.1a of the Industry standard guidelines.
Default: On
Check if-else statement nesting depth.
Maximum if-else statement nesting depth, specified as a positive integer. The default is 3.
Do not check if-else statement nesting depth.
To clear the Check if-else statement nesting depth 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 IfElseNesting
property of the HDL
coding standard customization object.
For example, to enable the check for if-else statement nesting depth with a maximum depth of 5, enter:
cso.IfElseNesting.enable = true; cso.IfElseNesting.depth = 5;
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);