Skip to content

Commit e19f818

Browse files
committed
rsz: apply max_iterations on repair hold
Signed-off-by: Eder Monteiro <emrmonteiro@precisioninno.com>
1 parent 7b5802c commit e19f818

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

src/rsz/src/RepairHold.cc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ bool RepairHold::repairHold(
7171
// Max buffer count as percent of design instance count.
7272
const float max_buffer_percent,
7373
const int max_passes,
74+
int max_iterations,
7475
const bool verbose)
7576
{
7677
bool repaired = false;
@@ -100,6 +101,7 @@ bool RepairHold::repairHold(
100101
allow_setup_violations,
101102
max_buffer_count,
102103
max_passes,
104+
max_iterations,
103105
verbose);
104106
}
105107

@@ -135,6 +137,8 @@ void RepairHold::repairHold(const Pin* end_pin,
135137
allow_setup_violations,
136138
max_buffer_count,
137139
max_passes,
140+
// set max_iterations to max_passes for testing
141+
max_passes,
138142
false);
139143
}
140144
}
@@ -382,6 +386,7 @@ bool RepairHold::repairHold(VertexSeq& ends,
382386
const bool allow_setup_violations,
383387
const int max_buffer_count,
384388
const int max_passes,
389+
int max_iterations,
385390
const bool verbose)
386391
{
387392
bool repaired = false;
@@ -399,8 +404,8 @@ bool RepairHold::repairHold(VertexSeq& ends,
399404
printProgress(0, true, false);
400405
int pass = 1;
401406
while (worst_slack < hold_margin && progress && !resizer_->overMaxArea()
402-
&& inserted_buffer_count_ <= max_buffer_count
403-
&& pass <= max_passes) {
407+
&& inserted_buffer_count_ <= max_buffer_count && pass <= max_passes
408+
&& pass <= max_iterations) {
404409
if (verbose || pass == 1) {
405410
printProgress(pass, false, false);
406411
}

src/rsz/src/RepairHold.hh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class RepairHold : public sta::dbStaState
4646
// Max buffer count as percent of design instance count.
4747
float max_buffer_percent,
4848
int max_passes,
49+
int max_iterations,
4950
bool verbose);
5051
void repairHold(const Pin* end_pin,
5152
double setup_margin,
@@ -84,6 +85,7 @@ class RepairHold : public sta::dbStaState
8485
bool allow_setup_violations,
8586
int max_buffer_count,
8687
int max_passes,
88+
int max_iterations,
8789
bool verbose);
8890
void repairHoldPass(VertexSeq& hold_failures,
8991
LibertyCell* buffer_cell,

0 commit comments

Comments
 (0)