Why is this an issue?

For better portability, an entity declaration should only contain:

How to fix it

Code examples

Noncompliant code example

entity e is
 generic(
    g1 : natural range 0 to 63 := 32;
    g2 : natural range 0 to 31 := 8
  );

  port(
    s1 : in std_logic;
    s2 : out std_logic
  );

  attribute p_type: ic_package;
  attribute p_type of c : component is p1;

  package p is  -- Noncompliant: Package declaration is not allowed
  end;
end;

Compliant solution

entity e is
 generic(
    g1 : natural range 0 to 63 := 32;
    g2 : natural range 0 to 31 := 8
  );

  port(
    s1 : in std_logic;
    s2 : out std_logic
  );

  attribute p_type: ic_package;
  attribute p_type of c : component is p1;
end;