misc: Do not share the random number generator across components (#1534)

Component that require randomness should not share their randomness
source with other components to avoid simulation noise. For instance,
the branch predictor of one core should not impact the random
cache replacement policy of the cache of another core. This currently
happens as all components share a single random number generator.
    
This PR provides their own generators to relevant components, although
a couple components still use rand().
    
Change-Id: I3fb7226111c9194ee457af0f0f2b83f8c7b69d1e

Co-authored-by: Arthur Perais <arthur.perais@univ-grenoble-alpes.fr>
This commit is contained in:
aperais
2024-11-18 10:36:40 +01:00
committed by Bobby R. Bruce
parent 5ae26c0f09
commit b82ab5ac89
88 changed files with 448 additions and 188 deletions

View File

@@ -310,7 +310,9 @@ pybind_init_core(py::module_ &m_native)
.def("disableAllListeners", &ListenSocket::disableAll)
.def("listenersDisabled", &ListenSocket::allDisabled)
.def("listenersLoopbackOnly", &ListenSocket::loopbackOnly)
.def("seedRandom", [](uint64_t seed) { random_mt.init(seed); })
.def("seedRandom", [](uint64_t seed) {
Random::reseedAll(seed);
})
.def("fixClockFrequency", &fixClockFrequency)