diff --git a/src/cts/src/LatencyBalancer.cpp b/src/cts/src/LatencyBalancer.cpp index 3971b480ec..df2dac84d3 100644 --- a/src/cts/src/LatencyBalancer.cpp +++ b/src/cts/src/LatencyBalancer.cpp @@ -202,7 +202,10 @@ void LatencyBalancer::buildGraph(odb::dbNet* clkInputNet) 0.0, sta::RiseFall::fall(), sta::MinMax::max()); if (rise != 0 || fall != 0) { - insDelay = (rise + fall) / 2.0; + insDelay = (rise + fall); + if (rise != 0 && fall != 0) { + insDelay /= 2.0; + } } } } @@ -344,7 +347,10 @@ void LatencyBalancer::computeSinkArrivalRecur(odb::dbNet* topClokcNet, 0.0, sta::RiseFall::fall(), sta::MinMax::max()); if (rise != 0 || fall != 0) { - insDelay = (rise + fall) / 2.0; + insDelay = (rise + fall); + if (rise != 0 && fall != 0) { + insDelay /= 2.0; + } } } } diff --git a/src/cts/src/TritonCTS.cpp b/src/cts/src/TritonCTS.cpp index c8ae25a5bf..5ebefdfe55 100644 --- a/src/cts/src/TritonCTS.cpp +++ b/src/cts/src/TritonCTS.cpp @@ -2234,7 +2234,10 @@ double TritonCTS::computeInsertionDelay(const std::string& name, if (rise != 0 || fall != 0) { // use average of max rise and max fall // TODO: do we need to look at min insertion delays? - double delayPerSec = (rise + fall) / 2.0; + double delayPerSec = (rise + fall); + if (rise != 0 && fall != 0) { + delayPerSec /= 2.0; + } // convert delay to length because HTree uses lengths sta::Scene* corner = openSta_->cmdScene(); double capPerMicron diff --git a/src/gui/src/clockWidget.cpp b/src/gui/src/clockWidget.cpp index 778be86a70..9d1182f316 100644 --- a/src/gui/src/clockWidget.cpp +++ b/src/gui/src/clockWidget.cpp @@ -1339,9 +1339,9 @@ ClockNodeGraphicsViewItem* ClockTreeView::addLeafToScene( 0.0, sta::RiseFall::rise(), sta::MinMax::max()); const float fall = lib_port->clkTreeDelay( 0.0, sta::RiseFall::fall(), sta::MinMax::max()); - - if (rise != 0 || fall != 0) { - ins_delay = (rise + fall) / 2.0; + ins_delay = (rise + fall); + if (rise != 0 && fall != 0) { + ins_delay /= 2.0; } } }