Keyword: ARRAY
The array keyword is used to declare an array data type. An array is an object containing a collection of elements that are all of the same type.
An array can be either constrained or unconstrained. A constrained array is defined with an index defining the number of array elements. In an unconstrained array, the number of elements in the array is specified in the array’s object declaration, or the index definition for the array may be given in a subtype declaration. Arrays may be one-dimensional (single index) or multi-dimensional (multiple indices).
An array definition includes—in this order—the following:
(1) the reserved word "array", followed by a definition(s) of the elements in the array, and
(2) the reserved word "of", followed by the subtype of the array’s elements.
Examples
type DataWord is array (15 downto 0) of DataBit;
--Constrained
...
type BigWord is array (integer range <>) of DataBit;
-- Unconstrained
LRM
3.2
See also