Forum Discussion
Altera_Forum
Honored Contributor
11 years agoVerilog behaves this way so if you find a bug, you can repeat the simulation using the exact same set of values and see if you fix eliminates the bug.
You should call $urandom or $urandom_range(minval,maxval) instead of $random. When you simulate, you can provide a seed using a command switch. In ModelSim/Questa, the switch is -sv_seed random. It will display the random seed used for the simulation so you can repeat it with -sv_seed nnnn.