These parameters belong to the Basic coding 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 basic coding rules that are specified by the Industry standard guidelines. These rules correspond to naming conventions that your design uses.
Specify whether to check for duplicate names in the design. This check corresponds to CGSL-1.A.A.5 of the Industry standard guidelines.
Default: On
Check for duplicate names.
Do not check for duplicate names.
To clear the Check for duplicate names 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 DetectDuplicateNamesCheck
property of
the HDL coding standard customization object.
For example, to disable the check for duplicate names, enter:
cso.DetectDuplicateNamesCheck.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 for HDL keywords in design names. This check corresponds to CGSL-1.A.A.3 of the Industry standard guidelines.
Default: On
Check for HDL keywords in design names.
Do not check for HDL keywords in design names.
To clear the Check for HDL keywords in design names 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 HDLKeywords
property of the HDL
coding standard customization object.
For example, to disable the check for HDL keywords in design names, enter:
cso.HDLKeywords.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 module, instance, and entity name length. This check corresponds to CGSL-1.A.C.3 of the Industry standard guidelines.
Default: On
Check module, instance, and entity name length.
Minimum name length, specified as a positive integer. The default is 2.
Maximum name length, specified as a positive integer. The default is 32.
Do not check module, instance, and entity name length.
To clear the Check module, instance, entity name 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 ModuleInstanceEntityNameLength
property of the HDL coding standard customization object.
For example, to enable the check for module, instance, and entity name length, with 5 as the minimum length and 30 as the maximum length, enter:
cso.ModuleInstanceEntityNameLength.enable = true; cso.ModuleInstanceEntityNameLength.length = [5 30];
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 signal, port, and parameter name length. This check corresponds to CGSL-1.A.B.1 of the Industry standard guidelines.
Default: On
Check signal, port, and parameter name length.
Minimum name length, specified as a positive integer. The default is 2.
Maximum name length, specified as a positive integer. The default is 40.
Do not check signal, port, and parameter name length.
To clear the Check signal, port, and parameter name
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 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];
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);