load slew include elmore when dcalc fails

This commit is contained in:
James Cherry 2020-10-31 09:30:34 -07:00
parent 0aa454a019
commit d639edaaf8
1 changed files with 9 additions and 2 deletions

View File

@ -25,7 +25,7 @@
#include "DmpCeff.hh"
#include <algorithm> // abs, min
#include <math.h> // sqrt
#include <cmath> // sqrt, log
#include "Report.hh"
#include "Debug.hh"
@ -43,6 +43,9 @@ namespace sta {
using std::abs;
using std::min;
using std::max;
using std::sqrt;
using std::log;
// Tolerance (as a scale of value) for driver parameters (Ceff, delta t, t0).
static const double driver_param_tol = .01;
@ -263,6 +266,7 @@ protected:
// Load rspf elmore delay.
double elmore_;
double p3_;
double elmore_slew_factor_;
private:
virtual double dvl0dt(double t) = 0;
@ -320,6 +324,7 @@ DmpAlg::init(const LibertyLibrary *drvr_library,
vl_ = drvr_library->slewLowerThreshold(rf);
vh_ = drvr_library->slewUpperThreshold(rf);
slew_derate_ = drvr_library->slewDerateFromLibrary();
elmore_slew_factor_ = log(vh_) - log(vl_);
}
// Find Ceff, delta_t and t0 for the driver.
@ -608,7 +613,9 @@ DmpAlg::loadDelaySlew(const Pin *,
else {
// Failed - use elmore delay and driver slew.
delay = static_cast<float>(elmore_);
slew = static_cast<float>(gate_slew_);
// solve v=1-exp(-t/rc) for t, elmore_slew_factor_ = t(vh) - t(vl)
// slew = elmore * (log(vh_) - log(vl_))
slew = static_cast<float>(gate_slew_ + elmore * elmore_slew_factor_);
}
}
}