Hi, The following came up in Verification Guild: Item 30 - Topic: How to Seed std::randomize() (http://verificationguild.com/modules.php?name=Forums&file=viewtopic&t=2 077) Posted by: kgopikrishna at 19 Sep 2007, 02:09 AM EDT Subject : How to Seed std::randomize() How to seed std::randomize()? Is it Random stable ? SV IEEE LRM 13.11 Randomization of scope variables-std::randomize() Nothing is mentioned in this unit regarding this. <pre>> > 13.13 Random stability > The RNG is localized to threads and objects. Because the sequence of random values returned by a thread or > object is independent of the RNG in other threads or objects, this property is called random stability. Random > stability applies to the following: > - The system randomization calls, $urandom() and $urandom_range() > - The object and process random seeding method, srandom() > - The object randomization method, randomize() > > </pre> Its mentioned that "object randomization method, randomize() " There is nothing mentioned about std::randomize() (http://verificationguild.com/modules.php?name=Forums&file=viewtopic&p=9 429#9429) ---- ---- ---- ---- ---- ---- ---- Posted by: cabriggs at 19 Sep 2007, 01:09 PM EDT Subject : Re: How to Seed std::randomize() <pre>> How to seed std::randomize()?</pre> Try checking your simulator docs for their specific method of seeding the RNG from the command line. Here are the ones I know: VCS: simv +ntb_random_seed=<seed> Questa: vsim -sv_seed <seed> -cb (http://verificationguild.com/modules.php?name=Forums&file=viewtopic&p=9 440#9440) ---- ---- ---- ---- ---- ---- ---- Posted by: kgopikrishna at 19 Sep 2007, 10:09 PM EDT Subject : Im looking for solution some thing similar to this... $urandom(seed) srandom(seed) process::self.srandom(seed) (http://verificationguild.com/modules.php?name=Forums&file=viewtopic&p=9 447#9447) ---- ---- ---- ---- ---- ---- ---- Posted by: vhdlcohen at 19 Sep 2007, 11:09 PM EDT Subject : <pre>> Im looking for solution some thing similar to this... > $urandom(seed) > srandom(seed) > process::self.srandom(seed)</pre>Frp P1800 LRM <pre>> The srandom() method allows manually seeding the Random Number Generator (RNG) of objects or > threads. The RNG of a process can be seeded using the srandom() method of the process The prototype of the srandom() method is: > function void srandom( int seed ); > The srandom() method initializes an object's random number generator using the value of the given seed.</pre> (http://verificationguild.com/modules.php?name=Forums&file=viewtopic&p=9 449#9449) ---- ---- ---- ---- ---- ---- ---- Posted by: kgopikrishna at 20 Sep 2007, 12:09 AM EDT Subject : Ben, I did not get answer to my question. <pre>> 13.11 Randomization of scope variables-std::randomize() > The scope randomize function, std::randomize(), enables users to randomize data in the current scope without the need to define a class or instantiate a class object. > </pre> Even if there is no class,randomize() is allowed. P1800, section 13.12.3 wrote: <pre>> > The srandom() method allows manually seeding the Random Number Generator (RNG) of objects or threads. The RNG of a process can be seeded using the srandom() method of the process The prototype of the srandom() method is: > function void srandom( int seed ); > The srandom() method initializes an object's random number generator using the value of the given seed. > </pre> Srandom() is for objects and threads. integer variable; randomize( variable ) ; Is it possible to include srandom(seed) in the above statement? Shalom Bresticker Intel Jerusalem LAD DA +972 2 589-6852 +972 54 721-1033 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Sun Sep 23 23:11:53 2007
This archive was generated by hypermail 2.1.8 : Sun Sep 23 2007 - 23:12:30 PDT