Re: [sv-bc] Hierarchical seeding of random values

From: Steven Sharp <sharp@cadence.com>
Date: Mon May 10 2010 - 13:56:45 PDT

>From: "Jason Campbell" <jcampbell@winterlogic.com>
>
>Hierarchical seeding. When a thread is created, its random state is
>initialized using the next random
>
>value from the parent thread as a seed. The three forked threads are all
>seeded from the parent
>
>thread.
>
>
>
>Does this mean that all random states are inherited from $root?

Apparently not. The static processes are seeded from the initialization RNG
of the module instance. See further down in the paragraph you are quoting.

The previous paragraph describes the initialization RNG. It says that each
initialization RNG is seeded with the default seed. So each module instance
has the same seed, rather than having seeds generated for them from a $root
RNG.

>More specifically, if I have two instances of a module with an initial block
>that calls $urandom is the
>
>value the same for both instances or are they different (example below).

My interpretation of the LRM text is that they will have the same value.
This doesn't seem very desirable, but that is how it seems to be.

One reason for this may be the difficulty in maintaining stability if the
modules were seeded from a root RNG. Presumably adding a new module instance
somewhere in the hierarchy would perturb the seeds of other instances.

I believe there has been a proposal to compute seeds somehow based on the
hierarchical paths to the modules, which does not change when additional
modules are added.

Steven Sharp | Architect | Cadence

P: 508.459.1436 M: 774.535.4149 www.cadence.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon May 10 13:57:23 2010

This archive was generated by hypermail 2.1.8 : Mon May 10 2010 - 13:59:12 PDT