sujithad
Newbie level 2
- Joined
- Jun 24, 2013
- Messages
- 2
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 14
Hi
I have an array of 512 entries each entry being 1024 bits size.
rand bit [1023:0] entry_rand [512];
I want to constraint randomize such that each entry is non-zero but only few bits in the entry are set.
Eg: Out of 1024 bit, I need only 5 bits be set to 1 & others be 0.
Can anyone help me how to write constraint for this?
constraint entry_rand_c {
foreach (entry_rand) {
}
}
Thanks
=sd
I have an array of 512 entries each entry being 1024 bits size.
rand bit [1023:0] entry_rand [512];
I want to constraint randomize such that each entry is non-zero but only few bits in the entry are set.
Eg: Out of 1024 bit, I need only 5 bits be set to 1 & others be 0.
Can anyone help me how to write constraint for this?
constraint entry_rand_c {
foreach (entry_rand) {
}
}
Thanks
=sd