3.2 Compound types

3.2.1 Definitions

composite_type_definition ::=
    array_type_definition
    | record_type_definition

3.2.2 Examples

TYPE my_word IS ARRAY ( 0 TO 31 )
      OF bit ;

mt_word is declared as a bit vector of the width 32,
with the indices rising from left to right.

TYPE data_in IS ARRAY ( 7 DOWNTO 0 )
      OF five_level_logic

data_in is declared as a vector of the type
five_level_logic and the width 8, with the indices
descending from left to right.


TYPE
memory IS ARRAY (integer
      RANGE <>) OF my_word ;

memory is declared as a vector of the type my_word
with an arbitrary width (<>). Direction and maximum
width is determined by the type integer .

TYPE t IS ARRAY
   (positive RANGE min TO max)
                    OF element;

t is declared as a vector of the type element with the
width 1+( max - min ) [type positive] .

TYPE date IS
   RECORD
      day   : integer RANGE 1 TO 31;
      month : month_name;
      year  : integer RANGE 0 TO 2100;
   END RECORD ;



date
is declared as Record which consists of
the elements day , month and year .