This commit is contained in:
Yilou Wang 2025-07-22 10:58:15 +02:00
parent 6c40409f72
commit f209a8fb3d
2 changed files with 3 additions and 3 deletions

View File

@ -584,7 +584,7 @@ public:
// to support scope-level randomization.
class VlStdRandomizer final {
// MEMBERS
VlRNG __Vm_rng;
VlRNG m_rng; // Random number generator
// PRIVATE METHODS
@ -595,7 +595,7 @@ public:
template <typename T>
bool basicStdRandomization(T& value, size_t width) {
value = VL_MASK_I(width) & VL_RANDOM_RNG_I(__Vm_rng);
value = VL_MASK_I(width) & VL_RANDOM_RNG_I(m_rng);
return true;
}
};

View File

@ -1309,7 +1309,7 @@ class RandomizeVisitor final : public VNVisitor {
V3UniqueNames m_inlineUniqueStdName{"__VStdrand"};
VMemberMap m_memberMap; // Member names cached for fast lookup
AstNodeModule* m_modp = nullptr; // Current module
std::map<AstNodeModule*, AstVar*> m_stdMap; // Map from module/class to AST Var
std::unordered_map<AstNodeModule*, AstVar*> m_stdMap; // Map from module/class to AST Var
const AstNodeFTask* m_ftaskp = nullptr; // Current function/task
AstNodeStmt* m_stmtp = nullptr; // Current statement
AstDynArrayDType* m_dynarrayDtp = nullptr; // Dynamic array type (for rand mode)