Skip to content

Latest commit

 

History

History
150 lines (108 loc) · 5.05 KB

configuring_identifier_alignment_rules.rst

File metadata and controls

150 lines (108 loc) · 5.05 KB

Configuring Identifier Alignment Rules

There are several rules that enforce alignment of identifiers in group of lines. Some of the configurations are available in all keyword alignment rules, while others are rule specific.

There are several options to these rules:

Option Values Default Description
compact_alignment yes, no yes
  • yes = Align to left most column
  • no = Align to right most column
blank_line_ends_group yes, no yes
  • yes = Alignment will stop if a blank line is encountered
  • no = Alignment will continue if a blank line is encountered
comment_line_ends_group yes, no yes
  • yes = Alignment will stop if a blank line is encountered
  • no = Alignment will continue if a blank line is encountered

The options can be combined to align identifiers.

This is an example of how to configure these options.

rule :
  architecture_029:
     compact_alignment : 'yes'
     blank_line_ends_group : 'no'
     comment_line_ends_group: 'no'

The following code snippet is used in the following examples:

-- Control signals
signal        wr_en   : std_logic;
signal          rd_en   : std_logic;
-- Status signals
signal  wr_full : std_logic;
signal    rd_full : std_logic;

signal     wr_empty : std_logic;
signal  rd_empty : std_logic;

Example: compact_alignment set to yes

-- Control signals
signal wr_en   : std_logic;
signal rd_en   : std_logic;
-- Status signals
signal wr_full : std_logic;
signal rd_full : std_logic;

signal wr_empty : std_logic;
signal rd_empty : std_logic;

Example: blank_line_ends_group set to yes others set to no

-- Control signals
signal          wr_en   : std_logic;
signal          rd_en   : std_logic;
-- Status signals
signal          wr_full : std_logic;
signal          rd_full : std_logic;

signal     wr_empty : std_logic;
signal     rd_empty : std_logic;

Example: comment_line_ends_group set to yes others set to no

-- Control signals
signal          wr_en   : std_logic;
signal          rd_en   : std_logic;
-- Status signals
signal     wr_full : std_logic;
signal     rd_full : std_logic;

signal     wr_empty : std_logic;
signal     rd_empty : std_logic;

Rules Enforcing Identifier Alignment