Why is this an issue?

For better readability, direct instantiation (also called entity instantiation) should be used whenever possible.

This rule raises an issue for each component declaration in package or architecture declarative part.

How to fix it

Code examples

Noncompliant code example

architecture a of e is
  component does_something -- Noncompliant: Component declaration followed by component instantiation below
  port (
    a : in std_logic;
    b : out std_logic
  );
  end component does_something;

begin
  DOES_SOMETHING : does_something -- Component instantiation
    port map (
      a => a,
      b => b
    );
end architecture;

Compliant solution

architecture a of e is
begin
  DOES_SOMETHING : entity does_something(rtl) -- Compliant: Direct instantiation
    port map (
      a => a,
      b => b
    );
end architecture;

Resources

Articles & blog posts

Resources

Related rules