mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
This commit is contained in:
@@ -39,6 +39,7 @@ class LinkLValueVisitor final : public VNVisitor {
|
||||
bool m_setStrengthSpecified = false; // Set that var has assignment with strength specified.
|
||||
bool m_inFunc = false; // Set if inside AstNodeFTask
|
||||
bool m_inInitialStatic = false; // Set if inside AstInitialStatic
|
||||
bool m_inInitialStaticStmt = false; // Set if inside AstInitialStaticStmt
|
||||
VAccess m_setRefLvalue; // Set VarRefs to lvalues for pin assignments
|
||||
|
||||
// VISITORS
|
||||
@@ -113,7 +114,7 @@ class LinkLValueVisitor final : public VNVisitor {
|
||||
iterateAndNextNull(nodep->rhsp());
|
||||
}
|
||||
|
||||
if (m_inInitialStatic && m_inFunc) {
|
||||
if ((m_inInitialStatic || m_inInitialStaticStmt) && m_inFunc) {
|
||||
const bool rhsHasIO = nodep->rhsp()->exists([](const AstNodeVarRef* const refp) {
|
||||
// Exclude module I/O referenced from a function/task.
|
||||
return refp->varp() && refp->varp()->isIO()
|
||||
@@ -147,6 +148,11 @@ class LinkLValueVisitor final : public VNVisitor {
|
||||
m_inInitialStatic = true;
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstInitialStaticStmt* nodep) override {
|
||||
VL_RESTORER(m_inInitialStaticStmt);
|
||||
m_inInitialStaticStmt = true;
|
||||
iterateChildren(nodep);
|
||||
}
|
||||
void visit(AstRelease* nodep) override {
|
||||
VL_RESTORER(m_setRefLvalue);
|
||||
VL_RESTORER(m_setContinuously);
|
||||
|
||||
Reference in New Issue
Block a user