mirror of
https://github.com/verilator/verilator.git
synced 2026-09-02 02:38:15 +02:00
Fix $random not updating seed (#3238). [Julie Schwartz]
This commit is contained in:
@@ -183,6 +183,13 @@ private:
|
||||
VL_RESTORER(m_setRefLvalue);
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
virtual void visit(AstRand* nodep) override {
|
||||
VL_RESTORER(m_setRefLvalue);
|
||||
{
|
||||
if (!nodep->urandom()) m_setRefLvalue = VAccess::WRITE;
|
||||
iterateAndNextNull(nodep->seedp());
|
||||
}
|
||||
}
|
||||
virtual void visit(AstReadMem* nodep) override {
|
||||
VL_RESTORER(m_setRefLvalue);
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user