$random vs. $srandom

On 11/20/2012 5:33 AM, Navnish wrote:
Is there any difference between $random and $srandom
$random() is part of the standard and $srandom() is not (at least in
1800-2009) so this is a vendor provided system function and you'll need
to look at the documentation they provide. If I was guessing this is
probably an alternative way to set the seed for the $random() system
function or could be used to set the random seed for certain
SystemVerilog object.

There is a srandom method in SystemVerilog that is used to seed the
random number sequence for certain types of objects, but this is very
different for the system function $random().

Cary
 
On 2/2/2013 9:23 PM, harshilsheth5@gmail.com wrote:
@cary:can you give any example?
Since $srandom() is not part of the standard your best choice is to look
at the documentation for the simulator you are using. I have no way of
guessing how it should be used other then what I posted previously.

Cary
 

Welcome to EDABoard.com

Sponsor

Back
Top