how to change random seed using command line parameter

3 posts / 0 new
Last post
Jules
Offline
Academy Total Access User
Joined: 02/02/2012
Posts: 19
how to change random seed using command line parameter

I know that in VERA simulation, we can use +vera_random_seed=$(SEED) to change random seed without to re-compile. In fact i use shell script to get current time and pass it to vera seed. Every time I run simulaiton, the random data is not the same, it is very convenient.

I was wondering whether systemverilog has the same mechanics to change rand seed at command line.

Thanks!

dave_59
Offline
Verification Forum Moderator
Joined: 03/10/2010
Posts: 976
Re: how to change random seed using command line parameter

Command line switches may be tool dependent.

In Questa, you can use the vsim switch -sv_seed [value]. You can also use random as value to generate unique seeds. It will print out the seed so you can replay it.

__________________

Dave Rich
Mentor Graphics
http://go.mentor.com/drich

Jules
Offline
Academy Total Access User
Joined: 02/02/2012
Posts: 19
Re: how to change random seed using command line parameter

Thanks! Dave!
Got it!