User guide
24-20
SystemVerilog Testbench Constructs
Arrays
Dynamic Arrays
Dynamic arrays are unpacked arrays with a size that can be set or
changed during simulation. The syntax for a dynamic array is as
follows:
data_type name [];
The empty brackets specify a dynamic array.
The currently supported data types for dynamic arrays are as follows:
The new[ ] Built-In Function
The new[] built-in function is for specifying a new size for a dynamic
array and optionally specifying another array whose values are
assigned the dynamic array. Its syntax is as follows:
array_identifier = new[size] (source_array);
bit logic reg byte
int longint shortint integer
time string class enum
events mailbox semaphore