Component Rules

component_001

phase_4 error indent

This rule checks the indentation of the component keyword.

Violation

architecture rtl of fifo is
begin

component fifo is

     component ram is

Fix

architecture rtl of fifo is
begin

  component fifo is

  component ram is

component_002

phase_2 error whitespace

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

Violation

component    fifo is

Fix

component fifo is

component_003

phase_3 error blank_line

This rule checks for blank lines or comments above the component declaration.

Refer to Configuring Previous Line Rules for more information.

The default style is no_code.

Violation

end component fifo;
component ram is

Fix

end component fifo;

component ram is

component_004

phase_6 error case case_keyword

This rule checks the component keyword has proper case.

Refer to Configuring Uppercase and Lowercase Rules for more information.

Violation

COMPONENT fifo is

Component fifo is

Fix

component fifo is

component fifo is

component_005

phase_1 error structure

This rule checks the is keyword is on the same line as the component keyword.

Violation

component fifo

component fifo
is

Fix

component fifo is

component fifo is

component_006

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

component fifo IS

component fifo Is

Fix

component fifo is

component fifo is

component_007

phase_2 error whitespace

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

Violation

component fifo    is

Fix

component fifo is

component_008

phase_6 error case case_name

This rule checks the component name has proper case in the component declaration.

Refer to Configuring Uppercase and Lowercase Rules for more information.

Violation

component FIFO is

Fix

component fifo is

component_009

phase_4 error indent

This rule checks the indent of the end component keywords.

Violation

  overflow : std_logic
);
    end component fifo;

Fix

    overflow : std_logic
  );
end component fifo;

component_010

phase_6 error case case_keyword

This rule checks the end keyword has proper case.

Refer to Configuring Uppercase and Lowercase Rules for more information.

Violation

END component fifo;

Fix

end component fifo;

component_011

phase_2 error whitespace

This rule checks for single space after the end keyword.

Violation

end   component fifo;

Fix

end component fifo;

component_012

phase_6 error case case_name

This rule checks the proper case of the component name in the end component line.

Refer to Configuring Uppercase and Lowercase Rules for more information.

Violation

end component FIFO;

Fix

end component fifo;

component_013

phase_2 error whitespace

This rule checks for a single space after the component keyword in the end component line.

Violation

end component    fifo;

Fix

end component fifo;

component_014

phase_6 error case case_keyword

This rule checks the component keyword in the end component line has proper case.

Refer to Configuring Uppercase and Lowercase Rules for more information.

Violation

end COMPONENT fifo;

Fix

end component fifo;

component_015

This rule has been depricated. The component keyword is required per the LRM.

component_016

phase_3 error blank_line

This rule checks for blank lines above the end component line.

Violation

    overflow : std_logic
  );



end component fifo;

Fix

    overflow : std_logic
  );
end component fifo;

component_017

phase_5 error alignment

This rule checks the alignment of the colon for each generic and port in the component declaration.

Following extra configurations are supported:

  • separate_generic_port_alignment.

Refer to Configuring Keyword Alignment Rules for information on changing the configurations.

Violation

component my_component
    generic (
        g_width : positive;
        g_output_delay : positive
    );
    port (
        clk_i : in std_logic;
        data_i : in std_logic;
        data_o : in std_logic
    );
end component;

Fix

component my_component
    generic (
        g_width        : positive;
        g_output_delay : positive
    );
    port (
        clk_i  : in std_logic;
        data_i : in std_logic;
        data_o : in std_logic
    );
end component;

component_018

phase_3 error blank_line

This rule checks for a blank line below the end component line.

Refer to Configuring Blank Lines for more information.

Violation

end component fifo;
signal rd_en : std_logic;

Fix

end component fifo;

signal rd_en : std_logic;

component_019

phase_1 error structure

This rule checks for comments at the end of the port and generic clauses in component declarations. These comments represent additional maintainence. They will be out of sync with the entity at some point. Refer to the entity for port types, port directions and purpose.

Violation

wr_en : in    std_logic;  -- Enables write to RAM
rd_en : out   std_logic; -- Enable reads from RAM

Fix

wr_en : in    std_logic;
rd_en : out   std_logic;

component_020

phase_5 error alignment

This rule checks for alignment of inline comments in the component declaration.

Following extra configurations are supported:

  • separate_generic_port_alignment.

Refer to Configuring Keyword Alignment Rules for information on changing the configurations.

Violation

component my_component
    generic (
        g_width        : positive;  -- Data width
        g_output_delay : positive -- Delay at output
    );
    port (
        clk_i  : in std_logic; -- Input clock
        data_i : in std_logic;   -- Data input
        data_o : in std_logic -- Data output
    );
end my_component;

Fix

component my_component
    generic (
        g_width        : positive; -- Data width
        g_output_delay : positive  -- Delay at output
    );
    port (
        clk_i  : in std_logic; -- Input clock
        data_i : in std_logic; -- Data input
        data_o : in std_logic  -- Data output
    );
end my_component;

component_021

phase_1 error structure structure_optional

This rule inserts the optional is keyword if it does not exist.

Refer to Configuring Optional Items for more information.

Violation

component my_component

end my_component;

Fix

component my_component is

end my_component;