From 254115c06b0d85610a4ab3cccf0160ffe940676e Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 9 Aug 2022 12:31:33 -0700 Subject: [PATCH] do not merge path delays with -to Signed-off-by: James Cherry --- sdc/ExceptionPath.cc | 13 ++++++++++++- search/Search.cc | 23 ++++++++++++++--------- 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/sdc/ExceptionPath.cc b/sdc/ExceptionPath.cc index abc0cc9f..56abfe60 100644 --- a/sdc/ExceptionPath.cc +++ b/sdc/ExceptionPath.cc @@ -607,7 +607,18 @@ PathDelay::mergeable(ExceptionPath *exception) const return ExceptionPath::mergeable(exception) && overrides(exception) && exception->ignoreClkLatency() == ignore_clk_latency_ - && exception->delay() == delay_; + && exception->delay() == delay_ + // path delays -to pin/inst may be along the same path because they + // can be internal pins and not restricted to normal endpoints. + // This means that + // set_max_delay -to p1 + // set_max_delay -to p2 + // is not the same as + // set_max_delay -to {p1 p2} + // when p1 and p2 are on the same path because once endpoint + // is encountered the exception is not complete. + && to_ == nullptr + && exception->to() == nullptr; } bool diff --git a/search/Search.cc b/search/Search.cc index 101156c2..a4a13d99 100644 --- a/search/Search.cc +++ b/search/Search.cc @@ -2558,10 +2558,7 @@ Search::mutateTag(Tag *from_tag, // Don't propagate a completed false path -thru unless it is a // clock (which ignores exceptions). return nullptr; - // Don't propagate path delay tags past the -to pin. - if (exception->isPathDelay() - && sdc_->isCompleteTo(state, from_pin, from_rf, min_max)) - return nullptr; + if (state->matchesNextThru(from_pin,to_pin,to_rf,min_max,network_)) { // Found a -thru that we've been waiting for. if (state->nextState()->isComplete() @@ -2571,8 +2568,13 @@ Search::mutateTag(Tag *from_tag, state_change = true; break; } - // Kill loop tags at register clock pins. - if (to_is_reg_clk && exception->isLoop()) { + + // Kill path delay tags past the -to pin. + if ((exception->isPathDelay() + && sdc_->isCompleteTo(state, from_pin, from_rf, min_max)) + // Kill loop tags at register clock pins. + || (to_is_reg_clk + && exception->isLoop())) { state_change = true; break; } @@ -2607,9 +2609,12 @@ Search::mutateTag(Tag *from_tag, return nullptr; } - // Kill loop tags at register clock pins. - if (!(to_is_reg_clk - && exception->isLoop())) + // Kill path delay tags past the -to pin. + if (!((exception->isPathDelay() + && sdc_->isCompleteTo(state, from_pin, from_rf, min_max)) + // Kill loop tags at register clock pins. + || (to_is_reg_clk + && exception->isLoop()))) new_states->insert(state); } }