0

I am now working on a verilog testbench file and I want to get a random value in my code, but I have found that Questa Sim uses the same seed again and again. I have read through $random in Verilog doesn't seem to be working and tried typing -sv_seed random in the transcript window, but the program doesn't understand my command. Can anyone give me some hints?

dave_59
  • 7,557
  • 1
  • 14
  • 26
eric yau
  • 9
  • 1

1 Answers1

1

The -sv_seed random is an option the to vsim command line. By the time you get to vsim's transcript window, it's too late to change the seed.

When invoking Questa from the shell command

vsim -sv_seed random ...

When starting Questa simulation using the GUI, look for form to fill in vsim options.

dave_59
  • 7,557
  • 1
  • 14
  • 26
  • Thanks for your help. If it's too late, what should I do if I want to change the seed before simulation? Where should I type the command "sv_seed random"? – eric yau Oct 05 '18 at 05:44
  • `vsim -sv_seed random . If you are using the Questa GUI, when you go to "Start Simulation" there is an Other Vsim Options form – dave_59 Oct 05 '18 at 05:52