Main Content

Check line wrap length

Specify whether to check line lengths in the generated HDL code

Since R2020b

Model Configuration Pane: Global Settings / Coding standards

Description

Specify whether to check line lengths in the generated HDL code. This check corresponds to CGSL-3.A.D.5 of the Industry standard guidelines.

Dependencies

To clear the Check line length check box, set the HDL coding standard parameter to Industry.

Settings

on (default) | off

Default: On

on

Check line length.

Maximum

Maximum number of characters in a line, specified as a positive integer. The default is 110.

off

Do not check line length.

Tips

To set this property:

  1. Create an HDL coding standard customization object.

    cso = hdlcoder.CodingStandard('Industry');

  2. Set the LineLength property of the HDL coding standard customization object.

    For example, to enable the check line length with a maximum character length of 80, enter:

    cso.HDLKeywordsLineLength.enable = true;
    cso.HDLKeywordsLineLength.length = 80;

  3. 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);

Recommended Settings

No recommended settings.

Programmatic Use

Parameter: LineLength property of hdlcoder.CodingStandard object
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Version History

Introduced in R2020b