Skip to content

Commit d79f67b

Browse files
committed
rsz: Fix and clean up size move preliminaries
Make sure we don't attempt to size an instance which isn't a standard cell. Also clean up the clone move condition. This condition looks to have been introduced in commit 533c037 as a workaround for undo limitations (mistakenly with flipped logic) and carried over to other places. Signed-off-by: Martin Povišer <[email protected]>
1 parent 1c8ae07 commit d79f67b

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/rsz/src/SizeDownMove.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ bool SizeDownMove::doMove(const Path* drvr_path,
123123
LibertyCell* load_cell = load_port->libertyCell();
124124
Instance* load_inst = network_->instance(load_pin);
125125

126-
if (resizer_->dontTouch(load_inst)) {
126+
if (resizer_->dontTouch(load_inst)
127+
|| !resizer_->isLogicStdCell(load_inst)) {
127128
continue;
128129
}
129130

src/rsz/src/SizeUpMove.cc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ bool SizeUpMove::doMove(const Path* drvr_path,
4444
Pin* in_pin = in_path->pin(sta_);
4545
LibertyPort* in_port = network_->libertyPort(in_pin);
4646

47-
// We always size the cloned gates for some reason, but it would be good if we
48-
// also down-sized here instead since we might want smaller original.
49-
if (!resizer_->dontTouch(drvr)
50-
|| resizer_->clone_move_->hasPendingMoves(drvr)) {
47+
if (!resizer_->dontTouch(drvr) && resizer_->isLogicStdCell(drvr)) {
5148
float prev_drive;
5249
if (drvr_index >= 2) {
5350
const int prev_drvr_index = drvr_index - 2;
@@ -120,9 +117,7 @@ bool SizeUpMatchMove::doMove(const Path* drvr_path,
120117
return false;
121118
}
122119

123-
// Also size cloned cells if possible
124-
if (!resizer_->dontTouch(drvr)
125-
|| resizer_->clone_move_->hasPendingMoves(drvr)) {
120+
if (!resizer_->dontTouch(drvr) && resizer_->isLogicStdCell(drvr)) {
126121
LibertyPort* drvr_port = network_->libertyPort(drvr_pin);
127122
if (drvr_port == nullptr) {
128123
return false;

src/rsz/src/VTSwapMove.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ bool VTSwapSpeedMove::isSwappable(const Path*& drvr_path,
9191
network_->pathName(drvr_pin));
9292
return false;
9393
}
94+
if (!resizer_->isLogicStdCell(drvr)) {
95+
debugMovePrint1("REJECT vt_swap {}: drvr instance is not a standard cell",
96+
network_->pathName(drvr_pin));
97+
return false;
98+
}
9499
LibertyPort* drvr_port = network_->libertyPort(drvr_pin);
95100
if (drvr_port == nullptr) {
96101
debugMovePrint1("REJECT vt_swap {}: drvr pin has no library port",

0 commit comments

Comments
 (0)