Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top