mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix $finish inside fork blocks (#6555)
Signed-off-by: Bartłomiej Chmiel <[email protected]>
This commit is contained in:
+4
-1
@@ -441,7 +441,10 @@ class LinkJumpVisitor final : public VNVisitor {
|
||||
void visit(AstFinish* nodep) override {
|
||||
if (nodep->user1SetOnce()) return; // Process once
|
||||
iterateChildren(nodep);
|
||||
if (m_loopp) {
|
||||
if (m_inFork) {
|
||||
nodep->replaceWith(new AstFinishFork{nodep->fileline()});
|
||||
VL_DO_DANGLING(nodep->deleteTree(), nodep);
|
||||
} else if (m_loopp) {
|
||||
// Jump to the end of the loop (post-finish)
|
||||
AstJumpBlock* const blockp = getJumpBlock(m_loopp, false);
|
||||
nodep->addNextHere(new AstJumpGo{nodep->fileline(), blockp});
|
||||
|
||||
Reference in New Issue
Block a user