From 112faf3ed7bdcd74c10f741335ea22f6e08aae03 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Wed, 2 Aug 2023 13:11:09 -0700 Subject: [PATCH] report_checks -fields fanout does not report on net field Signed-off-by: James Cherry --- doc/ChangeLog.txt | 3 +++ include/sta/Sta.hh | 3 ++- search/ReportPath.cc | 18 +++++++++++------- search/ReportPath.hh | 3 ++- search/Sta.cc | 5 +++-- tcl/Search.tcl | 11 +++++++---- tcl/StaTcl.i | 6 ++++-- 7 files changed, 32 insertions(+), 17 deletions(-) diff --git a/doc/ChangeLog.txt b/doc/ChangeLog.txt index b0777737..fea53e71 100644 --- a/doc/ChangeLog.txt +++ b/doc/ChangeLog.txt @@ -21,6 +21,9 @@ The read_liberty command latch inference (see OpenSTA.pdf) is now disabled by de The -no_latch_infer flag is deprecated. To enable latch inference, use the -infer_latches flag. +The report fanout and capacitance fields are now shown on output pin lines rather +than net lines. + Release 2.3.3 2022/09/24 ------------------------- diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index d2c87c93..ae3125c1 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -889,7 +889,8 @@ public: void setReportPathFields(bool report_input_pin, bool report_net, bool report_cap, - bool report_slew); + bool report_slew, + bool report_fanout); ReportField *findReportPathField(const char *name); void setReportPathDigits(int digits); void setReportPathNoSplit(bool no_split); diff --git a/search/ReportPath.cc b/search/ReportPath.cc index 01fb3816..693651c8 100644 --- a/search/ReportPath.cc +++ b/search/ReportPath.cc @@ -122,7 +122,7 @@ ReportPath::ReportPath(StaState *sta) : { setDigits(2); makeFields(); - setReportFields(false, false, false, false); + setReportFields(false, false, false, false, false); } ReportPath::~ReportPath() @@ -224,7 +224,8 @@ void ReportPath::setReportFields(bool report_input_pin, bool report_net, bool report_cap, - bool report_slew) + bool report_slew, + bool report_fanout) { report_input_pin_ = report_input_pin; report_net_ = report_net; @@ -232,6 +233,7 @@ ReportPath::setReportFields(bool report_input_pin, field_fanout_->setEnabled(report_net_); field_capacitance_->setEnabled(report_cap); field_slew_->setEnabled(report_slew); + field_fanout_->setEnabled(report_fanout); // for debug field_case_->setEnabled(false); } @@ -2648,13 +2650,16 @@ ReportPath::reportPath5(const Path *path, && !prev_arc->role()->isWire())) { bool is_driver = network_->isDriver(pin); float cap = field_blank_; + float fanout = field_blank_; // Don't show capacitance field for input pins. if (is_driver && field_capacitance_->enabled()) cap = loadCap(pin, rf, dcalc_ap); + // Don't show fanout field for input pins. + if (is_driver && field_fanout_->enabled()) + fanout = drvrFanout(vertex, dcalc_ap->corner(), min_max); auto what = descriptionField(vertex); if (report_net_ && is_driver) { - // Capacitance field is reported on the net line. - reportLine(what.c_str(), field_blank_, slew, field_blank_, + reportLine(what.c_str(), cap, slew, fanout, incr, time, false, min_max, rf, line_case); string what2; if (network_->isTopLevelPort(pin)) { @@ -2671,13 +2676,12 @@ ReportPath::reportPath5(const Path *path, else what2 = "(unconnected)"; } - float fanout = drvrFanout(vertex, dcalc_ap->corner(), min_max); - reportLine(what2.c_str(), cap, field_blank_, fanout, + reportLine(what2.c_str(), field_blank_, field_blank_, field_blank_, field_blank_, field_blank_, false, min_max, nullptr, line_case); } else - reportLine(what.c_str(), cap, slew, field_blank_, + reportLine(what.c_str(), cap, slew, fanout, incr, time, false, min_max, rf, line_case); prev_time = time; } diff --git a/search/ReportPath.hh b/search/ReportPath.hh index 9efc68e1..389513ce 100644 --- a/search/ReportPath.hh +++ b/search/ReportPath.hh @@ -43,7 +43,8 @@ public: void setReportFields(bool report_input_pin, bool report_net, bool report_cap, - bool report_slew); + bool report_slew, + bool report_fanout); int digits() const { return digits_; } void setDigits(int digits); void setNoSplit(bool no_split); diff --git a/search/Sta.cc b/search/Sta.cc index 59484526..e2ac0484 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -2506,10 +2506,11 @@ void Sta::setReportPathFields(bool report_input_pin, bool report_net, bool report_cap, - bool report_slew) + bool report_slew, + bool report_fanout) { report_path_->setReportFields(report_input_pin, report_net, report_cap, - report_slew); + report_slew, report_fanout); } ReportField * diff --git a/tcl/Search.tcl b/tcl/Search.tcl index 87d20af3..c183bc49 100644 --- a/tcl/Search.tcl +++ b/tcl/Search.tcl @@ -898,17 +898,20 @@ proc parse_report_path_options { cmd args_var default_format set report_input_pin [expr [lsearch $fields "input*"] != -1] set report_cap [expr [lsearch $fields "cap*"] != -1] set report_net [expr [lsearch $fields "net*"] != -1] - # transition_time - compatibility 06/24/2019 - set report_slew [expr [lsearch $fields "slew*"] != -1 \ - || [lsearch $fields "trans*"] != -1] + set report_slew [expr [lsearch $fields "slew*"] != -1] + set report_fanout [expr [lsearch $fields "fanout*"] != -1] + if { [expr [lsearch $fields "trans*"] != -1] } { + sta_warn 1640 "The transition_time field is deprecated. Use slew instead." + } } else { set report_input_pin 0 set report_cap 0 set report_net 0 set report_slew 0 + set report_fanout 0 } set_report_path_fields $report_input_pin $report_net \ - $report_cap $report_slew + $report_cap $report_slew $report_fanout set_report_path_no_split [info exists path_options(-no_line_splits)] } diff --git a/tcl/StaTcl.i b/tcl/StaTcl.i index 1415b96a..e592b660 100644 --- a/tcl/StaTcl.i +++ b/tcl/StaTcl.i @@ -4343,12 +4343,14 @@ void set_report_path_fields(bool report_input_pin, bool report_net, bool report_cap, - bool report_slew) + bool report_slew, + bool report_fanout) { Sta::sta()->setReportPathFields(report_input_pin, report_net, report_cap, - report_slew); + report_slew, + report_fanout); } void