Skip to content

Commit e0b466c

Browse files
authored
Merge pull request #8172 from The-OpenROAD-Project-staging/rsz-skip-swap
rsz: skip swapping pins on cells with pins other than input/output
2 parents d97df48 + d91f23f commit e0b466c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/rsz/src/SwapPinsMove.cc

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,16 @@ void SwapPinsMove::equivCellPins(const LibertyCell* cell,
205205
// count number of output ports.
206206
while (port_iter.hasNext()) {
207207
LibertyPort* port = port_iter.next();
208-
if (port->direction()->isOutput()) {
208+
sta::PortDirection* direction = port->direction();
209+
if (direction->isOutput()) {
209210
++outputs;
210-
} else {
211+
} else if (direction->isInput()) {
211212
++inputs;
213+
} else if (direction->isPower() || direction->isGround()) {
214+
// skip
215+
} else {
216+
ports.clear();
217+
return; // reject tristate/internal/bidirect/unknown cases
212218
}
213219
}
214220

0 commit comments

Comments
 (0)