Question

Does SystemVerilog random stability apply to std::randomize()?

In other words, is it safe to use std::randomize() to get deterministic simulation results given a specific seed?

IEEE Std 1800-2012 mentions the following for 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()

The above statement mentions randomize() in an object context. However, it is unclear whether the same applies to the standalone non-object std::randomize() method.

Was it helpful?

Solution

The std::randomize() is randomize() from the scope of std.

IEEE Std 1800-2012 § 18.12 Randomization of scope variables—std::randomize()

The scope randomize function behaves exactly the same as a class randomize method, except that it operates on the variables of the current scope instead of class member variables. Arguments to this function specify the variables that are to be assigned random values, i.e., the random variables.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top