Scope Randomize

Hi ,

Have a few queries about Scope Randomize Function i.e std::randomize()

[Q1] Is there a difference between std::randomize(Local_Variables) and simple randomize(Local_Variables) ?

[Q2] Where is this std Package Included ?

[Q3] For following Snippet



module TP;

bit [3:0] a , b;

bit x ;

......


function void SCOPE_RANDOMIZE (input x);

if ( [std::]randomize( a , b ) with { a + x < b ; } 

......

endfunction

endmodule



Is there any way that the inline Constraint refers to Module Level Variable x and Not Method Argument x ??
i.e Modifying Local Scope itself .
One way I understand would be $root. , is there any other alternative ? like local::

[Q4] Does seeding a $urandom(SEED) function Manually affect further calls to $urandom() Function ?

Example ::



LHS1 = $urandom(12345);
LHS2 = $urandom();

Would the value returned by 2nd $urandom be Dependent on the Manually Seeded Call ? 

Regards,
AGIS

In reply to Etrx91:

  1. You only need std:: if you need to call from within a class method to distinguish it from the class’s built-in randomize() method.
  2. The std:: package is built-in to the language.
  3. You can use a upwards reference TP.x.
  4. Yes, supplying a seed argument to $urandom is one way of setting the thread RNG.