Skip to content

Commit f385fd8

Browse files
committed
repair_hold_violations progress criteria
1 parent 53ff70d commit f385fd8

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

src/OpenSTA

src/resizer/include/resizer/Resizer.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ protected:
274274
float slackGap(Vertex *vertex);
275275
void repairHoldViolations(VertexSet &ends,
276276
LibertyCell *buffer_cell);
277-
void repairHoldPass(VertexSet &ends,
278-
LibertyCell *buffer_cell);
277+
int repairHoldPass(VertexSet &ends,
278+
LibertyCell *buffer_cell);
279279
void sortFaninsByWeight(VertexWeightMap &weight_map,
280280
// Return value.
281281
VertexSeq &fanins);

src/resizer/src/Resizer.cc

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1114,22 +1114,23 @@ Resizer::repairHoldViolations(VertexSet &ends,
11141114
LibertyCell *buffer_cell)
11151115
{
11161116
inserted_buffer_count_ = 0;
1117-
Slack worst_slack, prev_slack;
1117+
Slack worst_slack;
11181118
Vertex *worst_vertex;
11191119
sta_->worstSlack(MinMax::min(), worst_slack, worst_vertex);
1120-
prev_slack = worst_slack * 2;
1120+
debugPrint1(debug_, "repair_hold", 1, "worst_slack=%s\n",
1121+
units_->timeUnit()->asString(worst_slack, 3));
1122+
int repair_count = 1;
11211123

11221124
int pass = 1;
11231125
while (worst_slack < 0.0
11241126
// Make sure we are making progress.
1125-
&& abs(worst_slack - prev_slack) > abs(prev_slack) * .001) {
1126-
debugPrint2(debug_, "repair_hold", 1, "pass %d worst_slack=%s\n",
1127-
pass,
1128-
units_->timeUnit()->asString(worst_slack, 3));
1129-
repairHoldPass(ends, buffer_cell);
1127+
&& repair_count > 0) {
1128+
debugPrint1(debug_, "repair_hold", 1, "pass %d\n", pass);
1129+
repair_count = repairHoldPass(ends, buffer_cell);
11301130
sta_->findRequireds();
1131-
prev_slack = worst_slack;
11321131
sta_->worstSlack(MinMax::min(), worst_slack, worst_vertex);
1132+
debugPrint1(debug_, "repair_hold", 1, "worst_slack=%s\n",
1133+
units_->timeUnit()->asString(worst_slack, 3));
11331134
pass++;
11341135
}
11351136
if (inserted_buffer_count_ > 0) {
@@ -1138,7 +1139,7 @@ Resizer::repairHoldViolations(VertexSet &ends,
11381139
}
11391140
}
11401141

1141-
void
1142+
int
11421143
Resizer::repairHoldPass(VertexSet &ends,
11431144
LibertyCell *buffer_cell)
11441145
{
@@ -1172,6 +1173,7 @@ Resizer::repairHoldPass(VertexSet &ends,
11721173
}
11731174
}
11741175
}
1176+
return repair_count;
11751177
}
11761178

11771179
void

0 commit comments

Comments
 (0)