User guide
24-24
SystemVerilog Testbench Constructs
lDA2[0] = 0
lDA2 size = 2
You can assign a dynamic array to a fixed-size array, provided that
they are of equivalent data type and that the current size of the
dynamic array matches the size of the fixed-size array.
Associative Arrays
An associative array has a lookup table for the elements of its
declared data type. Its index is a data type which serves as the lookup
key for the table. This index data type also establishes an order for
the elements.
The syntax for declaring an associative array is as follows:
data_type array_id [index_type];
data_type array_id [* | string];
Where:
data_type
Is the data type of the associative array.
array_id
Is the name of the associative array.
index_type
Specifies the type of index. Only two types are currently
implemented. They are as follows:
*
Specifies a wildcard index.
string
Specifies a string index.