--------------------------------------------------------------- -- A package with definitions of some constants and subtypes. -- The entity mem uses the defined package. --------------------------------------------------------------- PACKAGE my_package IS CONSTANT word_size: positive := 32; SUBTYPE address IS bit_vector(word_size-1 DOWNTO 0); SUBTYPE bus IS bit_vector(word_size-1 DOWNTO 0); END PACKAGE my_package; USE WORK.my_package.ALL; ENTITY mem IS PORT( addr: IN address; d_in : IN bus; d_out : OUT bus); END ENTITY mem; ARCHITECTURE sample OF mem IS CONSTANT pi: real := 3.14159; BEGIN P1: PROCESS (sensitivity_list) IS VARIABLE counter: integer; BEGIN -- statements using pi, counter, addr, d_in, d_out END PROCESS P1; END ARCHITECTURE sample;