[sv-bc] Hierarchical seeding of random values

From: Jason Campbell <jcampbell@winterlogic.com>
Date: Mon May 10 2010 - 13:08:15 PDT

Section 18.14.2:

 

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?

 

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).

 

Thanks,

 

Jason Campbell

WinterLogic Inc.

 

module test;

 

  ranmod i0();

  ranmod i1();

 

endmodule

 

module ranmod;

 

integer i;

 

always @(i) $display("%m.i",,i);

 

initial

  #1 i = $urandom;

 

endmodule

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

This archive was generated by hypermail 2.1.8 : Mon May 10 2010 - 13:08:54 PDT