Hi Victor, No, it won't because the random number generator that you seed with seedRandom is independent from the one you seed inside your program. seedRandom seeds random_mt declared in base/random.hh which is not accessible from inside your program as of the latest version of gem5. You can easily fix that:
First, go to kern/linux/linux.cc:130 (inside devRandom()) and replace "random.random<uint8_t>(0, 255)" with "random_mt.random<uint8_t>(0, 255)". Second, read /dev/random inside your program to seed your internal pseudo-random number generator. This seed will be determined using random_mt which is itself seeded by yourself using seedRandom. Alternatively to the first step, you can define a python binding in python/pybind11/core.cc (or update the existing seedRandom binding) to seed the random generator currently used by devRandom(). This is a bit more work but it will guarantee that the value you get from /dev/random does not depend on what happens in the rest of the simulator. Gabriel _______________________________________________ gem5-users mailing list -- gem5-users@gem5.org To unsubscribe send an email to gem5-users-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s