From 8b19d02e3b09c4b15008ff1e497f325bf037388c Mon Sep 17 00:00:00 2001 From: Krzysztof Bieganski Date: Mon, 5 Sep 2022 12:46:34 +0200 Subject: [PATCH] Fix `co_await VlNow{}` being added too many times (#3596) (or not at all) Signed-off-by: Krzysztof Bieganski --- src/V3SchedTiming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/V3SchedTiming.cpp b/src/V3SchedTiming.cpp index 5d22976ad..edffdaabc 100644 --- a/src/V3SchedTiming.cpp +++ b/src/V3SchedTiming.cpp @@ -264,7 +264,7 @@ void transformForks(AstNetlist* const netlistp) { // We can just pass it to the new function } else if (m_forkp->joinType().join()) { // If it's fork..join, we can refer to variables from the parent process - if (m_funcp->user1SetOnce()) { // Only do this once per function + if (!m_funcp->user1SetOnce()) { // Only do this once per function // Move all locals to the heap before the fork auto* const awaitp = new AstCAwait{ m_forkp->fileline(), new AstCStmt{m_forkp->fileline(), "VlNow{}"}};