Skip to content

Commit 50c35f6

Browse files
committed
limited sizeup match to single fanouts only
Signed-off-by: Cho Moon <cmoon@precisioninno.com>
1 parent 96fa1ed commit 50c35f6

File tree

8 files changed

+610
-634
lines changed

8 files changed

+610
-634
lines changed

src/rsz/src/SizeUpMove.cc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include "CloneMove.hh"
1111
#include "sta/ArcDelayCalc.hh"
1212
#include "sta/Delay.hh"
13+
#include "sta/Graph.hh"
1314
#include "sta/Liberty.hh"
1415
#include "sta/NetworkClass.hh"
1516
#include "sta/Path.hh"
@@ -35,6 +36,7 @@ using sta::PathExpanded;
3536
using sta::Pin;
3637
using sta::Slack;
3738
using sta::Slew;
39+
using sta::VertexOutEdgeIterator;
3840

3941
bool SizeUpMove::doMove(const Path* drvr_path,
4042
int drvr_index,
@@ -140,11 +142,26 @@ bool SizeUpMatchMove::doMove(const Path* drvr_path,
140142
if (prev_drvr_pin == nullptr) {
141143
return false;
142144
}
145+
Vertex* prev_drvr_vertex = graph_->pinDrvrVertex(prev_drvr_pin);
146+
if (prev_drvr_vertex == nullptr) {
147+
return false;
148+
}
149+
// Skip if the previous driver has multi fanout
150+
int fanout = 0;
151+
VertexOutEdgeIterator edge_iter(prev_drvr_vertex, graph_);
152+
while (edge_iter.hasNext()) {
153+
(void) edge_iter.next();
154+
fanout++;
155+
if (fanout > 1) {
156+
return false;
157+
}
158+
}
159+
143160
LibertyPort* prev_drvr_port = network_->libertyPort(prev_drvr_pin);
144161
if (prev_drvr_port == nullptr) {
145162
return false;
146163
}
147-
const LibertyCell* prev_cell = prev_drvr_port->libertyCell();
164+
LibertyCell* prev_cell = prev_drvr_port->libertyCell();
148165
if (prev_cell == nullptr) {
149166
return false;
150167
}

src/rsz/test/repair_fanout6.ok

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ fanout1/X 20 20 0 (MET)
2525
| Buffers | Gates | Buffers | Gates | Swaps | | | | Endpts | Endpt
2626
--------------------------------------------------------------------------------------------------------------
2727
0 | 0 | 0 | 0 | 0 | 0 | +0.0% | -32.280 | -188759.2 | 8000 | sink7689/D
28-
final | 0 | 232 | 28 | 0 | 0 | +0.3% | -5.818 | -11716.7 | 5340 | sink7534/D
28+
final | 0 | 232 | 28 | 0 | 0 | +0.3% | -5.740 | -11564.6 | 5340 | sink7534/D
2929
--------------------------------------------------------------------------------------------------------------
3030
[INFO RSZ-0040] Inserted 28 buffers.
31-
[INFO RSZ-0051] Resized 232 instances: 231 up, 1 up match, 0 down, 0 VT
31+
[INFO RSZ-0051] Resized 232 instances: 232 up, 0 up match, 0 down, 0 VT
3232
[WARNING RSZ-0062] Unable to repair all setup violations.
33-
worst slack max -5.82
33+
worst slack max -5.74

src/rsz/test/repair_fanout7.ok

Lines changed: 168 additions & 168 deletions
Large diffs are not rendered by default.

src/rsz/test/repair_fanout7_multi.ok

Lines changed: 133 additions & 143 deletions
Large diffs are not rendered by default.

src/rsz/test/repair_fanout7_skip_pin_swap.ok

Lines changed: 135 additions & 151 deletions
Large diffs are not rendered by default.

src/rsz/test/repair_fanout8.ok

Lines changed: 70 additions & 76 deletions
Large diffs are not rendered by default.

src/rsz/test/repair_fanout8_multi.ok

Lines changed: 81 additions & 90 deletions
Large diffs are not rendered by default.

src/rsz/test/repair_setup4_sequence.ok

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ tns max -6.294
1313
| Buffers | Gates | Buffers | Gates | Swaps | | | | Endpts | Endpt
1414
--------------------------------------------------------------------------------------------------------------
1515
0 | 0 | 0 | 0 | 0 | 0 | +0.0% | -1.954 | -6.3 | 6 | r2/D
16-
final | 5 | 13 | 7 | 0 | 0 | +20.1% | -0.326 | -1.8 | 6 | r7/D
16+
final | 5 | 11 | 7 | 0 | 0 | +20.1% | -0.326 | -1.8 | 6 | r7/D
1717
--------------------------------------------------------------------------------------------------------------
1818
[INFO RSZ-0059] Removed 5 buffers.
1919
[INFO RSZ-0040] Inserted 7 buffers.
20-
[INFO RSZ-0051] Resized 13 instances: 11 up, 2 up match, 0 down, 0 VT
20+
[INFO RSZ-0051] Resized 11 instances: 11 up, 0 up match, 0 down, 0 VT
2121
[WARNING RSZ-0062] Unable to repair all setup violations.
2222
Repair timing output passed/skipped equivalence test
2323
worst slack max -0.33

0 commit comments

Comments
 (0)