mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 01:54:01 +02:00
Fix array trace splitting (#5549)
This commit is contained in:
+7
-1
@@ -708,7 +708,13 @@ class TraceVisitor final : public VNVisitor {
|
||||
// Track splitting due to size
|
||||
UASSERT_OBJ(incFulp->nodeCount() == incChgp->nodeCount(), declp,
|
||||
"Should have equal cost");
|
||||
subStmts += incChgp->nodeCount();
|
||||
const VNumRange range = declp->arrayRange();
|
||||
if (range.ranged()) {
|
||||
// 2x because each element is a TraceInc and a VarRef
|
||||
subStmts += range.elements() * 2;
|
||||
} else {
|
||||
subStmts += incChgp->nodeCount();
|
||||
}
|
||||
|
||||
// Track partitioning
|
||||
nCodes += declp->codeInc();
|
||||
|
||||
Reference in New Issue
Block a user