Alias Declaration Rules

alias_declaration_001

phase_1 error structure

This rule checks the alias keyword is on its own line.

Violation

signal sig1 : std_logic; alias designator is name;

Fix

signal sig1 : std_logic;
alias designator is name;

alias_declaration_100

phase_2 error whitespace

This rule checks for a single space after the colon for the subtype_indication.

Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..

Violation

alias alias_designator :    subtype_indication is name;
alias alias_designator :subtype_indication is name;

Fix

alias alias_designator : subtype_indication is name;
alias alias_designator : subtype_indication is name;

alias_declaration_101

phase_2 error whitespace

This rule checks for a single space before the is keyword if the : is present.

Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..

Violation

alias alias_designator : subtype_indication     is name;
alias alias_designator   is name;

Fix

alias alias_designator : subtype_indication is name;
alias alias_designator   is name;

alias_declaration_102

phase_2 error whitespace

This rule checks for a single space after the is keyword.

Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..

Violation

alias alias_designator is     name;

Fix

alias alias_designator is name;

alias_declaration_103

phase_2 disabled error whitespace

This rule checks for a single space before the designator.

Refer to Configuring Whitespace Rules for options on changing the number of whitespaces..

Violation

alias          alias_designator is name;

Fix

alias alias_designator is name;

alias_declaration_300

phase_4 error indent

This rule checks the indent of the alias keyword.

Violation

signal sig1 : integer;

  alias is name;

Fix

signal sig1 : integer;

alias is name;

alias_declaration_500

phase_6 error case case_keyword

This rule checks the alias keyword has proper case.

Refer to Configuring Uppercase and Lowercase Rules for more information.

Violation

ALIAS alias_designator is name;

Fix

alias alias_designator is name;

alias_declaration_501

phase_6 error case case_keyword

This rule checks the is keyword has proper case.

Refer to Configuring Uppercase and Lowercase Rules for more information.

Violation

alias alias_designator IS name;

Fix

alias alias_designator is name;

alias_declaration_502

phase_6 error case case_name

This rule checks the alias designator has proper case.

Refer to Configuring Uppercase and Lowercase Rules for more information.

Violation

alias Alias_Designator is name;

Fix

alias alias_designator is name;

alias_declaration_503

phase_6 error case

This rule checks for consistent capitalization of alias designators.

Violation

architecture RTL of ENTITY1 is

  signal instructure : bit_vector(15 downto 0);
  alias opcode : bit_vector(3 downto 0) is instructure(15 downto 12);

  signal data : std_logic_vector(OPCODE'range);

begin

  data <= OpCode;

  PROC_NAME : process () is
  begin

    data <= OpCOde;

    if (opCODE = "0110") then
      data <= oPCode;
    end if;

  end process PROC_NAME;

end architecture RTL;

Fix

architecture RTL of ENTITY1 is

  signal instructure : bit_vector(15 downto 0);
  alias opcode : bit_vector(3 downto 0) is instructure(15 downto 12);

  signal data : std_logic_vector(opcode'range);

begin

  data <= opcode;

  PROC_NAME : process () is
  begin

    data <= opcode;

    if (opcode = "0110") then
      data <= opcode;
    end if;

  end process PROC_NAME;

end architecture RTL;

alias_declaration_600

phase_7 disabled error unfixable naming

This rule checks for valid prefixes on alias designators.

Default prefix is a_.

Refer to Configuring Prefix and Suffix Rules for more information.

Violation

alias header is name;
alias footer is name;

Fix

alias a_header is name;
alias a_footer is name;

alias_declaration_601

phase_7 disabled error unfixable naming

This rule checks for valid suffixes on alias designators.

Default prefix is _a.

Refer to Configuring Prefix and Suffix Rules for more information.

Violation

alias header is name;
alias footer is name;

Fix

alias header_a is name;
alias footer_a is name;