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
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