Randomization of Array Of Objects in System Verilog

Status
Not open for further replies.

spartanthewarrior

Full Member level 2
Joined
Jun 13, 2007
Messages
122
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,296
Activity points
2,142
Hi All,

Can any body tell me

How to randomize array of objects in System Verilog

Regards
 

class A;

rand int arr [5];

task run();
void'(randomize());
endtask

endclass : A
 

When 'randomize()' is invoked on an object then 'randomize()' is also invoked on all of its 'rand' elements (after the end of its post_generate() but before returning to the caller) given that any custom types (objects, non-standard data types) are properly instantiated (newed) before hand otherwise they are neither instantiated nor randomized automatically.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…