Delay compare ops
This commit is contained in:
parent
894b4887d8
commit
9468da1ae8
|
|
@ -347,7 +347,7 @@ DmpCeffTwoPoleDelayCalc::loadDelay(Parasitic *pole_residue,
|
|||
{
|
||||
ComplexFloat pole2, residue2;
|
||||
parasitics_->poleResidue(pole_residue, 1, pole2, residue2);
|
||||
if (!fuzzyZero(drvr_slew_)
|
||||
if (!delayZero(drvr_slew_)
|
||||
&& pole2.imag() == 0.0
|
||||
&& residue2.imag() == 0.0) {
|
||||
double p2 = pole2.real();
|
||||
|
|
|
|||
|
|
@ -1246,7 +1246,7 @@ GraphDelayCalc1::findArcDelay(LibertyCell *drvr_cell,
|
|||
// Merge slews.
|
||||
const Slew &drvr_slew = graph_->slew(drvr_vertex, drvr_rf, ap_index);
|
||||
const MinMax *slew_min_max = dcalc_ap->slewMinMax();
|
||||
if (fuzzyGreater(gate_slew, drvr_slew, dcalc_ap->slewMinMax())
|
||||
if (delayGreater(gate_slew, drvr_slew, dcalc_ap->slewMinMax())
|
||||
&& !drvr_vertex->slewAnnotated(drvr_rf, slew_min_max))
|
||||
graph_->setSlew(drvr_vertex, drvr_rf, ap_index, gate_slew);
|
||||
if (!graph_->arcDelayAnnotated(edge, arc, ap_index)) {
|
||||
|
|
@ -1446,7 +1446,7 @@ GraphDelayCalc1::annotateLoadDelays(Vertex *drvr_vertex,
|
|||
else {
|
||||
const Slew &slew = graph_->slew(load_vertex, drvr_rf, ap_index);
|
||||
if (!merge
|
||||
|| fuzzyGreater(load_slew, slew, slew_min_max))
|
||||
|| delayGreater(load_slew, slew, slew_min_max))
|
||||
graph_->setSlew(load_vertex, drvr_rf, ap_index, load_slew);
|
||||
}
|
||||
}
|
||||
|
|
@ -1459,7 +1459,7 @@ GraphDelayCalc1::annotateLoadDelays(Vertex *drvr_vertex,
|
|||
Delay wire_delay_extra = extra_delay + wire_delay;
|
||||
const MinMax *delay_min_max = dcalc_ap->delayMinMax();
|
||||
if (!merge
|
||||
|| fuzzyGreater(wire_delay_extra, delay, delay_min_max)) {
|
||||
|| delayGreater(wire_delay_extra, delay, delay_min_max)) {
|
||||
graph_->setWireArcDelay(wire_edge, drvr_rf, ap_index,
|
||||
wire_delay_extra);
|
||||
if (observer_)
|
||||
|
|
|
|||
|
|
@ -35,19 +35,6 @@ initDelayConstants()
|
|||
delay_init_values[MinMax::maxIndex()] = MinMax::max()->initValue();
|
||||
}
|
||||
|
||||
const Delay &
|
||||
delayInitValue(const MinMax *min_max)
|
||||
{
|
||||
return delay_init_values[min_max->index()];
|
||||
}
|
||||
|
||||
bool
|
||||
delayIsInitValue(const Delay &delay,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
return fuzzyEqual(delay, min_max->initValue());
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta)
|
||||
|
|
@ -73,45 +60,47 @@ delayAsString(const Delay &delay,
|
|||
return unit->asString(delay, digits);
|
||||
}
|
||||
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
const EarlyLate *,
|
||||
const StaState *)
|
||||
const Delay &
|
||||
delayInitValue(const MinMax *min_max)
|
||||
{
|
||||
return delay;
|
||||
}
|
||||
|
||||
float
|
||||
delaySigma2(const Delay &,
|
||||
const EarlyLate *)
|
||||
{
|
||||
return 0.0;
|
||||
return delay_init_values[min_max->index()];
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
delayIsInitValue(const Delay &delay,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyGreater(delay1, delay2);
|
||||
else
|
||||
return fuzzyLess(delay1, delay2);
|
||||
return fuzzyEqual(delay, min_max->initValue());
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
delayZero(const Delay &delay)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
else
|
||||
return fuzzyLessEqual(delay1, delay2);
|
||||
return fuzzyZero(delay);
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayInf(const Delay &delay)
|
||||
{
|
||||
return fuzzyInf(delay);
|
||||
}
|
||||
|
||||
bool
|
||||
delayEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return fuzzyEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return fuzzyLess(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
|
|
@ -122,7 +111,14 @@ fuzzyLess(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return fuzzyLessEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
|
|
@ -132,6 +128,42 @@ fuzzyLessEqual(const Delay &delay1,
|
|||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return fuzzyGreater(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyGreater(delay1, delay2);
|
||||
else
|
||||
return fuzzyLess(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
else
|
||||
return fuzzyLessEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
Delay
|
||||
delayRemove(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
|
|
|
|||
|
|
@ -164,31 +164,7 @@ Delay::operator-=(const Delay &delay)
|
|||
bool
|
||||
Delay::operator==(const Delay &delay) const
|
||||
{
|
||||
return fuzzyEqual(*this, delay);
|
||||
}
|
||||
|
||||
bool
|
||||
Delay::operator>(const Delay &delay) const
|
||||
{
|
||||
return fuzzyGreater(*this, delay);
|
||||
}
|
||||
|
||||
bool
|
||||
Delay::operator>=(const Delay &delay) const
|
||||
{
|
||||
return fuzzyGreaterEqual(*this, delay);
|
||||
}
|
||||
|
||||
bool
|
||||
Delay::operator<(const Delay &delay) const
|
||||
{
|
||||
return fuzzyLess(*this, delay);
|
||||
}
|
||||
|
||||
bool
|
||||
Delay::operator<=(const Delay &delay) const
|
||||
{
|
||||
return fuzzyLessEqual(*this, delay);
|
||||
return delayEqual(*this, delay);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
|
@ -218,20 +194,20 @@ delayIsInitValue(const Delay &delay,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyZero(const Delay &delay)
|
||||
delayZero(const Delay &delay)
|
||||
{
|
||||
return fuzzyZero(delay.mean())
|
||||
&& fuzzyZero(delay.sigma2());
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyInf(const Delay &delay)
|
||||
delayInf(const Delay &delay)
|
||||
{
|
||||
return fuzzyInf(delay.mean());
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyEqual(const Delay &delay1,
|
||||
delayEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return fuzzyEqual(delay1.mean(), delay2.mean())
|
||||
|
|
@ -239,7 +215,7 @@ fuzzyEqual(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -248,7 +224,7 @@ fuzzyLess(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -257,7 +233,18 @@ fuzzyLess(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return delayLess(delay1, delay2);
|
||||
else
|
||||
return delayGreater(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -266,7 +253,7 @@ fuzzyLessEqual(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -275,18 +262,18 @@ fuzzyLessEqual(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyLessEqual(delay1, delay2);
|
||||
return delayLessEqual(delay1, delay2);
|
||||
else
|
||||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
return delayGreaterEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -295,7 +282,7 @@ fuzzyGreater(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -304,7 +291,7 @@ fuzzyGreater(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -313,7 +300,7 @@ fuzzyGreaterEqual(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -322,36 +309,25 @@ fuzzyGreaterEqual(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyGreater(delay1, delay2);
|
||||
return delayGreater(delay1, delay2);
|
||||
else
|
||||
return fuzzyLess(delay1, delay2);
|
||||
return delayLess(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
return delayGreaterEqual(delay1, delay2);
|
||||
else
|
||||
return fuzzyLessEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyLess(delay1, delay2);
|
||||
else
|
||||
return fuzzyGreater(delay1, delay2);
|
||||
return delayLessEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
float
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@
|
|||
#include "Fuzzy.hh"
|
||||
#include "Units.hh"
|
||||
#include "StaState.hh"
|
||||
// temporary hack
|
||||
#include "Sta.hh"
|
||||
|
||||
// SSTA compilation.
|
||||
#if (SSTA == 2)
|
||||
|
|
@ -187,30 +189,6 @@ Delay::operator==(const Delay &delay) const
|
|||
&& sigma2_[late_index] == delay.sigma2_[early_index];
|
||||
}
|
||||
|
||||
bool
|
||||
Delay::operator>(const Delay &delay) const
|
||||
{
|
||||
return mean_ + sqrt(sigma2_late_) > delay.mean_ + sqrt(delay.sigma2_late_);
|
||||
}
|
||||
|
||||
bool
|
||||
Delay::operator>=(const Delay &delay) const
|
||||
{
|
||||
return mean_ + sqrt(sigma2_late_) >= delay.mean_ + sqrt(delay.sigma2_late_);
|
||||
}
|
||||
|
||||
bool
|
||||
Delay::operator<(const Delay &delay) const
|
||||
{
|
||||
return mean_ - sqrt(sigma2_early_) < delay.mean_ - sqrt(delay.sigma2_early_);
|
||||
}
|
||||
|
||||
bool
|
||||
Delay::operator<=(const Delay &delay) const
|
||||
{
|
||||
return mean_ - sqrt(sigma2_early_) <= delay.mean_ - sqrt(delay.sigma2_early_);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
Delay
|
||||
|
|
@ -234,12 +212,12 @@ delayIsInitValue(const Delay &delay,
|
|||
const MinMax *min_max)
|
||||
{
|
||||
return fuzzyEqual(delay.mean(), min_max->initValue())
|
||||
&& delay.sigma2Early() == 0.0
|
||||
&& delay.sigma2Late() == 0.0;
|
||||
&& fuzzyZero(delay.sigma2Early())
|
||||
&& fuzzyZero(delay.sigma2Late());
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyZero(const Delay &delay)
|
||||
delayZero(const Delay &delay)
|
||||
{
|
||||
return fuzzyZero(delay.mean())
|
||||
&& fuzzyZero(delay.sigma2Early())
|
||||
|
|
@ -247,13 +225,13 @@ fuzzyZero(const Delay &delay)
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyInf(const Delay &delay)
|
||||
delayInf(const Delay &delay)
|
||||
{
|
||||
return fuzzyInf(delay.mean());
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyEqual(const Delay &delay1,
|
||||
delayEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return fuzzyEqual(delay1.mean(), delay2.mean())
|
||||
|
|
@ -262,7 +240,7 @@ fuzzyEqual(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -271,7 +249,7 @@ fuzzyLess(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -280,7 +258,18 @@ fuzzyLess(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return delayLess(delay1, delay2);
|
||||
else
|
||||
return delayGreater(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -289,8 +278,8 @@ fuzzyLessEqual(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
float delay2)
|
||||
delayLessEqual(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
return fuzzyLessEqual(delayAsFloat(delay1, EarlyLate::early(), sta),
|
||||
|
|
@ -298,18 +287,18 @@ fuzzyLessEqual(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyLessEqual(delay1, delay2);
|
||||
return delayLessEqual(delay1, delay2);
|
||||
else
|
||||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
return delayGreaterEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -318,7 +307,7 @@ fuzzyGreater(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
|
|
@ -327,54 +316,43 @@ fuzzyGreater(const Delay &delay1,
|
|||
}
|
||||
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
return fuzzyGreaterEqual(delayAsFloat(delay1, EarlyLate::late(), sta),
|
||||
delay2);
|
||||
delayAsFloat(delay2, EarlyLate::late(), sta));
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
return fuzzyGreaterEqual(delayAsFloat(delay1, EarlyLate::late(), sta),
|
||||
return delayGreaterEqual(delayAsFloat(delay1, EarlyLate::late(), sta),
|
||||
delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyGreater(delay1, delay2);
|
||||
return delayGreater(delay1, delay2);
|
||||
else
|
||||
return fuzzyLess(delay1, delay2);
|
||||
return delayLess(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
return delayGreaterEqual(delay1, delay2);
|
||||
else
|
||||
return fuzzyLessEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (min_max == MinMax::max())
|
||||
return fuzzyLess(delay1, delay2);
|
||||
else
|
||||
return fuzzyGreater(delay1, delay2);
|
||||
return delayLessEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
float
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "MinMax.hh"
|
||||
#include "Fuzzy.hh"
|
||||
|
||||
// Delay values defined as floats.
|
||||
|
||||
|
|
@ -32,6 +31,19 @@ const Delay delay_zero = 0.0;
|
|||
void
|
||||
initDelayConstants();
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
|
||||
inline Delay
|
||||
makeDelay(float delay,
|
||||
float,
|
||||
|
|
@ -55,46 +67,61 @@ delayAsFloat(const Delay &delay)
|
|||
}
|
||||
|
||||
// mean late+/early- sigma
|
||||
float
|
||||
inline float
|
||||
delayAsFloat(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
const StaState *sta);
|
||||
float
|
||||
delaySigma2(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const EarlyLate *,
|
||||
const StaState *)
|
||||
{
|
||||
return delay;
|
||||
}
|
||||
|
||||
inline float
|
||||
delaySigma2(const Delay &,
|
||||
const EarlyLate *)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
const Delay &
|
||||
delayInitValue(const MinMax *min_max);
|
||||
bool
|
||||
delayIsInitValue(const Delay &delay,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
delayZero(const Delay &delay);
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
delayInf(const Delay &delay);
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
|
||||
Delay
|
||||
delayRemove(const Delay &delay1,
|
||||
|
|
|
|||
|
|
@ -47,10 +47,6 @@ public:
|
|||
void operator-=(float delay);
|
||||
void operator-=(const Delay &delay);
|
||||
bool operator==(const Delay &delay) const;
|
||||
bool operator>(const Delay &delay) const;
|
||||
bool operator>=(const Delay &delay) const;
|
||||
bool operator<(const Delay &delay) const;
|
||||
bool operator<=(const Delay &delay) const;
|
||||
|
||||
private:
|
||||
float mean_;
|
||||
|
|
@ -63,6 +59,19 @@ const Delay delay_zero(0.0);
|
|||
void
|
||||
initDelayConstants();
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
|
||||
Delay
|
||||
makeDelay(float delay,
|
||||
float sigma_early,
|
||||
|
|
@ -75,7 +84,10 @@ makeDelay2(float delay,
|
|||
float sigma_late);
|
||||
|
||||
inline float
|
||||
delayAsFloat(const Delay &delay) { return delay.mean(); }
|
||||
delayAsFloat(const Delay &delay)
|
||||
{
|
||||
return delay.mean();
|
||||
}
|
||||
|
||||
// mean late+/early- sigma
|
||||
float
|
||||
|
|
@ -85,56 +97,44 @@ delayAsFloat(const Delay &delay,
|
|||
float
|
||||
delaySigma2(const Delay &delay,
|
||||
const EarlyLate *early_late);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
const StaState *sta,
|
||||
int digits);
|
||||
const Delay &
|
||||
delayInitValue(const MinMax *min_max);
|
||||
bool
|
||||
delayIsInitValue(const Delay &delay,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyZero(const Delay &delay);
|
||||
delayZero(const Delay &delay);
|
||||
bool
|
||||
fuzzyInf(const Delay &delay);
|
||||
delayInf(const Delay &delay);
|
||||
bool
|
||||
fuzzyEqual(const Delay &delay1,
|
||||
delayEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
// delay1-delay2 subtracting sigma instead of addiing.
|
||||
|
|
|
|||
|
|
@ -50,10 +50,6 @@ public:
|
|||
void operator-=(float delay);
|
||||
void operator-=(const Delay &delay);
|
||||
bool operator==(const Delay &delay) const;
|
||||
bool operator>(const Delay &delay) const;
|
||||
bool operator>=(const Delay &delay) const;
|
||||
bool operator<(const Delay &delay) const;
|
||||
bool operator<=(const Delay &delay) const;
|
||||
|
||||
protected:
|
||||
static const int early_index = 0;
|
||||
|
|
@ -110,38 +106,38 @@ bool
|
|||
delayIsInitValue(const Delay &delay,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyZero(const Delay &delay);
|
||||
delayZero(const Delay &delay);
|
||||
bool
|
||||
fuzzyInf(const Delay &delay);
|
||||
delayInf(const Delay &delay);
|
||||
bool
|
||||
fuzzyEqual(const Delay &delay1,
|
||||
delayEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyLess(const Delay &delay1,
|
||||
delayLess(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyLessEqual(const Delay &delay1,
|
||||
delayLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
bool
|
||||
fuzzyGreaterEqual(const Delay &delay1,
|
||||
delayGreaterEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
delayGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
// delay1-delay2 subtracting sigma instead of addiing.
|
||||
|
|
|
|||
|
|
@ -809,7 +809,7 @@ SdfReader::setEdgeArcDelaysCondUse(Edge *edge,
|
|||
delay = graph_->arcDelay(edge, arc, arc_delay_index) + *value;
|
||||
else if (graph_->arcDelayAnnotated(edge, arc, arc_delay_index)) {
|
||||
ArcDelay prev_value = graph_->arcDelay(edge, arc, arc_delay_index);
|
||||
if (fuzzyGreater(prev_value, delay, min_max))
|
||||
if (delayGreater(prev_value, delay, min_max))
|
||||
delay = prev_value;
|
||||
}
|
||||
graph_->setArcDelay(edge, arc, arc_delay_index, delay);
|
||||
|
|
|
|||
|
|
@ -605,18 +605,18 @@ SdfWriter::writeEdgeCheck(Edge *edge,
|
|||
&& arcs[clk_rf_index][RiseFall::fallIndex()]
|
||||
&& arcs[clk_rf_index][RiseFall::riseIndex()]
|
||||
&& arcs[clk_rf_index][RiseFall::fallIndex()]
|
||||
&& fuzzyEqual(graph_->arcDelay(edge,
|
||||
arcs[clk_rf_index][RiseFall::riseIndex()],
|
||||
arc_delay_min_index_),
|
||||
graph_->arcDelay(edge,
|
||||
arcs[clk_rf_index][RiseFall::fallIndex()],
|
||||
arc_delay_min_index_))
|
||||
&& fuzzyEqual(graph_->arcDelay(edge,
|
||||
arcs[clk_rf_index][RiseFall::riseIndex()],
|
||||
arc_delay_max_index_),
|
||||
graph_->arcDelay(edge,
|
||||
arcs[clk_rf_index][RiseFall::fallIndex()],
|
||||
arc_delay_max_index_)))
|
||||
&& delayEqual(graph_->arcDelay(edge,
|
||||
arcs[clk_rf_index][RiseFall::riseIndex()],
|
||||
arc_delay_min_index_),
|
||||
graph_->arcDelay(edge,
|
||||
arcs[clk_rf_index][RiseFall::fallIndex()],
|
||||
arc_delay_min_index_))
|
||||
&& delayEqual(graph_->arcDelay(edge,
|
||||
arcs[clk_rf_index][RiseFall::riseIndex()],
|
||||
arc_delay_max_index_),
|
||||
graph_->arcDelay(edge,
|
||||
arcs[clk_rf_index][RiseFall::fallIndex()],
|
||||
arc_delay_max_index_)))
|
||||
// Rise/fall margins are the same, so no data edge specifier is required.
|
||||
writeCheck(edge, arcs[clk_rf_index][RiseFall::riseIndex()],
|
||||
sdf_check, false, true);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ void
|
|||
MaxSkewViolatorsVisititor::visit(MaxSkewCheck &check,
|
||||
const StaState *sta)
|
||||
{
|
||||
if (fuzzyLess(check.slack(sta), 0.0))
|
||||
if (delayLess(check.slack(sta), 0.0))
|
||||
checks_.push_back(new MaxSkewCheck(check));
|
||||
}
|
||||
|
||||
|
|
@ -280,8 +280,8 @@ MaxSkewSlackLess::operator()(const MaxSkewCheck *check1,
|
|||
{
|
||||
Slack slack1 = check1->slack(sta_);
|
||||
Slack slack2 = check2->slack(sta_);
|
||||
return slack1 < slack2
|
||||
|| (fuzzyEqual(slack1, slack2)
|
||||
return delayLess(slack1, slack2)
|
||||
|| (delayEqual(slack1, slack2)
|
||||
// Break ties based on constrained pin names.
|
||||
&& sta_->network()->pinLess(check1->clkPin(sta_),check2->clkPin(sta_)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ void
|
|||
MinPeriodViolatorsVisitor::visit(MinPeriodCheck &check,
|
||||
StaState *sta)
|
||||
{
|
||||
if (fuzzyLess(check.slack(sta), 0.0))
|
||||
if (delayLess(check.slack(sta), 0.0))
|
||||
checks_.push_back(check.copy());
|
||||
}
|
||||
|
||||
|
|
@ -231,9 +231,9 @@ MinPeriodSlackLess::operator()(const MinPeriodCheck *check1,
|
|||
Slack slack2 = check2->slack(sta_);
|
||||
const Pin *pin1 = check1->pin();
|
||||
const Pin *pin2 = check2->pin();
|
||||
return fuzzyLess(slack1, slack2)
|
||||
return delayLess(slack1, slack2)
|
||||
// Break ties based on pin and clock names.
|
||||
|| (fuzzyEqual(slack1, slack2)
|
||||
|| (delayEqual(slack1, slack2)
|
||||
&& (sta_->network()->pinLess(pin1, pin2)
|
||||
|| (pin1 == pin2
|
||||
&& ClockNameLess()(check1->clk(),
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ void
|
|||
MinPulseWidthViolatorsVisitor::visit(MinPulseWidthCheck &check,
|
||||
const StaState *sta)
|
||||
{
|
||||
if (fuzzyLess(check.slack(sta), 0.0)
|
||||
if (delayLess(check.slack(sta), 0.0)
|
||||
&& (corner_ == nullptr
|
||||
|| check.corner(sta) == corner_)) {
|
||||
MinPulseWidthCheck *copy = new MinPulseWidthCheck(check.openPath());
|
||||
|
|
@ -499,8 +499,8 @@ MinPulseWidthSlackLess::operator()(const MinPulseWidthCheck *check1,
|
|||
Slack slack2 = check2->slack(sta_);
|
||||
const Pin *pin1 = check1->pin(sta_);
|
||||
const Pin *pin2 = check2->pin(sta_);
|
||||
return slack1 < slack2
|
||||
|| (fuzzyEqual(slack1, slack2)
|
||||
return delayLess(slack1, slack2)
|
||||
|| (delayEqual(slack1, slack2)
|
||||
// Break ties for the sake of regression stability.
|
||||
&& (sta_->network()->pinLess(pin1, pin2)
|
||||
|| (pin1 == pin2
|
||||
|
|
|
|||
|
|
@ -294,9 +294,9 @@ clkInfoCmp(const ClkInfo *clk_info1,
|
|||
|
||||
const Arrival &insert1 = clk_info1->insertion();
|
||||
const Arrival &insert2 = clk_info2->insertion();
|
||||
if (insert1 < insert2)
|
||||
if (delayLess(insert1, insert2))
|
||||
return -1;
|
||||
if (insert1 > insert2)
|
||||
if (delayGreater(insert1, insert2))
|
||||
return 1;
|
||||
|
||||
float latency1 = clk_info1->latency();
|
||||
|
|
|
|||
|
|
@ -968,9 +968,9 @@ Genclks::recordSrcPaths(Clock *gclk)
|
|||
&& (!has_edges
|
||||
|| src_clk_rf == gclk->masterClkEdgeTr(rf))
|
||||
&& (src_path.isNull()
|
||||
|| fuzzyGreater(path->arrival(this),
|
||||
src_path.arrival(this),
|
||||
early_late))) {
|
||||
|| delayGreater(path->arrival(this),
|
||||
src_path.arrival(this),
|
||||
early_late))) {
|
||||
debugPrint4(debug_, "genclk", 2, " %s insertion %s %s %s\n",
|
||||
network_->pathName(gclk_pin),
|
||||
early_late->asString(),
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ Latches::latchRequired(const Path *data_path,
|
|||
network_->pathName(data_path->pin(this)),
|
||||
delayAsString(data_arrival, this),
|
||||
delayAsString(enable_arrival, this));
|
||||
if (data_arrival <= enable_arrival) {
|
||||
if (delayLessEqual(data_arrival, enable_arrival)) {
|
||||
// Data arrives before latch opens.
|
||||
required = enable_arrival;
|
||||
borrow = 0.0;
|
||||
|
|
@ -108,7 +108,7 @@ Latches::latchRequired(const Path *data_path,
|
|||
else {
|
||||
// Data arrives while latch is transparent.
|
||||
borrow = data_arrival - enable_arrival;
|
||||
if (borrow <= max_borrow)
|
||||
if (delayLessEqual(borrow, max_borrow))
|
||||
required = data_arrival;
|
||||
else {
|
||||
borrow = max_borrow;
|
||||
|
|
@ -332,7 +332,7 @@ Latches::latchOutArrival(Path *data_path,
|
|||
latchRequired(data_path, enable_path, &disable_path, path_ap,
|
||||
required, borrow, adjusted_data_arrival,
|
||||
time_given_to_startpoint);
|
||||
if (borrow > 0.0) {
|
||||
if (delayGreater(borrow, 0.0)) {
|
||||
// Latch is transparent when data arrives.
|
||||
arc_delay = search_->deratedDelay(data_vertex, d_q_arc, d_q_edge,
|
||||
false, path_ap);
|
||||
|
|
|
|||
|
|
@ -1244,7 +1244,7 @@ PathEndLatchCheck::targetClkWidth(const StaState *sta) const
|
|||
if (enable_clk_info->isPulseClk())
|
||||
return disable_arrival - enable_arrival;
|
||||
else {
|
||||
if (enable_arrival > disable_arrival) {
|
||||
if (delayGreater(enable_arrival, disable_arrival)) {
|
||||
float period = enable_clk_info->clock()->period();
|
||||
disable_arrival += period;
|
||||
}
|
||||
|
|
@ -1989,24 +1989,24 @@ PathEnd::cmpSlack(const PathEnd *path_end1,
|
|||
{
|
||||
Slack slack1 = path_end1->slack(sta);
|
||||
Slack slack2 = path_end2->slack(sta);
|
||||
if (fuzzyZero(slack1)
|
||||
&& fuzzyZero(slack2)
|
||||
if (delayZero(slack1)
|
||||
&& delayZero(slack2)
|
||||
&& path_end1->isLatchCheck()
|
||||
&& path_end2->isLatchCheck()) {
|
||||
Arrival borrow1 = path_end1->borrow(sta);
|
||||
Arrival borrow2 = path_end2->borrow(sta);
|
||||
// Latch slack is zero if there is borrowing so break ties
|
||||
// based on borrow time.
|
||||
if (fuzzyEqual(borrow1, borrow2))
|
||||
if (delayEqual(borrow1, borrow2))
|
||||
return 0;
|
||||
else if (borrow1 > borrow2)
|
||||
else if (delayGreater(borrow1, borrow2))
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
else if (fuzzyEqual(slack1, slack2))
|
||||
else if (delayEqual(slack1, slack2))
|
||||
return 0;
|
||||
else if (slack1 < slack2)
|
||||
else if (delayLess(slack1, slack2))
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
|
|
@ -2020,9 +2020,9 @@ PathEnd::cmpArrival(const PathEnd *path_end1,
|
|||
Arrival arrival1 = path_end1->dataArrivalTime(sta);
|
||||
Arrival arrival2 = path_end2->dataArrivalTime(sta);
|
||||
const MinMax *min_max = path_end1->minMax(sta);
|
||||
if (fuzzyEqual(arrival1, arrival2))
|
||||
if (delayEqual(arrival1, arrival2))
|
||||
return 0;
|
||||
else if (fuzzyLess(arrival1, arrival2, min_max))
|
||||
else if (delayLess(arrival1, arrival2, min_max))
|
||||
return -1;
|
||||
else
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -348,7 +348,7 @@ PathEnumFaninVisitor::visitFromToPath(const Pin *,
|
|||
// Make the diverted path end to check slack with from_path crpr.
|
||||
makeDivertedPathEnd(from_path, arc, div_end, after_div_copy);
|
||||
// Only enumerate paths with greater slack.
|
||||
if (fuzzyGreaterEqual(div_end->slack(sta_), path_end_slack_)) {
|
||||
if (delayGreaterEqual(div_end->slack(sta_), path_end_slack_)) {
|
||||
reportDiversion(arc, from_path);
|
||||
path_enum_->makeDiversion(div_end, after_div_copy);
|
||||
}
|
||||
|
|
@ -356,7 +356,7 @@ PathEnumFaninVisitor::visitFromToPath(const Pin *,
|
|||
delete div_end;
|
||||
}
|
||||
// Only enumerate slower/faster paths.
|
||||
else if (fuzzyLessEqual(to_arrival, before_div_arrival_, min_max)) {
|
||||
else if (delayLessEqual(to_arrival, before_div_arrival_, min_max)) {
|
||||
PathEnd *div_end;
|
||||
PathEnumed *after_div_copy;
|
||||
makeDivertedPathEnd(from_path, arc, div_end, after_div_copy);
|
||||
|
|
|
|||
|
|
@ -101,19 +101,19 @@ PathGroup::savable(PathEnd *path_end)
|
|||
// without crpr first because it is expensive to find.
|
||||
Slack slack = path_end->slackNoCrpr(sta_);
|
||||
if (!delayIsInitValue(slack, min_max_)
|
||||
&& fuzzyLessEqual(slack, threshold_)
|
||||
&& fuzzyLessEqual(slack, slack_max_)) {
|
||||
&& delayLessEqual(slack, threshold_)
|
||||
&& delayLessEqual(slack, slack_max_)) {
|
||||
// Now check with crpr.
|
||||
slack = path_end->slack(sta_);
|
||||
savable = fuzzyLessEqual(slack, threshold_)
|
||||
&& fuzzyLessEqual(slack, slack_max_)
|
||||
&& fuzzyGreaterEqual(slack, slack_min_);
|
||||
savable = delayLessEqual(slack, threshold_)
|
||||
&& delayLessEqual(slack, slack_max_)
|
||||
&& delayGreaterEqual(slack, slack_min_);
|
||||
}
|
||||
}
|
||||
else {
|
||||
const Arrival &arrival = path_end->dataArrivalTime(sta_);
|
||||
savable = !delayIsInitValue(arrival, min_max_)
|
||||
&& fuzzyGreaterEqual(arrival, threshold_, min_max_);
|
||||
&& delayGreaterEqual(arrival, threshold_, min_max_);
|
||||
}
|
||||
return savable;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -403,7 +403,7 @@ PrevPathVisitor::visitFromToPath(const Pin *,
|
|||
&& path_ap_index == path_ap_index_
|
||||
&& (dcalc_tol_ > 0.0
|
||||
? std::abs(delayAsFloat(to_arrival - path_arrival_)) < dcalc_tol_
|
||||
: fuzzyEqual(to_arrival, path_arrival_))
|
||||
: delayEqual(to_arrival, path_arrival_))
|
||||
&& (tagMatch(to_tag, path_tag_, sta_)
|
||||
// If the filter exception became active searching from
|
||||
// from_path to to_path the tag includes the filter, but
|
||||
|
|
|
|||
|
|
@ -597,7 +597,7 @@ Power::findInputInternalPower(const Pin *pin,
|
|||
for (auto rf : RiseFall::range()) {
|
||||
float slew = delayAsFloat(graph_->slew(vertex, rf,
|
||||
dcalc_ap->index()));
|
||||
if (!fuzzyInf(slew)) {
|
||||
if (!delayInf(slew)) {
|
||||
float table_energy = pwr->power(rf, pvt, slew, load_cap);
|
||||
energy += table_energy;
|
||||
tr_count++;
|
||||
|
|
@ -735,7 +735,7 @@ Power::findOutputInternalPower(const Pin *to_pin,
|
|||
? delayAsFloat(graph_->slew(from_vertex, from_rf,
|
||||
dcalc_ap->index()))
|
||||
: 0.0;
|
||||
if (!fuzzyInf(slew)) {
|
||||
if (!delayInf(slew)) {
|
||||
float table_energy = pwr->power(to_rf, pvt, slew, load_cap);
|
||||
energy += table_energy;
|
||||
tr_count++;
|
||||
|
|
|
|||
|
|
@ -801,12 +801,12 @@ pinSlewProperty(const Pin *pin,
|
|||
Slew slew = min_max->initValue();
|
||||
if (vertex) {
|
||||
Slew vertex_slew = sta->vertexSlew(vertex, rf, min_max);
|
||||
if (fuzzyGreater(vertex_slew, slew, min_max))
|
||||
if (delayGreater(vertex_slew, slew, min_max))
|
||||
slew = vertex_slew;
|
||||
}
|
||||
if (bidirect_drvr_vertex) {
|
||||
Slew vertex_slew = sta->vertexSlew(bidirect_drvr_vertex, rf, min_max);
|
||||
if (fuzzyGreater(vertex_slew, slew, min_max))
|
||||
if (delayGreater(vertex_slew, slew, min_max))
|
||||
slew = vertex_slew;
|
||||
}
|
||||
return PropertyValue(delayPropertyValue(slew, sta));
|
||||
|
|
@ -879,9 +879,9 @@ edgeDelayProperty(Edge *edge,
|
|||
ArcDelay arc_delay = sta->arcDelay(edge, arc, dcalc_ap);
|
||||
if (!delay_exists
|
||||
|| ((min_max == MinMax::max()
|
||||
&& arc_delay > delay)
|
||||
&& delayGreater(arc_delay, delay))
|
||||
|| (min_max == MinMax::min()
|
||||
&& arc_delay < delay)))
|
||||
&& delayLess(arc_delay, delay))))
|
||||
delay = arc_delay;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -578,7 +578,7 @@ ReportPath::reportFull(const PathEndLatchCheck *end,
|
|||
else
|
||||
reportTgtClk(end, result);
|
||||
|
||||
if (borrow >= 0.0)
|
||||
if (delayGreaterEqual(borrow, 0.0))
|
||||
reportLine("time borrowed from endpoint", borrow, req_time,
|
||||
early_late, result);
|
||||
else
|
||||
|
|
@ -644,7 +644,7 @@ ReportPath::reportBorrowing(const PathEndLatchCheck *end,
|
|||
if (tgt_clk_path->clkInfo(search_)->isPropagated()) {
|
||||
auto width_msg = stdstrPrint("%s nominal pulse width", tgt_clk_name.c_str());
|
||||
reportLineTotal(width_msg.c_str(), nom_pulse_width, early_late, result);
|
||||
if (!fuzzyZero(latency_diff))
|
||||
if (!delayZero(latency_diff))
|
||||
reportLineTotalMinus("clock latency difference", latency_diff,
|
||||
early_late, result);
|
||||
}
|
||||
|
|
@ -655,19 +655,19 @@ ReportPath::reportBorrowing(const PathEndLatchCheck *end,
|
|||
ArcDelay margin = end->margin(this);
|
||||
reportLineTotalMinus("library setup time", margin, early_late, result);
|
||||
reportDashLineTotal(result);
|
||||
if (!fuzzyZero(crpr_diff))
|
||||
if (!delayZero(crpr_diff))
|
||||
reportLineTotalMinus("CRPR difference", crpr_diff, early_late, result);
|
||||
reportLineTotal("max time borrow", max_borrow, early_late, result);
|
||||
}
|
||||
if (fuzzyGreater(borrow, delay_zero)
|
||||
if (delayGreater(borrow, delay_zero)
|
||||
&& (!fuzzyZero(open_uncertainty)
|
||||
|| !fuzzyZero(open_crpr))) {
|
||||
|| !delayZero(open_crpr))) {
|
||||
reportDashLineTotal(result);
|
||||
reportLineTotal("actual time borrow", borrow, early_late, result);
|
||||
if (!fuzzyZero(open_uncertainty))
|
||||
reportLineTotal("open edge uncertainty", open_uncertainty,
|
||||
early_late, result);
|
||||
if (!fuzzyZero(open_crpr))
|
||||
if (!delayZero(open_crpr))
|
||||
reportLineTotal("open edge CRPR", open_crpr, early_late, result);
|
||||
reportDashLineTotal(result);
|
||||
reportLineTotal("time given to startpoint", time_given_to_startpoint,
|
||||
|
|
@ -759,7 +759,7 @@ ReportPath::reportFull(const PathEndPathDelay *end,
|
|||
else {
|
||||
Arrival tgt_clk_delay = end->targetClkDelay(this);
|
||||
Arrival tgt_clk_arrival = delay + tgt_clk_delay;
|
||||
if (!fuzzyZero(tgt_clk_delay))
|
||||
if (!delayZero(tgt_clk_delay))
|
||||
reportLine(clkNetworkDelayIdealProp(isPropagated(tgt_clk_path)),
|
||||
tgt_clk_delay, tgt_clk_arrival, early_late, result);
|
||||
reportClkUncertainty(end, tgt_clk_arrival, result);
|
||||
|
|
@ -2050,7 +2050,7 @@ ReportPath::reportSrcClkAndPath(const Path *path,
|
|||
else if (clk_used_as_data) {
|
||||
reportClkLine(clk, clk_name.c_str(), clk_end_rf, clk_time,
|
||||
early_late, result);
|
||||
if (clk_insertion > 0.0)
|
||||
if (delayGreater(clk_insertion, 0.0))
|
||||
reportClkSrcLatency(clk_insertion, clk_time, early_late, result);
|
||||
if (reportClkPath())
|
||||
reportPath1(path, expanded, true, time_offset, result);
|
||||
|
|
@ -2067,7 +2067,7 @@ ReportPath::reportSrcClkAndPath(const Path *path,
|
|||
}
|
||||
else {
|
||||
if (is_path_delay) {
|
||||
if (clk_delay > 0.0)
|
||||
if (delayGreater(clk_delay, 0.0))
|
||||
reportLine(clkNetworkDelayIdealProp(is_prop), clk_delay,
|
||||
clk_end_time, early_late, result);
|
||||
}
|
||||
|
|
@ -2570,11 +2570,11 @@ ReportPath::reportPathJson(const Path *path,
|
|||
}
|
||||
|
||||
result += " \"arrival\": ";
|
||||
stringPrint(tmp, "%.3e", path->arrival(this));
|
||||
stringPrint(tmp, "%.3e", delayAsFloat(path->arrival(this)));
|
||||
result += tmp + ",\n";
|
||||
|
||||
result += " \"slew\": ";
|
||||
stringPrint(tmp, "%.3e", path->slew(this));
|
||||
stringPrint(tmp, "%.3e", delayAsFloat(path->slew(this)));
|
||||
result += tmp + "\n";
|
||||
|
||||
result += " }";
|
||||
|
|
@ -2613,7 +2613,7 @@ ReportPath::reportPath1(const Path *path,
|
|||
}
|
||||
Arrival time = latch_enable_time + latch_time_given;
|
||||
Arrival incr = latch_time_given;
|
||||
if (incr >= 0.0)
|
||||
if (delayGreaterEqual(incr, 0.0))
|
||||
reportLine("time given to startpoint", incr, time, early_late, result);
|
||||
else
|
||||
reportLine("time borrowed from startpoint", incr, time,
|
||||
|
|
|
|||
|
|
@ -1194,7 +1194,7 @@ Search::arrivalsChanged(Vertex *vertex,
|
|||
bool arrival_exists2;
|
||||
tag_bldr->tagArrival(tag1, arrival2, arrival_exists2);
|
||||
if (!arrival_exists2
|
||||
|| !fuzzyEqual(arrival1, arrival2))
|
||||
|| !delayEqual(arrival1, arrival2))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
@ -1238,7 +1238,7 @@ ArrivalVisitor::visitFromToPath(const Pin *,
|
|||
Tag *tag_match;
|
||||
tag_bldr_->tagMatchArrival(to_tag, tag_match, arrival, arrival_index);
|
||||
if (tag_match == nullptr
|
||||
|| fuzzyGreater(to_arrival, arrival, min_max)) {
|
||||
|| delayGreater(to_arrival, arrival, min_max)) {
|
||||
debugPrint5(debug, "search", 3, " %s + %s = %s %s %s\n",
|
||||
delayAsString(from_path->arrival(sta_), sta_),
|
||||
delayAsString(arc_delay, sta_),
|
||||
|
|
@ -1258,7 +1258,7 @@ ArrivalVisitor::visitFromToPath(const Pin *,
|
|||
tag_bldr_no_crpr_->tagMatchArrival(to_tag, tag_match,
|
||||
arrival, arrival_index);
|
||||
if (tag_match == nullptr
|
||||
|| fuzzyGreater(to_arrival, arrival, min_max)) {
|
||||
|| delayGreater(to_arrival, arrival, min_max)) {
|
||||
tag_bldr_no_crpr_->setMatchArrival(to_tag, tag_match,
|
||||
to_arrival, arrival_index,
|
||||
&prev_path);
|
||||
|
|
@ -1300,7 +1300,7 @@ ArrivalVisitor::pruneCrprArrivals()
|
|||
delayAsString(max_crpr, sta_),
|
||||
delayAsString(max_arrival_max_crpr, sta_));
|
||||
Arrival arrival = tag_bldr_->arrival(arrival_index);
|
||||
if (fuzzyGreater(max_arrival_max_crpr, arrival, min_max)) {
|
||||
if (delayGreater(max_arrival_max_crpr, arrival, min_max)) {
|
||||
debugPrint1(debug, "search", 3, " pruned %s\n",
|
||||
tag->asString(sta_));
|
||||
tag_bldr_->deleteArrival(tag);
|
||||
|
|
@ -2207,7 +2207,7 @@ PathVisitor::visitFromPath(const Pin *from_pin,
|
|||
}
|
||||
else {
|
||||
arc_delay = search->deratedDelay(from_vertex, arc, edge, false, path_ap);
|
||||
if (!fuzzyEqual(arc_delay, min_max->initValue())) {
|
||||
if (!delayEqual(arc_delay, min_max->initValue())) {
|
||||
to_arrival = from_arrival + arc_delay;
|
||||
to_tag = search->thruTag(from_tag, edge, to_rf, min_max, path_ap);
|
||||
}
|
||||
|
|
@ -3321,7 +3321,7 @@ RequiredCmp::requiredSet(int arrival_index,
|
|||
Required required,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (fuzzyGreater(required, requireds_[arrival_index], min_max)) {
|
||||
if (delayGreater(required, requireds_[arrival_index], min_max)) {
|
||||
requireds_[arrival_index] = required;
|
||||
have_requireds_ = true;
|
||||
}
|
||||
|
|
@ -3346,7 +3346,7 @@ RequiredCmp::requiredsSave(Vertex *vertex,
|
|||
Required req = requireds_[arrival_index];
|
||||
if (prev_reqs) {
|
||||
Required prev_req = path->required(sta);
|
||||
if (!fuzzyEqual(prev_req, req)) {
|
||||
if (!delayEqual(prev_req, req)) {
|
||||
debugPrint2(debug, "search", 3, "required save %s -> %s\n",
|
||||
delayAsString(prev_req, sta),
|
||||
delayAsString(req, sta));
|
||||
|
|
@ -3640,7 +3640,7 @@ Search::totalNegativeSlack(const MinMax *min_max)
|
|||
for (Corner *corner : *corners_) {
|
||||
PathAPIndex path_ap_index = corner->findPathAnalysisPt(min_max)->index();
|
||||
Slack tns1 = tns_[path_ap_index];
|
||||
if (tns1 < tns)
|
||||
if (delayLess(tns1, tns))
|
||||
tns = tns1;
|
||||
}
|
||||
return tns;
|
||||
|
|
@ -3735,7 +3735,7 @@ Search::tnsIncr(Vertex *vertex,
|
|||
Slack slack,
|
||||
PathAPIndex path_ap_index)
|
||||
{
|
||||
if (fuzzyLess(slack, 0.0)) {
|
||||
if (delayLess(slack, 0.0)) {
|
||||
debugPrint2(debug_, "tns", 3, "tns+ %s %s\n",
|
||||
delayAsString(slack, this),
|
||||
vertex->name(sdc_network_));
|
||||
|
|
@ -3754,7 +3754,7 @@ Search::tnsDecr(Vertex *vertex,
|
|||
bool found;
|
||||
tns_slacks_[path_ap_index].findKey(vertex, slack, found);
|
||||
if (found
|
||||
&& fuzzyLess(slack, 0.0)) {
|
||||
&& delayLess(slack, 0.0)) {
|
||||
debugPrint2(debug_, "tns", 3, "tns- %s %s\n",
|
||||
delayAsString(slack, this),
|
||||
vertex->name(sdc_network_));
|
||||
|
|
@ -3880,7 +3880,7 @@ FindEndSlackVisitor::visit(PathEnd *path_end)
|
|||
PathRef &path = path_end->pathRef();
|
||||
PathAPIndex path_ap_index = path.pathAnalysisPtIndex(sta_);
|
||||
Slack slack = path_end->slack(sta_);
|
||||
if (fuzzyLess(slack, slacks_[path_ap_index]))
|
||||
if (delayLess(slack, slacks_[path_ap_index]))
|
||||
slacks_[path_ap_index] = slack;
|
||||
}
|
||||
}
|
||||
|
|
@ -3907,7 +3907,7 @@ Search::wnsSlacks(Vertex *vertex,
|
|||
PathAPIndex path_ap_index = path->pathAnalysisPtIndex(this);
|
||||
const Slack path_slack = path->slack(this);
|
||||
if (!path->tag(this)->isFilter()
|
||||
&& fuzzyLess(path_slack, slacks[path_ap_index]))
|
||||
&& delayLess(path_slack, slacks[path_ap_index]))
|
||||
slacks[path_ap_index] = path_slack;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2669,7 +2669,7 @@ Sta::vertexWorstArrivalPath(Vertex *vertex,
|
|||
PathVertex *path = path_iter.next();
|
||||
Arrival arrival = path->arrival(this);
|
||||
if (!path->tag(this)->isGenClkSrcPath()
|
||||
&& fuzzyGreater(arrival, worst_arrival, min_max)) {
|
||||
&& delayGreater(arrival, worst_arrival, min_max)) {
|
||||
worst_arrival = arrival;
|
||||
worst_path.init(path);
|
||||
}
|
||||
|
|
@ -2689,7 +2689,7 @@ Sta::vertexWorstArrivalPath(Vertex *vertex,
|
|||
Arrival arrival = path->arrival(this);
|
||||
if (path->minMax(this) == min_max
|
||||
&& !path->tag(this)->isGenClkSrcPath()
|
||||
&& fuzzyGreater(arrival, worst_arrival, min_max)) {
|
||||
&& delayGreater(arrival, worst_arrival, min_max)) {
|
||||
worst_arrival = arrival;
|
||||
worst_path.init(path);
|
||||
}
|
||||
|
|
@ -2709,7 +2709,7 @@ Sta::vertexWorstSlackPath(Vertex *vertex,
|
|||
PathVertex *path = path_iter.next();
|
||||
Slack slack = path->slack(this);
|
||||
if (!path->tag(this)->isGenClkSrcPath()
|
||||
&& slack < min_slack) {
|
||||
&& delayLess(slack, min_slack)) {
|
||||
min_slack = slack;
|
||||
worst_path.init(path);
|
||||
}
|
||||
|
|
@ -2730,7 +2730,7 @@ Sta::vertexWorstSlackPath(Vertex *vertex,
|
|||
if (path->minMax(this) == min_max
|
||||
&& !path->tag(this)->isGenClkSrcPath()) {
|
||||
Slack slack = path->slack(this);
|
||||
if (fuzzyLess(slack, min_slack)) {
|
||||
if (delayLess(slack, min_slack)) {
|
||||
min_slack = slack;
|
||||
worst_path.init(path);
|
||||
}
|
||||
|
|
@ -2764,7 +2764,7 @@ Sta::vertexArrival(Vertex *vertex,
|
|||
if ((clk_edge == clk_edge_wildcard
|
||||
|| clk_info->clkEdge() == clk_edge)
|
||||
&& !clk_info->isGenClkSrcPath()
|
||||
&& fuzzyGreater(path->arrival(this), arrival, min_max))
|
||||
&& delayGreater(path->arrival(this), arrival, min_max))
|
||||
arrival = path_arrival;
|
||||
}
|
||||
return arrival;
|
||||
|
|
@ -2782,7 +2782,7 @@ Sta::vertexRequired(Vertex *vertex,
|
|||
const Path *path = path_iter.next();
|
||||
if (path->minMax(this) == min_max) {
|
||||
const Required path_required = path->required(this);
|
||||
if (fuzzyGreater(path_required, required, req_min_max))
|
||||
if (delayGreater(path_required, required, req_min_max))
|
||||
required = path_required;
|
||||
}
|
||||
}
|
||||
|
|
@ -2812,7 +2812,7 @@ Sta::vertexRequired(Vertex *vertex,
|
|||
const Required path_required = path->required(this);
|
||||
if ((clk_edge == clk_edge_wildcard
|
||||
|| path->clkEdge(search_) == clk_edge)
|
||||
&& fuzzyGreater(path_required, required, min_max))
|
||||
&& delayGreater(path_required, required, min_max))
|
||||
required = path_required;
|
||||
}
|
||||
return required;
|
||||
|
|
@ -2830,7 +2830,8 @@ Sta::netSlack(const Net *net,
|
|||
if (network_->isLoad(pin)) {
|
||||
Vertex *vertex = graph_->pinLoadVertex(pin);
|
||||
Slack pin_slack = vertexSlack(vertex, min_max);
|
||||
slack = min(slack, pin_slack);
|
||||
if (delayLess(pin_slack, slack))
|
||||
slack = pin_slack;
|
||||
}
|
||||
}
|
||||
return slack;
|
||||
|
|
@ -2846,8 +2847,11 @@ Sta::pinSlack(const Pin *pin,
|
|||
Slack slack = MinMax::min()->initValue();
|
||||
if (vertex)
|
||||
slack = vertexSlack(vertex, min_max);
|
||||
if (bidirect_drvr_vertex)
|
||||
slack = min(slack, vertexSlack(bidirect_drvr_vertex, min_max));
|
||||
if (bidirect_drvr_vertex) {
|
||||
Slack slack1 = vertexSlack(bidirect_drvr_vertex, min_max);
|
||||
if (delayLess(slack1, slack))
|
||||
slack = slack1;
|
||||
}
|
||||
return slack;
|
||||
}
|
||||
|
||||
|
|
@ -2862,8 +2866,11 @@ Sta::pinSlack(const Pin *pin,
|
|||
Slack slack = MinMax::min()->initValue();
|
||||
if (vertex)
|
||||
slack = vertexSlack(vertex, rf, min_max);
|
||||
if (bidirect_drvr_vertex)
|
||||
slack = min(slack, vertexSlack(bidirect_drvr_vertex, rf, min_max));
|
||||
if (bidirect_drvr_vertex) {
|
||||
Slack slack1 = vertexSlack(bidirect_drvr_vertex, rf, min_max);
|
||||
if (delayLess(slack1, slack))
|
||||
slack = slack1;
|
||||
}
|
||||
return slack;
|
||||
}
|
||||
|
||||
|
|
@ -2879,7 +2886,7 @@ Sta::vertexSlack(Vertex *vertex,
|
|||
Path *path = path_iter.next();
|
||||
if (path->minMax(this) == min_max) {
|
||||
Slack path_slack = path->slack(this);
|
||||
if (path_slack < slack)
|
||||
if (delayLess(path_slack, slack))
|
||||
slack = path_slack;
|
||||
}
|
||||
}
|
||||
|
|
@ -2897,7 +2904,7 @@ Sta::vertexSlack(Vertex *vertex,
|
|||
while (path_iter.hasNext()) {
|
||||
Path *path = path_iter.next();
|
||||
Slack path_slack = path->slack(this);
|
||||
if (path_slack < slack)
|
||||
if (delayLess(path_slack, slack))
|
||||
slack = path_slack;
|
||||
}
|
||||
return slack;
|
||||
|
|
@ -2936,7 +2943,7 @@ Sta::vertexSlack1(Vertex *vertex,
|
|||
Slack path_slack = path->slack(this);
|
||||
if ((clk_edge == clk_edge_wildcard
|
||||
|| path->clkEdge(search_) == clk_edge)
|
||||
&& path_slack < slack)
|
||||
&& delayLess(path_slack, slack))
|
||||
slack = path_slack;
|
||||
}
|
||||
return slack;
|
||||
|
|
@ -2958,7 +2965,7 @@ Sta::vertexSlacks(Vertex *vertex,
|
|||
Slack path_slack = path->slack(this);
|
||||
int rf_index = path->rfIndex(this);
|
||||
int mm_index = path->minMax(this)->index();
|
||||
if (path_slack < slacks[rf_index][mm_index])
|
||||
if (delayLess(path_slack, slacks[rf_index][mm_index]))
|
||||
slacks[rf_index][mm_index] = path_slack;
|
||||
}
|
||||
}
|
||||
|
|
@ -3153,7 +3160,7 @@ Sta::vertexSlew(Vertex *vertex,
|
|||
Slew mm_slew = min_max->initValue();
|
||||
for (DcalcAnalysisPt *dcalc_ap : corners_->dcalcAnalysisPts()) {
|
||||
Slew slew = graph_->slew(vertex, rf, dcalc_ap->index());
|
||||
if (fuzzyGreater(slew, mm_slew, min_max))
|
||||
if (delayGreater(slew, mm_slew, min_max))
|
||||
mm_slew = slew;
|
||||
}
|
||||
return mm_slew;
|
||||
|
|
@ -4775,7 +4782,7 @@ bool
|
|||
InstanceMaxSlewGreater::operator()(const Instance *inst1,
|
||||
const Instance *inst2) const
|
||||
{
|
||||
return instMaxSlew(inst1) > instMaxSlew(inst2);
|
||||
return delayGreater(instMaxSlew(inst1), instMaxSlew(inst2));
|
||||
}
|
||||
|
||||
Slew
|
||||
|
|
@ -4792,7 +4799,7 @@ InstanceMaxSlewGreater::instMaxSlew(const Instance *inst) const
|
|||
for (RiseFall *rf : RiseFall::range()) {
|
||||
for (DcalcAnalysisPt *dcalc_ap : sta_->corners()->dcalcAnalysisPts()) {
|
||||
Slew slew = graph->slew(vertex, rf, dcalc_ap->index());
|
||||
if (slew > max_slew)
|
||||
if (delayGreater(slew, max_slew))
|
||||
max_slew = slew;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ WorstSlacks::worstSlack(const MinMax *min_max,
|
|||
Vertex *worst_vertex1;
|
||||
worst_slacks_[path_ap_index].worstSlack(path_ap_index, sta_,
|
||||
worst_slack1, worst_vertex1);
|
||||
if (fuzzyLess(worst_slack1, worst_slack)) {
|
||||
if (delayLess(worst_slack1, worst_slack)) {
|
||||
worst_slack = worst_slack1;
|
||||
worst_vertex = worst_vertex1;
|
||||
}
|
||||
|
|
@ -159,10 +159,10 @@ WorstSlack::initQueue(PathAPIndex path_ap_index,
|
|||
while (end_iter.hasNext()) {
|
||||
Vertex *vertex = end_iter.next();
|
||||
Slack slack = search->wnsSlack(vertex, path_ap_index);
|
||||
if (!fuzzyEqual(slack, slack_init_)) {
|
||||
if (fuzzyLess(slack, worst_slack_))
|
||||
if (!delayEqual(slack, slack_init_)) {
|
||||
if (delayLess(slack, worst_slack_))
|
||||
setWorstSlack(vertex, slack, sta);
|
||||
if (fuzzyLessEqual(slack, slack_threshold_))
|
||||
if (delayLessEqual(slack, slack_threshold_))
|
||||
queue_.insert(vertex);
|
||||
int queue_size = queue_.size();
|
||||
if (queue_size >= max_queue_size_)
|
||||
|
|
@ -206,7 +206,7 @@ WorstSlack::sortQueue(PathAPIndex path_ap_index,
|
|||
while (queue_iter2.hasNext()) {
|
||||
Vertex *vertex = queue_iter2.next();
|
||||
Slack slack = search->wnsSlack(vertex, path_ap_index);
|
||||
if (fuzzyGreater(slack, slack_threshold_))
|
||||
if (delayGreater(slack, slack_threshold_))
|
||||
break;
|
||||
queue_.insert(vertex);
|
||||
}
|
||||
|
|
@ -231,7 +231,7 @@ WorstSlack::findWorstInQueue(PathAPIndex path_ap_index,
|
|||
while (queue_iter.hasNext()) {
|
||||
Vertex *vertex = queue_iter.next();
|
||||
Slack slack = search->wnsSlack(vertex, path_ap_index);
|
||||
if (slack < worst_slack_)
|
||||
if (delayLess(slack, worst_slack_))
|
||||
setWorstSlack(vertex, slack, sta);
|
||||
}
|
||||
}
|
||||
|
|
@ -248,7 +248,7 @@ WorstSlack::checkQueue(PathAPIndex path_ap_index,
|
|||
VertexSet::Iterator end_iter(search->endpoints());
|
||||
while (end_iter.hasNext()) {
|
||||
Vertex *end = end_iter.next();
|
||||
if (fuzzyLessEqual(search->wnsSlack(end, path_ap_index),
|
||||
if (delayLessEqual(search->wnsSlack(end, path_ap_index),
|
||||
slack_threshold_))
|
||||
ends.push_back(end);
|
||||
}
|
||||
|
|
@ -261,7 +261,7 @@ WorstSlack::checkQueue(PathAPIndex path_ap_index,
|
|||
Vertex *end = end_iter2.next();
|
||||
end_set.insert(end);
|
||||
if (!queue_.hasKey(end)
|
||||
&& fuzzyLessEqual(search->wnsSlack(end, path_ap_index),
|
||||
&& delayLessEqual(search->wnsSlack(end, path_ap_index),
|
||||
slack_threshold_))
|
||||
report->print("WorstSlack queue missing %s %s < %s\n",
|
||||
end->name(network),
|
||||
|
|
@ -294,14 +294,14 @@ WorstSlack::updateWorstSlack(Vertex *vertex,
|
|||
// threads.
|
||||
UniqueLock lock(lock_);
|
||||
if (worst_vertex_
|
||||
&& fuzzyLess(slack, worst_slack_))
|
||||
&& delayLess(slack, worst_slack_))
|
||||
setWorstSlack(vertex, slack, sta);
|
||||
else if (vertex == worst_vertex_)
|
||||
// Mark worst slack as unknown (updated by findWorstSlack().
|
||||
worst_vertex_ = nullptr;
|
||||
|
||||
if (!fuzzyEqual(slack, slack_init_)
|
||||
&& fuzzyLessEqual(slack, slack_threshold_)) {
|
||||
if (!delayEqual(slack, slack_init_)
|
||||
&& delayLessEqual(slack, slack_threshold_)) {
|
||||
debugPrint2(debug, "wns", 3, "insert %s %s\n",
|
||||
vertex->name(network),
|
||||
delayAsString(slack, sta));
|
||||
|
|
@ -341,8 +341,8 @@ bool
|
|||
WnsSlackLess::operator()(Vertex *vertex1,
|
||||
Vertex *vertex2)
|
||||
{
|
||||
return fuzzyLess(search_->wnsSlack(vertex1, path_ap_index_),
|
||||
search_->wnsSlack(vertex2, path_ap_index_));
|
||||
return delayLess(search_->wnsSlack(vertex1, path_ap_index_),
|
||||
search_->wnsSlack(vertex2, path_ap_index_));
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
Loading…
Reference in New Issue