Question on $random usage in Cadence NC Verilog

D

Doug Hillmer

Guest
I am looking for some help here.

I am running a test bench (that I did not write) that uses the $random
function for generating it's input values. I am running this as a
regression test and of course it is not matching the previous runs of
the test because $random generates random numbers.

In my opinion the proper way to have written this test would have been
to set (and record) a known SEED so the test can be repeated, but that
was not done.

So here is my question. If I know the particular random sequence I want
to see generated can I figure out what SEED I need to use to get that
sequence? How many numbers in the sequence are needed to figure it out?

Thanks for any help.

Doug
 
Doug Hillmer wrote:
I am looking for some help here.

I am running a test bench (that I did not write) that uses the $random
function for generating it's input values. I am running this as a
regression test and of course it is not matching the previous runs of
the test because $random generates random numbers.

In my opinion the proper way to have written this test would have been
to set (and record) a known SEED so the test can be repeated, but that
was not done.

So here is my question. If I know the particular random sequence I want
to see generated can I figure out what SEED I need to use to get that
sequence? How many numbers in the sequence are needed to figure it out?

Thanks for any help.

Doug

In my experience with the NCVerilog, $random always assumes a default
seed and generates the same sequence everytime. So I don't think you
need to guess what that seed is. Hope that helps.
 

Welcome to EDABoard.com

Sponsor

Back
Top