Quantcast
Channel: UVM Forums RSS Feed
Viewing all articles
Browse latest Browse all 756

How to only create a dynamic array and not do randomize on 'rand int a[ ]' in sequence item?

$
0
0

I have a dynamic array in sequence item as below:

 

rand int array_size;

rand int a [];

 

constraint c_order {solve array_size before a;};

constraint c_size { a.size() == array_size;};

 

 

In some tests, I hope to only create the array according to the randomized value of array_size but not do randomize on the value of it. Is there any way I can do that?

 

 


Viewing all articles
Browse latest Browse all 756

Trending Articles