From f586c53935ae7390dc6c257ffbf08f79e8bac05f Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 31 May 2022 21:56:11 -0700 Subject: [PATCH] Sta::worstSlack Signed-off-by: James Cherry --- include/sta/Sta.hh | 1 + search/Sta.cc | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index 08dd5836..8ff4a228 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -956,6 +956,7 @@ public: const MinMax *min_max); // Worst endpoint slack and vertex. // Incrementally updated. + Slack worstSlack(const MinMax *min_max); void worstSlack(const MinMax *min_max, // Return values. Slack &worst_slack, diff --git a/search/Sta.cc b/search/Sta.cc index e686a0b0..5d816b59 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -3206,6 +3206,16 @@ Sta::totalNegativeSlack(const Corner *corner, return search_->totalNegativeSlack(corner, min_max); } +Slack +Sta::worstSlack(const MinMax *min_max) +{ + searchPreamble(); + Slack worst_slack; + Vertex *worst_vertex; + search_->worstSlack(min_max, worst_slack, worst_vertex); + return worst_slack; +} + void Sta::worstSlack(const MinMax *min_max, // Return values. @@ -3213,7 +3223,7 @@ Sta::worstSlack(const MinMax *min_max, Vertex *&worst_vertex) { searchPreamble(); - return search_->worstSlack(min_max, worst_slack, worst_vertex); + search_->worstSlack(min_max, worst_slack, worst_vertex); } void