diff --git a/src/V3Scope.cpp b/src/V3Scope.cpp index 0d597cb42..8b76a479d 100644 --- a/src/V3Scope.cpp +++ b/src/V3Scope.cpp @@ -290,6 +290,7 @@ class ScopeVisitor final : public VNVisitor { m_varScopes.emplace(std::make_pair(nodep, m_scopep), varscp); m_scopep->addVarsp(varscp); } + iterateChildren(nodep); } void visit(AstVarRef* nodep) override { // VarRef needs to point to VarScope diff --git a/test_regress/t/t_delay_var.v b/test_regress/t/t_delay_var.v index 6c0137758..e9382f469 100644 --- a/test_regress/t/t_delay_var.v +++ b/test_regress/t/t_delay_var.v @@ -17,8 +17,12 @@ module t; wire #PDLY d_param = in; initial begin - #2 in = 1'b0; + #2 in = 1'b1; #100; + if (d_const != 1) $stop; + if (d_int != 1) $stop; + if (d_real != 1) $stop; + if (d_param != 1) $stop; $write("*-* All Finished *-*\n"); $finish; end