Signed-off-by: Igor Zaworski <izaworski@internships.antmicro.com>
This commit is contained in:
Igor Zaworski 2025-12-10 14:42:13 +01:00
parent 1034c3c41c
commit 257bc8005d
1 changed files with 7 additions and 7 deletions

View File

@ -169,7 +169,7 @@ private:
void visit(AstNodeIf* nodep) override {
unsupportedWriteToVirtIface(nodep->condp(), "if condition");
iterateAndNextNull(nodep->condp());
bool hasTimeingControl;
bool hasTimingControl;
{
VL_RESTORER(m_trigAssignp);
VL_RESTORER(m_trigAssignIfacep);
@ -177,7 +177,7 @@ private:
VL_RESTORER(m_hasTimingControl);
m_hasTimingControl = false;
iterateAndNextNull(nodep->thensp());
hasTimeingControl = m_hasTimingControl;
hasTimingControl = m_hasTimingControl;
}
{
VL_RESTORER(m_trigAssignp);
@ -186,9 +186,9 @@ private:
VL_RESTORER(m_hasTimingControl);
m_hasTimingControl = false;
iterateAndNextNull(nodep->elsesp());
hasTimeingControl |= m_hasTimingControl;
hasTimingControl |= m_hasTimingControl;
}
if (hasTimeingControl) {
if (hasTimingControl) {
// Clear the trigger assignment, as there could have been timing controls in either
// branch
m_trigAssignp = nullptr;
@ -200,7 +200,7 @@ private:
void visit(AstLoop* nodep) override {
UASSERT_OBJ(!nodep->contsp(), nodep, "'contsp' only used before LinkJump");
iterateAndNextNull(nodep->contsp());
bool hasTimeingControl;
bool hasTimingControl;
{
VL_RESTORER(m_trigAssignp);
VL_RESTORER(m_trigAssignIfacep);
@ -208,9 +208,9 @@ private:
VL_RESTORER(m_hasTimingControl);
m_hasTimingControl = false;
iterateAndNextNull(nodep->stmtsp());
hasTimeingControl = m_hasTimingControl;
hasTimingControl = m_hasTimingControl;
}
if (hasTimeingControl) {
if (hasTimingControl) {
// Clear the trigger assignment, as there could have been timing controls in the loop
m_trigAssignp = nullptr;
m_trigAssignIfacep = nullptr;