From 0e757e780337ac67acf29245cc43c5fcc7a8ee44 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Wed, 12 Apr 2023 17:30:04 -0700 Subject: [PATCH 1/2] delete pin after exception -thru net Signed-off-by: James Cherry --- sdc/ExceptionPath.cc | 4 +++- sdc/Sdc.cc | 30 ++++++++++++++++++------------ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/sdc/ExceptionPath.cc b/sdc/ExceptionPath.cc index 78678649..d04946ff 100644 --- a/sdc/ExceptionPath.cc +++ b/sdc/ExceptionPath.cc @@ -1487,7 +1487,9 @@ ExceptionThru::deletePinEdges(const Pin *pin, } else { // erase prevents range iteration. - for (const EdgePins &edge_pins : *edges_) { + EdgePinsSet::Iterator edge_iter(edges_); + while (edge_iter.hasNext()) { + const EdgePins &edge_pins = edge_iter.next(); if (edge_pins.first == pin || edge_pins.second == pin) { edges_->erase(edge_pins); diff --git a/sdc/Sdc.cc b/sdc/Sdc.cc index 9cdbb63a..2cf82c33 100644 --- a/sdc/Sdc.cc +++ b/sdc/Sdc.cc @@ -5663,12 +5663,15 @@ Sdc::connectPinAfter(const Pin *pin) PinSet *drvrs = network_->drivers(pin); for (ExceptionPath *exception : exceptions_) { ExceptionPt *first_pt = exception->firstPt(); - for (ExceptionThru *thru : *exception->thrus()) { - if (thru->edges()) { - thru->connectPinAfter(drvrs, network_); - if (first_pt == thru) - recordExceptionEdges(exception, thru->edges(), - first_thru_edge_exceptions_); + ExceptionThruSeq *thrus = exception->thrus(); + if (thrus) { + for (ExceptionThru *thru : *exception->thrus()) { + if (thru->edges()) { + thru->connectPinAfter(drvrs, network_); + if (first_pt == thru) + recordExceptionEdges(exception, thru->edges(), + first_thru_edge_exceptions_); + } } } } @@ -5681,12 +5684,15 @@ Sdc::disconnectPinBefore(const Pin *pin) if (have_thru_hpin_exceptions_) { for (ExceptionPath *exception : exceptions_) { ExceptionPt *first_pt = exception->firstPt(); - for (ExceptionThru *thru : *exception->thrus()) { - if (thru->edges()) { - thru->disconnectPinBefore(pin, network_); - if (thru == first_pt) - recordExceptionEdges(exception, thru->edges(), - first_thru_edge_exceptions_); + ExceptionThruSeq *thrus = exception->thrus(); + if (thrus) { + for (ExceptionThru *thru : *exception->thrus()) { + if (thru->edges()) { + thru->disconnectPinBefore(pin, network_); + if (thru == first_pt) + recordExceptionEdges(exception, thru->edges(), + first_thru_edge_exceptions_); + } } } } From dc4bf885820dd5293051c291a1419a03467183b3 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Thu, 13 Apr 2023 10:05:39 -0700 Subject: [PATCH 2/2] format Signed-off-by: James Cherry --- search/PathVertex.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/search/PathVertex.cc b/search/PathVertex.cc index 45e85733..51185b0f 100644 --- a/search/PathVertex.cc +++ b/search/PathVertex.cc @@ -433,12 +433,12 @@ PrevPathVisitor::unfilteredTag(const Tag *tag) const } } return search_->findTag(tag->transition(), - corners_->findPathAnalysisPt(tag->pathAPIndex()), - tag->clkInfo(), - tag->isClock(), - tag->inputDelay(), - tag->isSegmentStart(), - unfiltered_states, true); + corners_->findPathAnalysisPt(tag->pathAPIndex()), + tag->clkInfo(), + tag->isClock(), + tag->inputDelay(), + tag->isSegmentStart(), + unfiltered_states, true); } ////////////////////////////////////////////////////////////////