Fix MULTIDRIVENPROC on static loop induction variables (#8242)

Disable MULTIDRIVENPROC for static variables used as loop induction
variables. Same way as we disable similar warning in Dfg. While bad
style and bad for performance, it's common legacy code style.
This commit is contained in:
Geza Lore
2026-08-28 15:27:50 +02:00
committed by GitHub
parent 1ad9acd22e
commit c64afda7fc
7 changed files with 102 additions and 22 deletions
+1 -1
View File
@@ -691,7 +691,7 @@ class UndrivenVisitor final : public VNVisitorConst {
}
warnClockingDriven(nodep, entryp, otherWritep, otherWriteIsStaticInit);
}
if (multidrivenCommon
if (multidrivenCommon && !nodep->varp()->isUsedLoopIdx()
&& !nodep->varp()->fileline()->warnIsOff(V3ErrorCode::MULTIDRIVENPROC)) {
// Two plain always blocks driving the whole signal: legal
// SystemVerilog, but a driver conflict for synthesis. The