Bit-arrays are stored in unsigned ints. Since unsigned ints can hold a maximum of 32 bits, bit-arrays larger than 32 bits are stored in arrays of unsigned ints. Arrays of bit-arrays are stored in two dimensional arrays of unsigned ints. Notice that multiple bit-arrays smaller than 32 bits are NOT packed into the unsigned int.
The examples below are of Rational Statemate elements and the resulting definitions found in the generated code and in the Rational Statemate Ada libraries.
BA1 is Array 1 to 10 of Bit-array 31 downto 0
BA2 is Array 1 to 10 of Bit-array 48 downto 0
BA3 is Array 1 to 10 of Bit-array 3 down to 0type u_ba32_arr is array(natural rand <>) of u_ba32;
subtype u_ba32 is BITS_ARRAYS (1..1);
type u_ba49_arr is array (natural range <>) of u_ba49;
subtype u_ba49 is BIT_ARRAY (1..2);
type u_ba4is array(natural range<>) of u_ba4;
subtype u_ba4 is BITS_ARRAY (1..1);
BITS_ARRAY
is defined in the intrinsics package as follows: