Continue to Site

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.

How to change the VCS random seed

Status
Not open for further replies.

jammed

Newbie level 3
Joined
Sep 30, 2005
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,322
When running VCS, the default seed for RNG is 1.
ex:
% vcs -R -sverilog my_test.sv

If I run this many times I will always get the same simulation results.


How do I change the random seed, so that if I run my_test many times, i get different simulation results from different seeds?
Is there a compile-time/run-time option that can change the seed value?
ex:
% vcs -R -sverilog <option_for_specifying_random_seed> my_test.sv
 

ntb_random_seed

jammed said:
When running VCS, the default seed for RNG is 1.
ex:
% vcs -R -sverilog my_test.sv

Try:

+ntb_random_seed=<number>

If you have a PERL/Shell script around your vcs, then it is quite easy to generate a random number and pass it to vcs.

HTH
Ajeetha
www.noveldv.com
 

vcs random seed

thanks aji for your suggestion.

actually i have already tried that before, but somehow i can't get it to work.
do you have a working example?

anyway, i have figured out a way of doing it, using $value$plusargs("seed=%d",seed)

from the command line, i can use :
%simv +seed=<value>

and yes, i generate the value using a script, so it really is random now everytime i run it. =)

cheers.
 

Re: VCS random seed

use this command after compilation

./simv +ntb_random_seed=value

Its working for me.

--Mahesh
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top