Re: [sv-ec] EXT 14: $get_randstate(), $set_randstate()


Subject: Re: [sv-ec] EXT 14: $get_randstate(), $set_randstate()
From: Arturo Salz (Arturo.Salz@synopsys.com)
Date: Tue Sep 02 2003 - 09:46:24 PDT


Ray,

Writing to a file the string returned by $get_randstate and then
reading that string and passing it to $set_randstate is perfectly
legal. In that case, the random number generator will revert to
its state as of the time when the string was written to the file.

The motivation for this feature is to allow users more freedom to
implement their own version of random stability (or repeatability).
The default, or built-in, stability provides per-process and per-object
stability, which is sufficient for most users. Using these functions, users
can program any arbitrary stability model that suits their needs. For
example, a dynamic process can be forced to go through the same
sequence of random numbers, regardless of how many times the
process is activated.

To use these strings across vendors would require that all vendors
implement the same encoding and state for the random number
generator. This issue is related to the actual random generators and
not to this particular functionality.

    Arturo

----- Original Message -----
From: "Ryan, Ray" <Ray_Ryan@mentorg.com>
To: "'sv-ec@server.eda.org'" <sv-ec@eda.org>
Sent: Sunday, August 31, 2003 5:57 PM
Subject: [sv-ec] EXT 14: $get_randstate(), $set_randstate()

In EXT-14, I believe there is a portability issue with
the proposed $get_randstate(), $set_randstate() function.

These functions work with a string "of unspecified length and format".
Furthermore it is specified that:
"Calling $set_randstate() with a string value that was not obtained
from $get_randstate() is undefined."

How about if $get_randstate() is used to get a state string. Then
this string is written to a file. In a second simulation, the file
is read and the state string passed to $set_randstate(). Is this
legal?
Of course, there would likely be problems if in this manner a
state string is recorded from one vendor and attempted to be used
with another vendor.

What is the motivation for this feature? It would seem if the feature
is related to saving the random number state - so that the same
sub-sequence can be repeated, then the above usage of these functions
could be expected.

- Ray



This archive was generated by hypermail 2b28 : Tue Sep 02 2003 - 09:46:03 PDT