Configuring Multiline Indent Rules

There are rules which will check indent of multiline expressions and conditions.

There are several options to these rules:

Option

Values

Default

Description

align_left

yes, no

no

  • yes = Lines will be aligned left

  • no = Lines will be aligned to assignment operator

align_paren

yes, no

yes

  • yes = Align to unbalanced open parenthesis

  • no = Each unbalanced open parenthesis will add an indent.

This is an example of how to configure the option.

rule :
  concurrent_003:
     align_left : "no"
     align_paren : "yes"

All examples use the following code snippet:

wr_en <= resize(unsigned(I_FOO) +
            unsigned(I_BAR), q_foo'length);

wr_en <=
    resize(unsigned(I_FOO) +
                    unsigned(I_BAR), q_foo'length);

Example: align_left set to yes and align_paren set to no

wr_en <= resize(unsigned(I_FOO) +
    unsigned(I_BAR), q_foo'length);

wr_en <=
  resize(unsigned(I_FOO) +
    unsigned(I_BAR), q_foo'length);

Example: align_left set to no and align_paren set to no

wr_en <= resize(unsigned(I_FOO) +
           unsigned(I_BAR), q_foo'length);

wr_en <=
         resize(unsigned(I_FOO) +
           unsigned(I_BAR), q_foo'length);

Example: align_left set to yes and align_paren set to yes

wr_en <= resize(unsigned(I_FOO) +
                unsigned(I_BAR), q_foo'length);

wr_en <=
  resize(unsigned(I_FOO) +
         unsigned(I_BAR), q_foo'length);

Example: align_left set to no and align_paren set to yes

wr_en <= resize(unsigned(I_FOO) +
                unsigned(I_BAR), q_foo'length);

wr_en <=
         resize(unsigned(I_FOO) +
                unsigned(I_BAR), q_foo'length);

Rules Enforcing Multiline Indent Rules