Basic Coding Practices Parameters
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.
Check for duplicate names
Specify whether to check for duplicate names in the design. This check corresponds to CGSL-1.A.A.5 of the Industry standard guidelines.
Settings
Default: On
On
Check for duplicate names.
Off
Do not check for duplicate names.
Dependency
To clear the Check for duplicate names check box, set the
HDL coding standard parameter to
Industry
.
Command-Line Information
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);
See Also
Check for HDL keywords in design names
Specify whether to check for HDL keywords in design names. This check corresponds to CGSL-1.A.A.3 of the Industry standard guidelines.
Settings
Default: On
On
Check for HDL keywords in design names.
Off
Do not check for HDL keywords in design names.
Dependency
To clear the Check for HDL keywords in design names check
box, set the HDL coding standard parameter to
Industry
.
Command-Line Information
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);
See Also
Check module, instance, entity name length
Specify whether to check module, instance, and entity name length. This check corresponds to CGSL-1.A.B.1 of the Industry standard guidelines.
Settings
Default: On
On
Check module, instance, and entity 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 32.
Off
Do not check module, instance, and entity name length.
Dependency
To clear the Check module, instance, entity name length
check box, set the HDL coding standard parameter to
Industry
.
Command-Line Information
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);
See Also
Check signal, port, and parameter name length
Specify whether to check signal, port, and parameter name length. This check corresponds to CGSL-1.A.C.3 of the Industry standard guidelines.
Settings
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.
Dependency
To clear the Check signal, port, and parameter name
length check box, set the HDL coding
standard parameter to Industry
.
Command-Line Information
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);