Hi, > -----Original Message----- > From: owner-sv-ec@server.eda.org > [mailto:owner-sv-ec@server.eda.org] On Behalf Of Clifford E. Cummings > Sent: Thursday, June 11, 2009 8:09 PM > To: sv-ec@server.eda.org > Subject: [sv-ec] $random(), $urandom() > > Thanks, Shalom - > > I have run into issues with empty parentheses in the past with one > implementation, but not with the two implementations that I > tested yesterday. > > I am not as certain about the integral number -vs- integral > variable issue. > > I did find text supporting your position in the third paragraph of > clause 20.15.1 (ballot draft): > The seed argument shall be an integral variable. The seed value > should be assigned to this variable prior to calling $random. > But I wonder if that is a mistake. Do you have access to any tools > that do not support integral numbers inside of the parentheses? Yup. We have also discussed this before. > Seems > like if one uses $random(integral_number), one would always get the > same value returned, which is what I observed. Adding the integral > variable allows $random to change the seed between calls. > > Regarding $urandom(integral_number), from the second paragraph of > 18.13.1 (ballot draft): > The seed is an optional argument that determines the sequence of > random numbers generated. The seed can be any integral expression. > The random number generator (RNG) shall generate the same sequence of > random numbers every time the same seed is used. > And the subsequent example shows: addr[32:1] = $urandom(254); $urandom is different than $random. Regards, Shalom --------------------------------------------------------------------- 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 Thu Jun 11 10:37:03 2009
This archive was generated by hypermail 2.1.8 : Thu Jun 11 2009 - 10:37:28 PDT