Fix swerv issues with Increment nodes (#2380)

This commit is contained in:
Tomasz Gorochowik 2020-05-29 19:03:04 +02:00 committed by GitHub
parent 460315128b
commit a4a1c7a384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 0 deletions

View File

@ -124,6 +124,14 @@ private:
iterateChildren(nodep); iterateChildren(nodep);
m_insStmtp = NULL; // Next thing should be new statement m_insStmtp = NULL; // Next thing should be new statement
} }
virtual void visit(AstNodeBlock* nodep) VL_OVERRIDE {
AstNode* insStmtp_prev = m_insStmtp;
{
m_insStmtp = NULL;
iterateChildren(nodep);
}
m_insStmtp = insStmtp_prev;
}
void unsupported_visit(AstNode* nodep) { void unsupported_visit(AstNode* nodep) {
m_unsupportedHere = true; m_unsupportedHere = true;
UINFO(9, "Marking unsupported " << nodep << endl); UINFO(9, "Marking unsupported " << nodep << endl);

View File

@ -107,6 +107,14 @@ module t (/*AUTOARG*/
if (i !== 4) $stop; if (i !== 4) $stop;
if (val !== 4) $stop; if (val !== 4) $stop;
pos = 0;
if (1 == 1) begin
pos++;
end
if (pos != 1) $stop;
$write("*-* All Finished *-*\n"); $write("*-* All Finished *-*\n");
$finish; $finish;