Choose Coding Standard and Report Option Parameters
This section contains parameters in theCoding standardstab of theHDL Code Generation>全局设置pane of the Configuration Parameters dialog box. Use these parameters to generate HDL code that adheres to the guidelines recommended by Industry coding standards.
HDL coding standard
Specify whether to enable the Industry coding standard guidelines that the generated HDL code must conform to.
Settings
Default:None
-
None
-
Generate generic synthesizable HDL code. The generated code need not conform with the Industry standard guidelines.
-
Industry
-
Generate synthesizable HDL code that follows the industry standard rules supported by HDL Coder™. When you specify the
Industry
setting, the code generator enables theReport optionscheck box and rules that you can customize in theCoding Standardstab.When you specify the
Industry
setting and generate code, HDL Coder generates a standards compliance report. The report displays errors, warnings, messages, and lists the corresponding rules. To filter the report such that the passing rules do not appear, clear theReport optionscheck box.
Command-Line Information
Property:HDLCodingStandard |
Type:character vector |
Value:'None' |'Industry' |
Default:'None' |
To set this property, use the functionshdlset_param
ormakehdl
. To view the property value, use the functionhdlget_param
.
For example, you can enable the Industry standard guidelines compliance for thesymmetric_fir
subsystem inside thesfir_fixed
model using either of these methods.
Use
hdlset_param
to set the parameter on the model. Then generate HDL code usingmakehdl
.hdlset_param('sfir_fixed','HDLCodingStandard','Industry') makehdl('sfir_fixed/symmetric_fir')
Pass the property as an argument to the
makehdl
function.makehdl('sfir_fixed/symmetric_fir','HDLCodingStandard','Industry')
Dependency
When you set theHDLCodingStandardtoIndustry
, configuration parameters such asPackagePostfix
,MinimizeClockEnables
,MinimizeGlobalResets
, andInstancePrefix
are ignored.
See Also
Show passing rules in coding standard report
Specify whether to filter the coding standard report such that the passing rules do not appear. By default, the report displays pass, errors, warnings, messages, and lists the corresponding rules.
Settings
Default:Off
- On
-
Show all rules in the report including the messages and passing rules.
- Off
-
Shows rules with errors or warnings. The code generator filters out messages and passing rules from the report.
Dependency
To clear theReport optionscheck box, set theHDL coding standardparameter toIndustry
.
Command-Line Information
To set this property:
Create an HDL coding standard customization object.
cso = hdlcoder.CodingStandard('Industry');
Set the
ShowPassingRules
property of the HDL coding standard customization object.For example, to omit passing rules from the report, enter:
cso.ShowPassingRules.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);