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.
Specify whether to enable the Industry coding standard guidelines that the generated HDL code must conform to.
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.
Property:
HDLCodingStandard |
Type: character vector |
Value:
'None' |
'Industry' |
Default:
'None' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use 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 using
makehdl
.
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')
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.
Default: Off
Show only rules with errors or warnings. The code generator filters out messages and passing rules from the report.
Show all rules in the report including the messages and passing rules.
To clear the Report options 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 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);