Commentary

This commit is contained in:
Wilson Snyder 2020-11-17 22:48:37 -05:00
parent e6f7510895
commit 82b2af3b83

View File

@ -294,7 +294,7 @@ vluint64_t vl_rand64() VL_MT_SAFE {
if (VL_UNLIKELY(!t_seeded)) {
t_seeded = true;
{
const VerilatedLockGuard lock(s_mutex);
const VerilatedLockGuard lock(s_mutex); // Otherwise vl_sys_rand32 is unsafe
if (Verilated::randSeed() != 0) {
t_state[0] = ((static_cast<vluint64_t>(Verilated::randSeed()) << 32)
^ (static_cast<vluint64_t>(Verilated::randSeed())));