Main Content

Check for conditional statements in processes

Specify whether to check for length of conditional statements

Since R2020b

Model Configuration Pane: Global Settings / Coding standards

Description

Specify whether to check for length of conditional statements that are described separately within a process. This check corresponds to CGSL-2.F.B.1 of the Industry standard guidelines.

Dependencies

To clear the Check for conditional statements in processes check box, set the HDL coding standard parameter to Industry.

Settings

on (default) | off

Default: On

on

Check for length of conditional statements in a process. The default length is 1.

off

Do not check for length of conditional statements in a process.

Tips

To set this property:

  1. Create an HDL coding standard customization object.

    cso = hdlcoder.CodingStandard('Industry');

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

    For example, to check for four conditional statements in a process, enter:

    cso.ConditionalRegionCheck.enable = true;
    cso.ConditionalRegionCheck.length = 4;

  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: ConditionalRegionCheck property of hdlcoder.CodingStandard object
Type: character vector
Values: 'on' | 'off'
Default: 'on'

Version History

Introduced in R2020b