Choose Coding Standard and Report Option Parameters
This section contains parameters in the Coding standards tab of the HDL Code Generation > Global Settings 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 the Report options check box and rules that you can customize in the Coding Standards tab.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 the Report options check box.
Command-Line Information
Property:
HDLCodingStandard |
Type: character vector |
Value:
'None' |
'Industry' |
Default:
'None' |
To set this property, use the functions hdlset_param
or makehdl
. To view the property value, use
the function hdlget_param
.
For example, you can enable the Industry standard guidelines compliance for
the symmetric_fir
subsystem inside the
sfir_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 the HDLCodingStandard to
Industry
, configuration parameters such as
PackagePostfix
,
MinimizeClockEnables
,
MinimizeGlobalResets
, and
InstancePrefix
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 the Report options 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
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);