Quantcast
Channel: UVM SystemVerilog Discussions Forum RSS Feed
Viewing all articles
Browse latest Browse all 410

Randomization of dynamic arrays

$
0
0

While randomizing a dynamic array we constrain the size of the array somewhat like this:

rand byte data[]; 

constraint size_c { data.size() == 1000; } 

 

My question is regarding creation of dynamic array. I have neither seen nor used the array constructor to construct dynamic array while randomizing. 

How is the array being constructed? What does randomize method do to construct the dynamic array?


Viewing all articles
Browse latest Browse all 410