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());
|
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
|
bool
|
||||||
fuzzyGreater(const Delay &delay1,
|
fuzzyGreater(const Delay &delay1,
|
||||||
const Delay &delay2,
|
const Delay &delay2,
|
||||||
|
|
@ -92,6 +132,13 @@ fuzzyLessEqual(const Delay &delay1,
|
||||||
return fuzzyGreaterEqual(delay1, delay2);
|
return fuzzyGreaterEqual(delay1, delay2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Delay
|
||||||
|
delayRemove(const Delay &delay1,
|
||||||
|
const Delay &delay2)
|
||||||
|
{
|
||||||
|
return delay1 - delay2;
|
||||||
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
delayRatio(const Delay &delay1,
|
delayRatio(const Delay &delay1,
|
||||||
const Delay &delay2)
|
const Delay &delay2)
|
||||||
|
|
@ -99,46 +146,6 @@ delayRatio(const Delay &delay1,
|
||||||
return delay1 / delay2;
|
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
|
} // namespace
|
||||||
|
|
||||||
#endif // !SSTA
|
#endif // !SSTA
|
||||||
|
|
|
||||||
|
|
@ -337,37 +337,6 @@ fuzzyLess(const Delay &delay1,
|
||||||
return fuzzyGreater(delay1.mean(), delay2.mean());
|
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
|
float
|
||||||
delayAsFloat(const Delay &delay,
|
delayAsFloat(const Delay &delay,
|
||||||
const EarlyLate *early_late,
|
const EarlyLate *early_late,
|
||||||
|
|
@ -425,6 +394,45 @@ delayAsString(const Delay &delay,
|
||||||
return sta->units()->timeUnit()->asString(mean_sigma, digits);
|
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
|
} // namespace
|
||||||
|
|
||||||
#endif // (SSTA == 1)
|
#endif // (SSTA == 1)
|
||||||
|
|
|
||||||
|
|
@ -388,6 +388,15 @@ operator*(const Delay &delay1,
|
||||||
delay1.sigma2Late() * delay2 * delay2);
|
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
|
float
|
||||||
delayRatio(const Delay &delay1,
|
delayRatio(const Delay &delay1,
|
||||||
const Delay &delay2)
|
const Delay &delay2)
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,10 @@ bool
|
||||||
fuzzyLessEqual(const Delay &delay1,
|
fuzzyLessEqual(const Delay &delay1,
|
||||||
const Delay &delay2,
|
const Delay &delay2,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
|
|
||||||
|
Delay
|
||||||
|
delayRemove(const Delay &delay1,
|
||||||
|
const Delay &delay2);
|
||||||
float
|
float
|
||||||
delayRatio(const Delay &delay1,
|
delayRatio(const Delay &delay1,
|
||||||
const Delay &delay2);
|
const Delay &delay2);
|
||||||
|
|
|
||||||
|
|
@ -77,19 +77,6 @@ makeDelay2(float delay,
|
||||||
inline float
|
inline float
|
||||||
delayAsFloat(const Delay &delay) { return delay.mean(); }
|
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
|
// mean late+/early- sigma
|
||||||
float
|
float
|
||||||
delayAsFloat(const Delay &delay,
|
delayAsFloat(const Delay &delay,
|
||||||
|
|
@ -150,8 +137,24 @@ bool
|
||||||
fuzzyGreater(const Delay &delay1,
|
fuzzyGreater(const Delay &delay1,
|
||||||
const Delay &delay2,
|
const Delay &delay2,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
|
// delay1-delay2 subtracting sigma instead of addiing.
|
||||||
|
Delay delayRemove(const Delay &delay1,
|
||||||
|
const Delay &delay2);
|
||||||
float
|
float
|
||||||
delayRatio(const Delay &delay1,
|
delayRatio(const Delay &delay1,
|
||||||
const Delay &delay2);
|
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
|
} // namespace
|
||||||
|
|
|
||||||
|
|
@ -84,19 +84,6 @@ makeDelay2(float delay,
|
||||||
inline float
|
inline float
|
||||||
delayAsFloat(const Delay &delay) { return delay.mean(); }
|
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
|
// mean late+/early- sigma
|
||||||
float
|
float
|
||||||
delayAsFloat(const Delay &delay,
|
delayAsFloat(const Delay &delay,
|
||||||
|
|
@ -157,8 +144,24 @@ bool
|
||||||
fuzzyGreater(const Delay &delay1,
|
fuzzyGreater(const Delay &delay1,
|
||||||
const Delay &delay2,
|
const Delay &delay2,
|
||||||
const MinMax *min_max);
|
const MinMax *min_max);
|
||||||
|
// delay1-delay2 subtracting sigma instead of addiing.
|
||||||
|
Delay delayRemove(const Delay &delay1,
|
||||||
|
const Delay &delay2);
|
||||||
float
|
float
|
||||||
delayRatio(const Delay &delay1,
|
delayRatio(const Delay &delay1,
|
||||||
const Delay &delay2);
|
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
|
} // namespace
|
||||||
|
|
|
||||||
|
|
@ -2608,7 +2608,7 @@ ReportPath::reportPath5(const Path *path,
|
||||||
Vertex *vertex = path1->vertex(this);
|
Vertex *vertex = path1->vertex(this);
|
||||||
Pin *pin = vertex->pin();
|
Pin *pin = vertex->pin();
|
||||||
Arrival time = path1->arrival(this) + time_offset;
|
Arrival time = path1->arrival(this) + time_offset;
|
||||||
float incr = 0.0;
|
Delay incr = 0.0;
|
||||||
const char *line_case = nullptr;
|
const char *line_case = nullptr;
|
||||||
bool is_clk_start = network_->isRegClkPin(pin);
|
bool is_clk_start = network_->isRegClkPin(pin);
|
||||||
bool is_clk = path1->isClock(search_);
|
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
|
// from the input to the loads. Report the wire delay on the
|
||||||
// input pin instead.
|
// input pin instead.
|
||||||
Arrival next_time = next_path->arrival(this) + time_offset;
|
Arrival next_time = next_path->arrival(this) + time_offset;
|
||||||
incr = delayAsFloat(next_time, min_max, this)
|
incr = delayIncr(next_time, time, min_max);
|
||||||
- delayAsFloat(time, min_max, this);
|
|
||||||
time = next_time;
|
time = next_time;
|
||||||
line_case = "input_drive";
|
line_case = "input_drive";
|
||||||
}
|
}
|
||||||
|
|
@ -2681,13 +2680,11 @@ ReportPath::reportPath5(const Path *path,
|
||||||
line_case = "clk_ideal";
|
line_case = "clk_ideal";
|
||||||
}
|
}
|
||||||
else if (is_clk && !is_clk_start) {
|
else if (is_clk && !is_clk_start) {
|
||||||
incr = delayAsFloat(time, min_max, this)
|
incr = delayIncr(time, prev_time, min_max);
|
||||||
- delayAsFloat(prev_time, min_max, this);
|
|
||||||
line_case = "clk_prop";
|
line_case = "clk_prop";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
incr = delayAsFloat(time, min_max, this)
|
incr = delayIncr(time, prev_time, min_max);
|
||||||
- delayAsFloat(prev_time, min_max, this);
|
|
||||||
line_case = "normal";
|
line_case = "normal";
|
||||||
}
|
}
|
||||||
if (report_input_pin_
|
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
|
bool
|
||||||
ReportPath::nextArcAnnotated(const PathRef *next_path,
|
ReportPath::nextArcAnnotated(const PathRef *next_path,
|
||||||
size_t next_index,
|
size_t next_index,
|
||||||
|
|
@ -3177,8 +3185,8 @@ ReportPath::reportFieldDelayMinus(Delay value,
|
||||||
else {
|
else {
|
||||||
const char *str = report_sigmas_
|
const char *str = report_sigmas_
|
||||||
? delayAsString(-value, this, digits_)
|
? delayAsString(-value, this, digits_)
|
||||||
// : delayAsString(-value, early_late, this, digits_);
|
// Opposite min/max for negative value.
|
||||||
: units_->timeUnit()->asString(-delayAsFloat(value, early_late, this), digits_);
|
: delayAsString(-value, early_late->opposite(), this, digits_);
|
||||||
if (stringEq(str, plus_zero_))
|
if (stringEq(str, plus_zero_))
|
||||||
// Force leading minus sign.
|
// Force leading minus sign.
|
||||||
str = minus_zero_;
|
str = minus_zero_;
|
||||||
|
|
|
||||||
|
|
@ -514,6 +514,9 @@ protected:
|
||||||
PathRef &ref_path);
|
PathRef &ref_path);
|
||||||
const char *asRisingFalling(const RiseFall *rf);
|
const char *asRisingFalling(const RiseFall *rf);
|
||||||
const char *asRiseFall(const RiseFall *rf);
|
const char *asRiseFall(const RiseFall *rf);
|
||||||
|
Delay delayIncr(Delay time,
|
||||||
|
Delay prev,
|
||||||
|
const MinMax *min_max);
|
||||||
|
|
||||||
// Path options.
|
// Path options.
|
||||||
ReportPathFormat format_;
|
ReportPathFormat format_;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue