report_path -report_sigmas show incr
This commit is contained in:
parent
0c38b46b7b
commit
ee0e23c573
|
|
@ -48,6 +48,46 @@ delayIsInitValue(const Delay &delay,
|
|||
return fuzzyEqual(delay, min_max->initValue());
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta)
|
||||
{
|
||||
return delayAsString(delay, sta, sta->units()->timeUnit()->digits());
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits)
|
||||
{
|
||||
return sta->units()->timeUnit()->asString(delay, digits);
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *,
|
||||
const StaState *sta,
|
||||
int digits)
|
||||
{
|
||||
const Unit *unit = sta->units()->timeUnit();
|
||||
return unit->asString(delay, digits);
|
||||
}
|
||||
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
const EarlyLate *,
|
||||
const StaState *)
|
||||
{
|
||||
return delay;
|
||||
}
|
||||
|
||||
float
|
||||
delaySigma2(const Delay &,
|
||||
const EarlyLate *)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
bool
|
||||
fuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
|
|
@ -92,6 +132,13 @@ fuzzyLessEqual(const Delay &delay1,
|
|||
return fuzzyGreaterEqual(delay1, delay2);
|
||||
}
|
||||
|
||||
Delay
|
||||
delayRemove(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return delay1 - delay2;
|
||||
}
|
||||
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
|
|
@ -99,46 +146,6 @@ delayRatio(const Delay &delay1,
|
|||
return delay1 / delay2;
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta)
|
||||
{
|
||||
return delayAsString(delay, sta, sta->units()->timeUnit()->digits());
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const StaState *sta,
|
||||
int digits)
|
||||
{
|
||||
return sta->units()->timeUnit()->asString(delay, digits);
|
||||
}
|
||||
|
||||
const char *
|
||||
delayAsString(const Delay &delay,
|
||||
const EarlyLate *,
|
||||
const StaState *sta,
|
||||
int digits)
|
||||
{
|
||||
const Unit *unit = sta->units()->timeUnit();
|
||||
return unit->asString(delay, digits);
|
||||
}
|
||||
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
const EarlyLate *,
|
||||
const StaState *)
|
||||
{
|
||||
return delay;
|
||||
}
|
||||
|
||||
float
|
||||
delaySigma2(const Delay &,
|
||||
const EarlyLate *)
|
||||
{
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // !SSTA
|
||||
|
|
|
|||
|
|
@ -337,37 +337,6 @@ fuzzyLess(const Delay &delay1,
|
|||
return fuzzyGreater(delay1.mean(), delay2.mean());
|
||||
}
|
||||
|
||||
Delay
|
||||
operator+(float delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return Delay(delay1 + delay2.mean(),
|
||||
delay2.sigma2());
|
||||
}
|
||||
|
||||
Delay
|
||||
operator/(float delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return Delay(delay1 / delay2.mean(),
|
||||
delay2.sigma2());
|
||||
}
|
||||
|
||||
Delay
|
||||
operator*(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
return Delay(delay1.mean() * delay2,
|
||||
delay1.sigma2() * delay2 * delay2);
|
||||
}
|
||||
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return delay1.mean() / delay2.mean();
|
||||
}
|
||||
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
const EarlyLate *early_late,
|
||||
|
|
@ -425,6 +394,45 @@ delayAsString(const Delay &delay,
|
|||
return sta->units()->timeUnit()->asString(mean_sigma, digits);
|
||||
}
|
||||
|
||||
Delay
|
||||
delayRemove(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return Delay(delay1.mean() - delay2.mean(),
|
||||
delay1.sigma2() - delay2.sigma2());
|
||||
}
|
||||
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return delay1.mean() / delay2.mean();
|
||||
}
|
||||
|
||||
Delay
|
||||
operator+(float delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return Delay(delay1 + delay2.mean(),
|
||||
delay2.sigma2());
|
||||
}
|
||||
|
||||
Delay
|
||||
operator/(float delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return Delay(delay1 / delay2.mean(),
|
||||
delay2.sigma2());
|
||||
}
|
||||
|
||||
Delay
|
||||
operator*(const Delay &delay1,
|
||||
float delay2)
|
||||
{
|
||||
return Delay(delay1.mean() * delay2,
|
||||
delay1.sigma2() * delay2 * delay2);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
#endif // (SSTA == 1)
|
||||
|
|
|
|||
|
|
@ -388,6 +388,15 @@ operator*(const Delay &delay1,
|
|||
delay1.sigma2Late() * delay2 * delay2);
|
||||
}
|
||||
|
||||
Delay
|
||||
delayRemove(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
{
|
||||
return Delay(delay1.mean() - delay2.mean(),
|
||||
delay1.sigma2Early() - delay2.sigma2Early(),
|
||||
delay1.sigma2Late() - delay2.sigma2Late());
|
||||
}
|
||||
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2)
|
||||
|
|
|
|||
|
|
@ -95,6 +95,10 @@ bool
|
|||
fuzzyLessEqual(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
|
||||
Delay
|
||||
delayRemove(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
|
|
|
|||
|
|
@ -77,19 +77,6 @@ makeDelay2(float delay,
|
|||
inline float
|
||||
delayAsFloat(const Delay &delay) { return delay.mean(); }
|
||||
|
||||
// Most non-operator functions on Delay are not defined as member
|
||||
// functions so they can be defined on floats, where there is no class
|
||||
// to define them.
|
||||
|
||||
Delay operator+(float delay1,
|
||||
const Delay &delay2);
|
||||
// Used for parallel gate delay calc.
|
||||
Delay operator/(float delay1,
|
||||
const Delay &delay2);
|
||||
// Used for parallel gate delay calc.
|
||||
Delay operator*(const Delay &delay1,
|
||||
float delay2);
|
||||
|
||||
// mean late+/early- sigma
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
|
|
@ -150,8 +137,24 @@ bool
|
|||
fuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
// delay1-delay2 subtracting sigma instead of addiing.
|
||||
Delay delayRemove(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
|
||||
// Most non-operator functions on Delay are not defined as member
|
||||
// functions so they can be defined on floats, where there is no class
|
||||
// to define them.
|
||||
|
||||
Delay operator+(float delay1,
|
||||
const Delay &delay2);
|
||||
// Used for parallel gate delay calc.
|
||||
Delay operator/(float delay1,
|
||||
const Delay &delay2);
|
||||
// Used for parallel gate delay calc.
|
||||
Delay operator*(const Delay &delay1,
|
||||
float delay2);
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -84,19 +84,6 @@ makeDelay2(float delay,
|
|||
inline float
|
||||
delayAsFloat(const Delay &delay) { return delay.mean(); }
|
||||
|
||||
// Most non-operator functions on Delay are not defined as member
|
||||
// functions so they can be defined on floats, where there is no class
|
||||
// to define them.
|
||||
|
||||
Delay operator+(float delay1,
|
||||
const Delay &delay2);
|
||||
// Used for parallel gate delay calc.
|
||||
Delay operator/(float delay1,
|
||||
const Delay &delay2);
|
||||
// Used for parallel gate delay calc.
|
||||
Delay operator*(const Delay &delay1,
|
||||
float delay2);
|
||||
|
||||
// mean late+/early- sigma
|
||||
float
|
||||
delayAsFloat(const Delay &delay,
|
||||
|
|
@ -157,8 +144,24 @@ bool
|
|||
fuzzyGreater(const Delay &delay1,
|
||||
const Delay &delay2,
|
||||
const MinMax *min_max);
|
||||
// delay1-delay2 subtracting sigma instead of addiing.
|
||||
Delay delayRemove(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
float
|
||||
delayRatio(const Delay &delay1,
|
||||
const Delay &delay2);
|
||||
|
||||
// Most non-operator functions on Delay are not defined as member
|
||||
// functions so they can be defined on floats, where there is no class
|
||||
// to define them.
|
||||
|
||||
Delay operator+(float delay1,
|
||||
const Delay &delay2);
|
||||
// Used for parallel gate delay calc.
|
||||
Delay operator/(float delay1,
|
||||
const Delay &delay2);
|
||||
// Used for parallel gate delay calc.
|
||||
Delay operator*(const Delay &delay1,
|
||||
float delay2);
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -2608,7 +2608,7 @@ ReportPath::reportPath5(const Path *path,
|
|||
Vertex *vertex = path1->vertex(this);
|
||||
Pin *pin = vertex->pin();
|
||||
Arrival time = path1->arrival(this) + time_offset;
|
||||
float incr = 0.0;
|
||||
Delay incr = 0.0;
|
||||
const char *line_case = nullptr;
|
||||
bool is_clk_start = network_->isRegClkPin(pin);
|
||||
bool is_clk = path1->isClock(search_);
|
||||
|
|
@ -2633,8 +2633,7 @@ ReportPath::reportPath5(const Path *path,
|
|||
// from the input to the loads. Report the wire delay on the
|
||||
// input pin instead.
|
||||
Arrival next_time = next_path->arrival(this) + time_offset;
|
||||
incr = delayAsFloat(next_time, min_max, this)
|
||||
- delayAsFloat(time, min_max, this);
|
||||
incr = delayIncr(next_time, time, min_max);
|
||||
time = next_time;
|
||||
line_case = "input_drive";
|
||||
}
|
||||
|
|
@ -2681,13 +2680,11 @@ ReportPath::reportPath5(const Path *path,
|
|||
line_case = "clk_ideal";
|
||||
}
|
||||
else if (is_clk && !is_clk_start) {
|
||||
incr = delayAsFloat(time, min_max, this)
|
||||
- delayAsFloat(prev_time, min_max, this);
|
||||
incr = delayIncr(time, prev_time, min_max);
|
||||
line_case = "clk_prop";
|
||||
}
|
||||
else {
|
||||
incr = delayAsFloat(time, min_max, this)
|
||||
- delayAsFloat(prev_time, min_max, this);
|
||||
incr = delayIncr(time, prev_time, min_max);
|
||||
line_case = "normal";
|
||||
}
|
||||
if (report_input_pin_
|
||||
|
|
@ -2739,6 +2736,17 @@ ReportPath::reportPath5(const Path *path,
|
|||
}
|
||||
}
|
||||
|
||||
Delay
|
||||
ReportPath::delayIncr(Delay time,
|
||||
Delay prev,
|
||||
const MinMax *min_max)
|
||||
{
|
||||
if (report_sigmas_)
|
||||
return delayRemove(time, prev);
|
||||
else
|
||||
return delayAsFloat(time, min_max, this) - delayAsFloat(prev, min_max, this);
|
||||
}
|
||||
|
||||
bool
|
||||
ReportPath::nextArcAnnotated(const PathRef *next_path,
|
||||
size_t next_index,
|
||||
|
|
@ -3177,8 +3185,8 @@ ReportPath::reportFieldDelayMinus(Delay value,
|
|||
else {
|
||||
const char *str = report_sigmas_
|
||||
? delayAsString(-value, this, digits_)
|
||||
// : delayAsString(-value, early_late, this, digits_);
|
||||
: units_->timeUnit()->asString(-delayAsFloat(value, early_late, this), digits_);
|
||||
// Opposite min/max for negative value.
|
||||
: delayAsString(-value, early_late->opposite(), this, digits_);
|
||||
if (stringEq(str, plus_zero_))
|
||||
// Force leading minus sign.
|
||||
str = minus_zero_;
|
||||
|
|
|
|||
|
|
@ -514,6 +514,9 @@ protected:
|
|||
PathRef &ref_path);
|
||||
const char *asRisingFalling(const RiseFall *rf);
|
||||
const char *asRiseFall(const RiseFall *rf);
|
||||
Delay delayIncr(Delay time,
|
||||
Delay prev,
|
||||
const MinMax *min_max);
|
||||
|
||||
// Path options.
|
||||
ReportPathFormat format_;
|
||||
|
|
|
|||
Loading…
Reference in New Issue