Memory Initialisation

16 views
Skip to first unread message

jatin7797

unread,
Mar 14, 2013, 4:57:53 AM3/14/13
to vlsiat...@googlegroups.com
Hi,

How to add random values in 2-D memory block but the condition is to initialize the memory without any repeated value.
For example i want to store the values in between 50 to 60. i.e reg [7:0] mem [7;0].

Regards,
Jatin

Prabuddh Nahata

unread,
Mar 14, 2013, 6:44:44 AM3/14/13
to vlsiat...@googlegroups.com
$random % n) returns a number between (-n+1) and (n-1) 

The concatenation operator {} can be used to get positive values only: 

({$random} % n) returns a number between 0 and n-1 

you can try this one .. and an attachement will help u a lot.


--
You received this message because you are subscribed to the Google Groups "vlsiatincise" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vlsiatincise...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

359_random_constraints.pdf
Reply all
Reply to author
Forward
0 new messages