Skip to content

Commit 3da73a5

Browse files
authored
Merge pull request #6696 from The-OpenROAD-Project-staging/rsz-rpt-area-timing
rsz: add area growth column to repair_timing -verbose
2 parents d97a288 + 7266adf commit 3da73a5

20 files changed

+2317
-2301
lines changed

src/rsz/src/RepairHold.cc

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ void RepairHold::init()
8383
logger_ = resizer_->logger_;
8484
dbStaState::init(resizer_->sta_);
8585
db_network_ = resizer_->db_network_;
86+
initial_design_area_ = resizer_->computeDesignArea();
8687
}
8788

8889
bool RepairHold::repairHold(
@@ -750,11 +751,11 @@ void RepairHold::printProgress(int iteration, bool force, bool end) const
750751

751752
if (start) {
752753
logger_->report(
753-
"Iteration | Resized | Buffers | Cloned Gates | WNS | TNS | "
754-
"Endpoint");
754+
"Iteration | Resized | Buffers | Cloned Gates | Area | WNS "
755+
"| TNS | Endpoint");
755756
logger_->report(
756757
"----------------------------------------------------------------------"
757-
"-----");
758+
"----------------");
758759
}
759760

760761
if (iteration % print_interval_ == 0 || force || end) {
@@ -768,12 +769,17 @@ void RepairHold::printProgress(int iteration, bool force, bool end) const
768769
itr_field = "final";
769770
}
770771

772+
const double design_area = resizer_->computeDesignArea();
773+
const double area_growth = design_area - initial_design_area_;
774+
771775
logger_->report(
772-
"{: >9s} | {: >7d} | {: >7d} | {: >12d} | {: >7s} | {: >7s} | {}",
776+
"{: >9s} | {: >7d} | {: >7d} | {: >12d} | {: >+7.1f}% | {: >7s} | {: "
777+
">7s} | {}",
773778
itr_field,
774779
resize_count_,
775780
inserted_buffer_count_,
776781
cloned_gate_count_,
782+
area_growth / initial_design_area_ * 1e3,
777783
delayAsString(wns, sta_, 3),
778784
delayAsString(tns, sta_, 3),
779785
worst_vertex->name(network_));
@@ -782,7 +788,7 @@ void RepairHold::printProgress(int iteration, bool force, bool end) const
782788
if (end) {
783789
logger_->report(
784790
"----------------------------------------------------------------------"
785-
"-----");
791+
"----------------");
786792
}
787793
}
788794

src/rsz/src/RepairHold.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ class RepairHold : public sta::dbStaState
133133
int cloned_gate_count_ = 0;
134134
int swap_pin_count_ = 0;
135135
int removed_buffer_count_ = 0;
136+
double initial_design_area_ = 0;
136137
const MinMax* min_ = MinMax::min();
137138
const MinMax* max_ = MinMax::max();
138139
const int min_index_ = MinMax::minIndex();

src/rsz/src/RepairSetup.cc

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ void RepairSetup::init()
8585
logger_ = resizer_->logger_;
8686
dbStaState::init(resizer_->sta_);
8787
db_network_ = resizer_->db_network_;
88+
initial_design_area_ = resizer_->computeDesignArea();
8889
}
8990

9091
bool RepairSetup::repairSetup(const float setup_slack_margin,
@@ -1809,13 +1810,13 @@ void RepairSetup::printProgress(const int iteration,
18091810
if (start && !end) {
18101811
logger_->report(
18111812
" Iter | Removed | Resized | Inserted | Cloned | Pin |"
1812-
" WNS | TNS | Viol | Worst");
1813+
" Area | WNS | TNS | Viol | Worst");
18131814
logger_->report(
18141815
" | Buffers | Gates | Buffers | Gates | Swaps |"
1815-
" | | Endpts | Endpt");
1816+
" | | | Endpts | Endpt");
18161817
logger_->report(
18171818
"-----------------------------------------------------------"
1818-
"----------------------------------------");
1819+
"---------------------------------------------------");
18191820
}
18201821

18211822
if (iteration % print_interval_ == 0 || force || end) {
@@ -1830,15 +1831,19 @@ void RepairSetup::printProgress(const int iteration,
18301831
itr_field = "final";
18311832
}
18321833

1834+
const double design_area = resizer_->computeDesignArea();
1835+
const double area_growth = design_area - initial_design_area_;
1836+
18331837
logger_->report(
1834-
"{: >9s} | {: >7d} | {: >7d} | {: >8d} | {: >6d} | {: >5d} | {: >8s} "
1835-
"| {: >10s} | {: >6d} | {}",
1838+
"{: >9s} | {: >7d} | {: >7d} | {: >8d} | {: >6d} | {: >5d} "
1839+
"| {: >+7.1f}% | {: >8s} | {: >10s} | {: >6d} | {}",
18361840
itr_field,
18371841
removed_buffer_count_,
18381842
resize_count_,
18391843
inserted_buffer_count_ + split_load_buffer_count_ + rebuffer_net_count_,
18401844
cloned_gate_count_,
18411845
swap_pin_count_,
1846+
area_growth / initial_design_area_ * 1e3,
18421847
delayAsString(wns, sta_, 3),
18431848
delayAsString(tns, sta_, 1),
18441849
max(0, num_viols),
@@ -1848,7 +1853,7 @@ void RepairSetup::printProgress(const int iteration,
18481853
if (end) {
18491854
logger_->report(
18501855
"-----------------------------------------------------------"
1851-
"----------------------------------------");
1856+
"---------------------------------------------------");
18521857
}
18531858
}
18541859

src/rsz/src/RepairSetup.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ class RepairSetup : public sta::dbStaState
254254
int cloned_gate_count_ = 0;
255255
int swap_pin_count_ = 0;
256256
int removed_buffer_count_ = 0;
257+
double initial_design_area_ = 0;
257258
// Map to block pins from being swapped more than twice for the
258259
// same instance.
259260
std::unordered_set<const sta::Instance*> swap_pin_inst_set_;

src/rsz/src/Resizer.i

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,12 @@ repair_setup(double setup_margin,
521521
double repair_tns_end_percent,
522522
int max_passes,
523523
int max_repairs_per_pass,
524-
bool match_cell_footprint, bool verbose,
525-
bool skip_pin_swap, bool skip_gate_cloning,
526-
bool skip_buffering, bool skip_buffer_removal,
524+
bool match_cell_footprint,
525+
bool verbose,
526+
bool skip_pin_swap,
527+
bool skip_gate_cloning,
528+
bool skip_buffering,
529+
bool skip_buffer_removal,
527530
bool skip_last_gasp)
528531
{
529532
ensureLinked();

0 commit comments

Comments
 (0)