Skip to content

Commit 15605e3

Browse files
committed
repair_hold_violations try harder
1 parent 4ae84e2 commit 15605e3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/resizer/src/Resizer.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,18 +1114,21 @@ Resizer::repairHoldViolations(VertexSet &ends,
11141114
LibertyCell *buffer_cell)
11151115
{
11161116
inserted_buffer_count_ = 0;
1117-
Slack worst_slack;
1117+
Slack worst_slack, prev_slack;
11181118
Vertex *worst_vertex;
11191119
sta_->worstSlack(MinMax::min(), worst_slack, worst_vertex);
1120+
prev_slack = worst_slack * 2;
11201121

11211122
int pass = 1;
11221123
while (worst_slack < 0.0
1123-
&& pass < 10) {
1124+
// Make sure we are making progress.
1125+
&& abs(worst_slack - prev_slack) > abs(prev_slack) * .001) {
11241126
debugPrint2(debug_, "repair_hold", 1, "pass %d worst_slack=%s\n",
11251127
pass,
11261128
units_->timeUnit()->asString(worst_slack, 3));
11271129
repairHoldPass(ends, buffer_cell);
11281130
sta_->findRequireds();
1131+
prev_slack = worst_slack;
11291132
sta_->worstSlack(MinMax::min(), worst_slack, worst_vertex);
11301133
pass++;
11311134
}

0 commit comments

Comments
 (0)