Can we randomize 2-D array using std::randomize()?

In reply to ssureshg_:

Hello,

Thanks for your help. It worked with fixed size array but I feel it is not working wit dynamic 2-D array.

Here is the below code I tried:

module top();
int d;

initial begin
d = new[4];

// Creating individual array index
foreach(d[i])
begin
d[i]=new[4];
end

// Randomizing array 
std::randomize(d);
...

endmodule: top

And it gave me below error:

Error-[UARC] Unsupported argument to randomize call
testbench.sv, 15
“d”
Arg #1 of std::randomize “d” is unsupported mixed array

So, is it like that randomize doesn’t work with 2-D dynamic array?

Thanks.