From 4249ab7b98246180db361b340b43ccfe2053054a Mon Sep 17 00:00:00 2001 From: James Cherry Date: Wed, 10 Jun 2026 10:38:15 -0700 Subject: [PATCH] set sta_pocv_mode update delays/slews Signed-off-by: James Cherry --- graph/Graph.cc | 21 +++++---------------- include/sta/Graph.hh | 4 +--- search/Sta.cc | 8 +++++--- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/graph/Graph.cc b/graph/Graph.cc index 74996842..f19927ff 100644 --- a/graph/Graph.cc +++ b/graph/Graph.cc @@ -384,13 +384,6 @@ Graph::makeWireEdge(const Pin *from_pin, } } -void -Graph::makeSceneAfter() -{ - ap_count_ = dcalcAnalysisPtCount(); - initSlews(); -} - //////////////////////////////////////////////////////////////// Vertex * @@ -782,17 +775,13 @@ Graph::removeDelayAnnotated(Edge *edge) //////////////////////////////////////////////////////////////// -// This only gets called if the analysis type changes from single -// to bc_wc/ocv or visa versa. void -Graph::setDelayCount(DcalcAPIndex ap_count) +Graph::delayCountChanged() { - if (ap_count != ap_count_) { - // Discard any existing delays. - removePeriodCheckAnnotations(); - ap_count_ = ap_count; - initSlews(); - } + ap_count_ = dcalcAnalysisPtCount(); + // Discard any existing delays. + removePeriodCheckAnnotations(); + initSlews(); } void diff --git a/include/sta/Graph.hh b/include/sta/Graph.hh index a3553048..572d95a7 100644 --- a/include/sta/Graph.hh +++ b/include/sta/Graph.hh @@ -63,8 +63,7 @@ public: void makeGraph(); ~Graph() override; - // Number of arc delays and slews from sdf or delay calculation. - void setDelayCount(DcalcAPIndex ap_count); + void delayCountChanged(); size_t slewCount(); // Vertex functions. @@ -178,7 +177,6 @@ public: // Remove all delay and slew annotations. void removeDelaySlewAnnotations(); VertexSet ®ClkVertices() { return reg_clk_vertices_; } - void makeSceneAfter(); static constexpr int vertex_level_bits = 24; static constexpr int vertex_level_max = (1<deletePathGroups(); if (graph_) - graph_->setDelayCount(dcalcAnalysisPtCount()); + graph_->delayCountChanged(); } } @@ -2311,6 +2311,8 @@ Sta::setPocvMode(PocvMode mode) } updateComponentsState(); delaysInvalid(); + if (graph_) + graph_->delayCountChanged(); } } @@ -2554,7 +2556,7 @@ Sta::makeScenes(const StringSeq &scene_names) cmd_scene_ = scenes_[0]; updateComponentsState(); if (graph_) - graph_->makeSceneAfter(); + graph_->delayCountChanged(); } void @@ -2583,7 +2585,7 @@ Sta::makeScene(const std::string &name, Scene *scene = makeScene(name, mode, parasitics_min, parasitics_max); updateComponentsState(); if (graph_) - graph_->makeSceneAfter(); + graph_->delayCountChanged(); updateSceneLiberty(scene, liberty_min_files, liberty_max_files); cmd_scene_ = scene; }