dmp dcalc error handling

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2023-04-17 08:52:33 -07:00
parent 54bf27d577
commit c5a38e13de
1 changed files with 4 additions and 3 deletions

View File

@ -601,6 +601,7 @@ DmpAlg::loadDelaySlew(const Pin *,
slew = slew1; slew = slew1;
} }
catch (DmpError &error) { catch (DmpError &error) {
fail(error.what());
delay = elmore_; delay = elmore_;
slew = drvr_slew_; slew = drvr_slew_;
} }
@ -620,7 +621,7 @@ DmpAlg::findVlCrossing(double vth)
double double
DmpAlg::vlCrossingUpperBound() DmpAlg::vlCrossingUpperBound()
{ {
return voCrossingUpperBound() + elmore_; return voCrossingUpperBound() + elmore_ * 2.0;
} }
static void static void
@ -670,8 +671,8 @@ DmpAlg::showVl()
void void
DmpAlg::fail(const char *reason) DmpAlg::fail(const char *reason)
{ {
// Allow only failures to be reported with a unique debug flag. // Report failures with a unique debug flag.
if (debug_->check("dmp_ceff", 1) || debug_->check("dmp_ceff_fail", 1)) if (debug_->check("dmp_ceff", 1) || debug_->check("dcalc_error", 1))
report_->reportLine("delay_calc: DMP failed - %s c2=%s rpi=%s c1=%s rd=%s", report_->reportLine("delay_calc: DMP failed - %s c2=%s rpi=%s c1=%s rd=%s",
reason, reason,
units_->capacitanceUnit()->asString(c2_), units_->capacitanceUnit()->asString(c2_),