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.

Randomizing dynamic arrays in System Verilog

Status
Not open for further replies.

gaurang4040

Newbie level 2
Joined
Oct 9, 2009
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Bangalore, India
Activity points
1,296
Hi all,

I am new to SV and I'm trying out examples for rendomization.
In my example, I defined a class for generating frames which have,

1. Header
2. Varible Data Length
3. Destination Address
4. CRC

I have taken a dynamic array for varible data length. This is like,
rand logic [7:0] data[ ]
And another integer variable i accounts for size of this array.

So, I want i to be randomized first. And based on the value of i, random data should be generated.
How can I do this? :?:


Thanks & Regards,
Gaurang
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top