Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top