Table of Contents

Entity

entity_declaration

entity identifier is
    entity_header
    entity_declarative_part
[ begin
    entity_statement_part ]
end [ entity ] [ entity _simple_name ] ;

Further definitions

identifier

entity_header

[ formal _generic_clause ]
[ formal _port_clause ]

entity_declarative_part

{ entity_declarative_item }

entity_statement_part

{ entity_statement }

simple_name

Examples

Example of a testbench which possesses neither inputs nor outputs.

ENTITY testbench IS
END testbench ;

Entity for a 2-Bit-fulladder.

ENTITY fulladder IS
   PORT (X,Y,Cin   : IN  Bit;
         Cout, Sum : OUT Bit);
END fulladder ;

Entity with several features:

Definition of procedure init with signal transfer. Seizing of b4 with several `1` is carried out only after delay .

Instructions within the entity:

ENTITY big_example IS
   GENERIC (m : Positive);
   PORT (b1,b2 : IN Bit;
         b3: OUT Bit_Vector(1 to m));
   TYPE byte IS ARRAY (1 TO 8) OF Bit;
   USE work.timing_library.all;
   CONSTANT setuptime : Time := 12 ns;
 
 
   PROCEDURE init ( SIGNAL b4 : OUT byte) IS
   BEGIN
      b4 <= ( OTHERS => '1') AFTER delay;
   END init;
 
BEGIN
   ASSERT b4' DELAYED'STABLE (5 ns)
      REPORT "Error occured!"
      SEVERITY Error;
   passive_procedure(b2,delay);
END big_example ;