V
Verictor
Guest
What are the techniques to randomize dynamic arrays? The array, in the
context, means these two cases mainly:
class array_2D;
rand int array;
endclass
and
class array_1D;
rand bit [i:0] array[j];
endclass
For the 2-D array case, we usually use pre_randomize() or
post_randomize(). Is there other way?
For the 1-D array case, I am not sure if it is the right class
construction. But if indeed a class has been defined like that, how do
we randomize it? It seems there are more randomize dimensions than the
2-D case.
Thanks in advance.
context, means these two cases mainly:
class array_2D;
rand int array;
endclass
and
class array_1D;
rand bit [i:0] array[j];
endclass
For the 2-D array case, we usually use pre_randomize() or
post_randomize(). Is there other way?
For the 1-D array case, I am not sure if it is the right class
construction. But if indeed a class has been defined like that, how do
we randomize it? It seems there are more randomize dimensions than the
2-D case.
Thanks in advance.