Internals: Create if statements for triggers during scheduling (#6280) (#6581)

The AstIf nodes conditional on events being triggered used to be created
in V3Clock. Now it is in V3Sched*, in order to avoid having to pass
AstActive in CFunc or MTask bodies. No functional change intended, some
improved optimization due to simplifying timing triggers that were
previously missed, also fixes what seems like a bug in the original
timing commit code.
This commit is contained in:
Geza Lore
2025-10-27 10:41:30 +00:00
committed by GitHub
parent 6ec5c85bea
commit 60c532908e
10 changed files with 100 additions and 133 deletions
+5 -7
View File
@@ -137,15 +137,13 @@ AstCFunc* V3Order::order(AstNetlist* netlistp, //
processDomains(netlistp, *graph, tag, externalDomains);
if (parallel) {
// Construct the parallel ExecGraph
AstExecGraph* const execGraphp = createParallel(*graph, tag, trigToSen, slow);
// Add the ExecGraph to the result function.
funcp->addStmtsp(execGraphp);
// Construct the parallel code
AstNodeStmt* const stmtsp = createParallel(*graph, tag, trigToSen, slow);
funcp->addStmtsp(stmtsp);
} else {
// Construct the serial code
const std::vector<AstActive*> activeps = createSerial(*graph, tag, trigToSen, slow);
// Add the resulting Active blocks to the result function
for (AstNode* const nodep : activeps) funcp->addStmtsp(nodep);
AstNodeStmt* const stmtsp = createSerial(*graph, tag, trigToSen, slow);
funcp->addStmtsp(stmtsp);
}
// Dump data