Skip to content

Commit 5658785

Browse files
committed
nexus: Improve error reporting for illegal carry chains
Signed-off-by: gatecat <[email protected]>
1 parent 535709a commit 5658785

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

nexus/pack.cc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,8 +1318,14 @@ struct NexusPacker
13181318
CellInfo *ci = cell.second.get();
13191319
if (ci->type != id_CCU2)
13201320
continue;
1321-
if (ci->getPort(id_CIN) != nullptr)
1321+
NetInfo *cin = ci->getPort(id_CIN);
1322+
if (cin) {
1323+
if (cin->driver.cell && cin->driver.cell->type != id_CCU2) {
1324+
log_error("CCU2 '%s' CIN net '%s' driven by non-CCU2 cell '%s'.\n",
1325+
ctx->nameOf(ci), ctx->nameOf(cin), ctx->nameOf(cin->driver.cell));
1326+
}
13221327
continue;
1328+
}
13231329
roots.push_back(ci);
13241330
}
13251331
for (CellInfo *root : roots) {

0 commit comments

Comments
 (0)