Global Package
TYPE level IS ('X', '0', '1', 'Z'); -- enumerated type
TYPE level_vector IS ARRAY (NATURAL RANGE <>) OF level;
-- type for vectors (buses)
SUBTYPE delay IS TIME; -- subtype for gate delays
-- Function and procedure declarations go here
Notes:
This is the package declaration for the user defined four valued type package. It includes the four valued enumerated type itself, a vector or array of that type, and a subtype of type time to be used for delay values. Functions and/or procedures could be declared in the package (with their actual implementation descriptions included in the package body), but that will be deferred until module 12, Behavioral VHDL.