ArcDelayCalc report return string
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
1dde1f1014
commit
68471a9256
|
|
@ -113,42 +113,40 @@ class ArnoldiDelayCalc : public RCDelayCalc
|
|||
public:
|
||||
ArnoldiDelayCalc(StaState *sta);
|
||||
virtual ~ArnoldiDelayCalc();
|
||||
virtual ArcDelayCalc *copy();
|
||||
virtual Parasitic *findParasitic(const Pin *drvr_pin,
|
||||
const RiseFall *rf,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual ReducedParasiticType reducedParasiticType() const;
|
||||
virtual void gateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
// Pass in load_cap or drvr_parasitic.
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew);
|
||||
virtual void loadDelay(const Pin *load_pin,
|
||||
// Return values.
|
||||
ArcDelay &wire_delay,
|
||||
Slew &load_slew);
|
||||
virtual void inputPortDelay(const Pin *port_pin,
|
||||
float in_slew,
|
||||
const RiseFall *rf,
|
||||
const Parasitic *parasitic,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual void reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result);
|
||||
ArcDelayCalc *copy() override;
|
||||
Parasitic *findParasitic(const Pin *drvr_pin,
|
||||
const RiseFall *rf,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
ReducedParasiticType reducedParasiticType() const override;
|
||||
void inputPortDelay(const Pin *port_pin,
|
||||
float in_slew,
|
||||
const RiseFall *rf,
|
||||
const Parasitic *parasitic,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
void gateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew) override;
|
||||
void loadDelay(const Pin *load_pin,
|
||||
// Return values.
|
||||
ArcDelay &wire_delay,
|
||||
Slew &load_slew) override;
|
||||
string reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits) override;
|
||||
void delay_work_set_thresholds(delay_work *D,
|
||||
double lo,
|
||||
double hi,
|
||||
|
|
@ -455,7 +453,7 @@ ArnoldiDelayCalc::loadDelay(const Pin *load_pin,
|
|||
thresholdAdjust(load_pin, wire_delay, load_slew);
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
ArnoldiDelayCalc::reportGateDelay(const LibertyCell *,
|
||||
const TimingArc *,
|
||||
const Slew &,
|
||||
|
|
@ -464,9 +462,9 @@ ArnoldiDelayCalc::reportGateDelay(const LibertyCell *,
|
|||
float,
|
||||
const Pvt *,
|
||||
const DcalcAnalysisPt *,
|
||||
int,
|
||||
string *)
|
||||
int)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ set_delay_calc_incremental_tolerance(float tol)
|
|||
sta::Sta::sta()->setIncrementalDelayTolerance(tol);
|
||||
}
|
||||
|
||||
TmpString *
|
||||
string
|
||||
report_delay_calc_cmd(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
|
|
|
|||
|
|
@ -1666,7 +1666,7 @@ DmpCeffDelayCalc::ceff(const LibertyCell *drvr_cell,
|
|||
return load_cap;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
DmpCeffDelayCalc::reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
|
|
@ -1675,8 +1675,7 @@ DmpCeffDelayCalc::reportGateDelay(const LibertyCell *drvr_cell,
|
|||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result)
|
||||
int digits)
|
||||
{
|
||||
ArcDelay gate_delay;
|
||||
Slew drvr_slew;
|
||||
|
|
@ -1685,6 +1684,7 @@ DmpCeffDelayCalc::reportGateDelay(const LibertyCell *drvr_cell,
|
|||
gate_delay, drvr_slew);
|
||||
GateTimingModel *model = gateModel(arc, dcalc_ap);
|
||||
float c_eff = 0.0;
|
||||
string result;
|
||||
if (drvr_parasitic_ && dmp_alg_) {
|
||||
c_eff = dmp_alg_->ceff();
|
||||
const LibertyLibrary *drvr_library = drvr_cell->libertyLibrary();
|
||||
|
|
@ -1693,24 +1693,24 @@ DmpCeffDelayCalc::reportGateDelay(const LibertyCell *drvr_cell,
|
|||
const Unit *res_unit = units->resistanceUnit();
|
||||
float c2, rpi, c1;
|
||||
parasitics_->piModel(drvr_parasitic_, c2, rpi, c1);
|
||||
*result += "Pi model C2=";
|
||||
*result += cap_unit->asString(c2, digits);
|
||||
*result += " Rpi=";
|
||||
*result += res_unit->asString(rpi, digits);
|
||||
*result += " C1=";
|
||||
*result += cap_unit->asString(c1, digits);
|
||||
*result += ", Ceff=";
|
||||
*result += cap_unit->asString(c_eff, digits);
|
||||
*result += '\n';
|
||||
result += "Pi model C2=";
|
||||
result += cap_unit->asString(c2, digits);
|
||||
result += " Rpi=";
|
||||
result += res_unit->asString(rpi, digits);
|
||||
result += " C1=";
|
||||
result += cap_unit->asString(c1, digits);
|
||||
result += ", Ceff=";
|
||||
result += cap_unit->asString(c_eff, digits);
|
||||
result += '\n';
|
||||
}
|
||||
else
|
||||
c_eff = load_cap;
|
||||
if (model) {
|
||||
float in_slew1 = delayAsFloat(in_slew);
|
||||
model->reportGateDelay(drvr_cell, pvt, in_slew1, c_eff,
|
||||
related_out_cap, pocv_enabled_,
|
||||
digits, result);
|
||||
result += model->reportGateDelay(drvr_cell, pvt, in_slew1, c_eff,
|
||||
related_out_cap, pocv_enabled_, digits);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
static double
|
||||
|
|
|
|||
|
|
@ -58,16 +58,15 @@ public:
|
|||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual void reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result);
|
||||
virtual string reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits);
|
||||
virtual void copyState(const StaState *sta);
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -33,21 +33,21 @@ class DmpCeffElmoreDelayCalc : public DmpCeffDelayCalc
|
|||
{
|
||||
public:
|
||||
DmpCeffElmoreDelayCalc(StaState *sta);
|
||||
virtual ArcDelayCalc *copy();
|
||||
virtual void gateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &gate_,
|
||||
Slew &drvr_slew);
|
||||
virtual void loadDelay(const Pin *load_pin,
|
||||
ArcDelay &wire_delay,
|
||||
Slew &load_slew);
|
||||
ArcDelayCalc *copy() override;
|
||||
void gateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &gate_,
|
||||
Slew &drvr_slew) override;
|
||||
void loadDelay(const Pin *load_pin,
|
||||
ArcDelay &wire_delay,
|
||||
Slew &load_slew) override;
|
||||
};
|
||||
|
||||
ArcDelayCalc *
|
||||
|
|
|
|||
|
|
@ -36,14 +36,14 @@ GraphDelayCalc::setObserver(DelayCalcObserver *observer)
|
|||
delete observer;
|
||||
}
|
||||
|
||||
string *
|
||||
string
|
||||
GraphDelayCalc::reportDelayCalc(Edge *,
|
||||
TimingArc *,
|
||||
const Corner *,
|
||||
const MinMax *,
|
||||
int)
|
||||
{
|
||||
return new string;
|
||||
return "";
|
||||
}
|
||||
|
||||
float
|
||||
|
|
|
|||
|
|
@ -1629,7 +1629,7 @@ GraphDelayCalc1::ceff(Edge *edge,
|
|||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
string *
|
||||
string
|
||||
GraphDelayCalc1::reportDelayCalc(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
|
|
@ -1643,7 +1643,7 @@ GraphDelayCalc1::reportDelayCalc(Edge *edge,
|
|||
Instance *inst = network_->instance(to_pin);
|
||||
LibertyCell *cell = network_->libertyCell(inst);
|
||||
TimingArcSet *arc_set = edge->timingArcSet();
|
||||
string *result = new string;
|
||||
string result;
|
||||
DcalcAnalysisPt *dcalc_ap = corner->findDcalcAnalysisPt(min_max);
|
||||
const Pvt *pvt = sdc_->pvt(inst, dcalc_ap->constraintMinMax());
|
||||
if (pvt == nullptr)
|
||||
|
|
@ -1668,19 +1668,19 @@ GraphDelayCalc1::reportDelayCalc(Edge *edge,
|
|||
const Slew &to_slew = graph_->slew(to_vertex, to_rf, slew_index);
|
||||
bool from_ideal_clk = clk_network_->isIdealClock(from_vertex->pin());
|
||||
const char *from_slew_annotation = from_ideal_clk ? " (ideal clock)" : nullptr;
|
||||
arc_delay_calc_->reportCheckDelay(cell, arc, from_slew, from_slew_annotation,
|
||||
to_slew, related_out_cap, pvt, dcalc_ap,
|
||||
digits, result);
|
||||
result = arc_delay_calc_->reportCheckDelay(cell, arc, from_slew,
|
||||
from_slew_annotation, to_slew,
|
||||
related_out_cap, pvt, dcalc_ap,
|
||||
digits);
|
||||
}
|
||||
else {
|
||||
Parasitic *to_parasitic =
|
||||
arc_delay_calc_->findParasitic(to_pin, to_rf, dcalc_ap);
|
||||
const Slew &from_slew = edgeFromSlew(from_vertex, from_rf, edge, dcalc_ap);
|
||||
float load_cap = loadCap(to_pin, to_parasitic, to_rf, dcalc_ap);
|
||||
arc_delay_calc_->reportGateDelay(cell, arc,
|
||||
from_slew, load_cap, to_parasitic,
|
||||
related_out_cap, pvt, dcalc_ap,
|
||||
digits, result);
|
||||
result = arc_delay_calc_->reportGateDelay(cell, arc,
|
||||
from_slew, load_cap, to_parasitic,
|
||||
related_out_cap, pvt, dcalc_ap, digits);
|
||||
}
|
||||
arc_delay_calc_->finishDrvrPin();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,11 +44,11 @@ public:
|
|||
virtual void clear();
|
||||
virtual void findDelays(Level level);
|
||||
virtual void findDelays(Vertex *drvr_vertex);
|
||||
virtual string *reportDelayCalc(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
int digits);
|
||||
virtual string reportDelayCalc(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
int digits);
|
||||
virtual float incrementalDelayTolerance();
|
||||
virtual void setIncrementalDelayTolerance(float tol);
|
||||
virtual void setObserver(DelayCalcObserver *observer);
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ LumpedCapDelayCalc::thresholdLibrary(const Pin *load_pin)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
LumpedCapDelayCalc::reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
|
|
@ -247,15 +247,15 @@ LumpedCapDelayCalc::reportGateDelay(const LibertyCell *drvr_cell,
|
|||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result)
|
||||
int digits)
|
||||
{
|
||||
GateTimingModel *model = gateModel(arc, dcalc_ap);
|
||||
if (model) {
|
||||
float in_slew1 = delayAsFloat(in_slew);
|
||||
model->reportGateDelay(drvr_cell, pvt, in_slew1, load_cap,
|
||||
related_out_cap, false, digits, result);
|
||||
return model->reportGateDelay(drvr_cell, pvt, in_slew1, load_cap,
|
||||
related_out_cap, false, digits);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -280,7 +280,7 @@ LumpedCapDelayCalc::checkDelay(const LibertyCell *cell,
|
|||
margin = delay_zero;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
LumpedCapDelayCalc::reportCheckDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
|
|
@ -289,16 +289,16 @@ LumpedCapDelayCalc::reportCheckDelay(const LibertyCell *cell,
|
|||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result)
|
||||
int digits)
|
||||
{
|
||||
CheckTimingModel *model = checkModel(arc, dcalc_ap);
|
||||
if (model) {
|
||||
float from_slew1 = delayAsFloat(from_slew);
|
||||
float to_slew1 = delayAsFloat(to_slew);
|
||||
model->reportCheckDelay(cell, pvt, from_slew1, from_slew_annotation, to_slew1,
|
||||
related_out_cap, false, digits, result);
|
||||
return model->reportCheckDelay(cell, pvt, from_slew1, from_slew_annotation, to_slew1,
|
||||
related_out_cap, false, digits);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -26,70 +26,68 @@ class LumpedCapDelayCalc : public ArcDelayCalc
|
|||
{
|
||||
public:
|
||||
LumpedCapDelayCalc(StaState *sta);
|
||||
virtual ArcDelayCalc *copy();
|
||||
virtual Parasitic *findParasitic(const Pin *drvr_pin,
|
||||
const RiseFall *rf,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual ReducedParasiticType reducedParasiticType() const;
|
||||
virtual void inputPortDelay(const Pin *port_pin,
|
||||
float in_slew,
|
||||
const RiseFall *rf,
|
||||
const Parasitic *parasitic,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual void gateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew);
|
||||
virtual void setMultiDrvrSlewFactor(float factor);
|
||||
virtual void loadDelay(const Pin *load_pin,
|
||||
// Return values.
|
||||
ArcDelay &wire_delay,
|
||||
Slew &load_slew);
|
||||
virtual void checkDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &margin);
|
||||
virtual float ceff(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual void reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result);
|
||||
virtual void reportCheckDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const char *from_slew_annotation,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result);
|
||||
virtual void finishDrvrPin();
|
||||
ArcDelayCalc *copy() override;
|
||||
Parasitic *findParasitic(const Pin *drvr_pin,
|
||||
const RiseFall *rf,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
ReducedParasiticType reducedParasiticType() const override;
|
||||
void inputPortDelay(const Pin *port_pin,
|
||||
float in_slew,
|
||||
const RiseFall *rf,
|
||||
const Parasitic *parasitic,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
void gateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew) override;
|
||||
void setMultiDrvrSlewFactor(float) override;
|
||||
float ceff(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
void loadDelay(const Pin *load_pin,
|
||||
// Return values.
|
||||
ArcDelay &wire_delay,
|
||||
Slew &load_slew) override;
|
||||
void checkDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &margin) override;
|
||||
string reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits) override;
|
||||
string reportCheckDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const char *from_slew_annotation,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits) override;
|
||||
void finishDrvrPin() override;
|
||||
|
||||
protected:
|
||||
// Find the liberty library to use for logic/slew thresholds.
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ class RCDelayCalc : public LumpedCapDelayCalc
|
|||
{
|
||||
public:
|
||||
RCDelayCalc(StaState *sta);
|
||||
virtual ArcDelayCalc *copy();
|
||||
virtual void inputPortDelay(const Pin *port_pin,
|
||||
float in_slew,
|
||||
const RiseFall *rf,
|
||||
const Parasitic *parasitic,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
ArcDelayCalc *copy() override;
|
||||
void inputPortDelay(const Pin *port_pin,
|
||||
float in_slew,
|
||||
const RiseFall *rf,
|
||||
const Parasitic *parasitic,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
|
||||
protected:
|
||||
// Helper function for input ports driving dspf parasitic.
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ UnitDelayCalc::ceff(const LibertyCell *,
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
UnitDelayCalc::reportGateDelay(const LibertyCell *,
|
||||
const TimingArc *,
|
||||
const Slew &,
|
||||
|
|
@ -106,11 +106,11 @@ UnitDelayCalc::reportGateDelay(const LibertyCell *,
|
|||
float,
|
||||
const Pvt *,
|
||||
const DcalcAnalysisPt *,
|
||||
int,
|
||||
string *result)
|
||||
int)
|
||||
{
|
||||
*result += "Delay = 1.0\n";
|
||||
*result += "Slew = 0.0\n";
|
||||
string result("Delay = 1.0\n");
|
||||
result += "Slew = 0.0\n";
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -127,7 +127,7 @@ UnitDelayCalc::checkDelay(const LibertyCell *,
|
|||
margin = units_->timeUnit()->scale();
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
UnitDelayCalc::reportCheckDelay(const LibertyCell *,
|
||||
const TimingArc *,
|
||||
const Slew &,
|
||||
|
|
@ -136,10 +136,9 @@ UnitDelayCalc::reportCheckDelay(const LibertyCell *,
|
|||
float,
|
||||
const Pvt *,
|
||||
const DcalcAnalysisPt *,
|
||||
int,
|
||||
string *result)
|
||||
int)
|
||||
{
|
||||
*result += "Check = 1.0\n";
|
||||
return "Check = 1.0\n";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -25,70 +25,68 @@ class UnitDelayCalc : public ArcDelayCalc
|
|||
{
|
||||
public:
|
||||
UnitDelayCalc(StaState *sta);
|
||||
virtual ArcDelayCalc *copy();
|
||||
virtual Parasitic *findParasitic(const Pin *drvr_pin,
|
||||
const RiseFall *rf,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual ReducedParasiticType reducedParasiticType() const;
|
||||
virtual void gateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew);
|
||||
virtual void loadDelay(const Pin *load_pin,
|
||||
// Return values.
|
||||
ArcDelay &wire_delay,
|
||||
Slew &load_slew);
|
||||
virtual void setMultiDrvrSlewFactor(float) {}
|
||||
virtual float ceff(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual void inputPortDelay(const Pin *port_pin,
|
||||
float in_slew,
|
||||
const RiseFall *rf,
|
||||
const Parasitic *parasitic,
|
||||
const DcalcAnalysisPt *dcalc_ap);
|
||||
virtual void checkDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &margin);
|
||||
virtual void reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result);
|
||||
virtual void reportCheckDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const char *from_slew_annotation,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result);
|
||||
virtual void finishDrvrPin();
|
||||
ArcDelayCalc *copy() override;
|
||||
Parasitic *findParasitic(const Pin *drvr_pin,
|
||||
const RiseFall *rf,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
ReducedParasiticType reducedParasiticType() const override;
|
||||
void inputPortDelay(const Pin *port_pin,
|
||||
float in_slew,
|
||||
const RiseFall *rf,
|
||||
const Parasitic *parasitic,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
void gateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew) override;
|
||||
void loadDelay(const Pin *load_pin,
|
||||
// Return values.
|
||||
ArcDelay &wire_delay,
|
||||
Slew &load_slew) override;
|
||||
void setMultiDrvrSlewFactor(float) override {}
|
||||
float ceff(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap) override;
|
||||
void checkDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
// Return values.
|
||||
ArcDelay &margin) override;
|
||||
string reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits) override;
|
||||
string reportCheckDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const char *from_slew_annotation,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits) override;
|
||||
void finishDrvrPin() override;
|
||||
};
|
||||
|
||||
ArcDelayCalc *
|
||||
|
|
|
|||
|
|
@ -105,28 +105,26 @@ public:
|
|||
// Return values.
|
||||
ArcDelay &margin) = 0;
|
||||
// Report delay and slew calculation.
|
||||
virtual void reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
// Pass in load_cap or drvr_parasitic.
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result) = 0;
|
||||
virtual string reportGateDelay(const LibertyCell *drvr_cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &in_slew,
|
||||
// Pass in load_cap or drvr_parasitic.
|
||||
float load_cap,
|
||||
const Parasitic *drvr_parasitic,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits) = 0;
|
||||
// Report timing check delay calculation.
|
||||
virtual void reportCheckDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const char *from_slew_annotation,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits,
|
||||
string *result) = 0;
|
||||
virtual string reportCheckDelay(const LibertyCell *cell,
|
||||
const TimingArc *arc,
|
||||
const Slew &from_slew,
|
||||
const char *from_slew_annotation,
|
||||
const Slew &to_slew,
|
||||
float related_out_cap,
|
||||
const Pvt *pvt,
|
||||
const DcalcAnalysisPt *dcalc_ap,
|
||||
int digits) = 0;
|
||||
virtual void finishDrvrPin() = 0;
|
||||
|
||||
protected:
|
||||
|
|
|
|||
|
|
@ -56,11 +56,11 @@ public:
|
|||
// Reset to virgin state.
|
||||
virtual void clear() {}
|
||||
// Returned string is owned by the caller.
|
||||
virtual string *reportDelayCalc(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
int digits);
|
||||
virtual string reportDelayCalc(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
int digits);
|
||||
// Percentage (0.0:1.0) change in delay that causes downstream
|
||||
// delays to be recomputed during incremental delay calculation.
|
||||
virtual float incrementalDelayTolerance();
|
||||
|
|
|
|||
|
|
@ -79,12 +79,11 @@ public:
|
|||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap) const;
|
||||
void reportPower(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
int digits,
|
||||
string *result) const;
|
||||
string reportPower(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
int digits) const;
|
||||
|
||||
protected:
|
||||
void findAxisValues(float in_slew,
|
||||
|
|
|
|||
|
|
@ -24,28 +24,27 @@ class GateLinearModel : public GateTimingModel
|
|||
{
|
||||
public:
|
||||
GateLinearModel(float intrinsic, float resistance);
|
||||
// gate delay calculation
|
||||
virtual void gateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float load_cap, float in_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
// return values
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew) const;
|
||||
virtual void reportGateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float load_cap,
|
||||
float in_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits,
|
||||
string *result) const;
|
||||
virtual float driveResistance(const LibertyCell *cell,
|
||||
const Pvt *pvt) const;
|
||||
void gateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew) const override;
|
||||
string reportGateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits) const override;
|
||||
float driveResistance(const LibertyCell *cell,
|
||||
const Pvt *pvt) const override;
|
||||
|
||||
protected:
|
||||
virtual void setIsScaled(bool is_scaled);
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
|
||||
float intrinsic_;
|
||||
float resistance_;
|
||||
|
|
@ -55,26 +54,25 @@ class CheckLinearModel : public CheckTimingModel
|
|||
{
|
||||
public:
|
||||
explicit CheckLinearModel(float intrinsic);
|
||||
// Timing check margin delay calculation.
|
||||
virtual void checkDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
ArcDelay &margin) const;
|
||||
virtual void reportCheckDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits,
|
||||
string *result) const;
|
||||
void checkDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
// Return values.
|
||||
ArcDelay &margin) const override;
|
||||
string reportCheckDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits) const override;
|
||||
|
||||
protected:
|
||||
virtual void setIsScaled(bool is_scaled);
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
|
||||
float intrinsic_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -934,11 +934,11 @@ public:
|
|||
PinSet findGroupPathPins(const char *group_path_name);
|
||||
// Find all required times after updateTiming().
|
||||
void findRequireds();
|
||||
string *reportDelayCalc(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
int digits);
|
||||
string reportDelayCalc(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
const MinMax *min_max,
|
||||
int digits);
|
||||
void writeSdc(const char *filename,
|
||||
// Map hierarchical pins and instances to leaf pins and instances.
|
||||
bool leaf,
|
||||
|
|
|
|||
|
|
@ -58,25 +58,24 @@ public:
|
|||
ReceiverModelPtr receiver_model,
|
||||
OutputWaveforms *output_waveforms);
|
||||
virtual ~GateTableModel();
|
||||
virtual void gateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew) const;
|
||||
virtual void reportGateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits,
|
||||
string *result) const;
|
||||
virtual float driveResistance(const LibertyCell *cell,
|
||||
const Pvt *pvt) const;
|
||||
void gateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew) const override;
|
||||
string reportGateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits) const override;
|
||||
float driveResistance(const LibertyCell *cell,
|
||||
const Pvt *pvt) const override;
|
||||
|
||||
const TableModel *delayModel() const { return delay_model_; }
|
||||
const TableModel *slewModel() const { return slew_model_; }
|
||||
|
|
@ -92,7 +91,7 @@ protected:
|
|||
const Pvt *pvt,
|
||||
float &slew,
|
||||
float &cap) const;
|
||||
virtual void setIsScaled(bool is_scaled);
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
float axisValue(TableAxisPtr axis,
|
||||
float load_cap,
|
||||
float in_slew,
|
||||
|
|
@ -104,16 +103,15 @@ protected:
|
|||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap) const;
|
||||
void reportTableLookup(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
const TableModel *model,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
int digits,
|
||||
string *result) const;
|
||||
string reportTableLookup(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
const TableModel *model,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
int digits) const;
|
||||
void findAxisValues(const TableModel *model,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
|
|
@ -138,23 +136,22 @@ public:
|
|||
explicit CheckTableModel(TableModel *model,
|
||||
TableModel *sigma_models[EarlyLate::index_count]);
|
||||
virtual ~CheckTableModel();
|
||||
virtual void checkDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
// Return values.
|
||||
ArcDelay &margin) const;
|
||||
virtual void reportCheckDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits,
|
||||
string *result) const;
|
||||
void checkDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
// Return values.
|
||||
ArcDelay &margin) const override;
|
||||
string reportCheckDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits) const override;
|
||||
const TableModel *model() const { return model_; }
|
||||
|
||||
// Check the axes before making the model.
|
||||
|
|
@ -162,7 +159,7 @@ public:
|
|||
static bool checkAxes(const TablePtr table);
|
||||
|
||||
protected:
|
||||
virtual void setIsScaled(bool is_scaled);
|
||||
void setIsScaled(bool is_scaled) override;
|
||||
float findValue(const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
|
|
@ -181,17 +178,16 @@ protected:
|
|||
float load_cap,
|
||||
float in_slew,
|
||||
float related_out_cap) const;
|
||||
void reportTableDelay(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
const TableModel *model,
|
||||
float from_slew,
|
||||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
int digits,
|
||||
string *result) const;
|
||||
string reportTableDelay(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
const TableModel *model,
|
||||
float from_slew,
|
||||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
int digits) const;
|
||||
static bool checkAxis(TableAxisPtr axis);
|
||||
|
||||
TableModel *model_;
|
||||
|
|
@ -227,29 +223,27 @@ public:
|
|||
float value1,
|
||||
float value2,
|
||||
float value3) const;
|
||||
void reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const;
|
||||
void report(const Units *units,
|
||||
Report *report) const;
|
||||
string reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits) const;
|
||||
string report(const Units *units,
|
||||
Report *report) const;
|
||||
|
||||
protected:
|
||||
float scaleFactor(const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt) const;
|
||||
void reportPvtScaleFactor(const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
int digits,
|
||||
string *result) const;
|
||||
string reportPvtScaleFactor(const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
int digits) const;
|
||||
|
||||
TablePtr table_;
|
||||
TableTemplate *tbl_template_;
|
||||
|
|
@ -285,17 +279,16 @@ public:
|
|||
float axis_value1,
|
||||
float axis_value2,
|
||||
float axis_value3) const;
|
||||
virtual void reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const = 0;
|
||||
virtual string reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits) const = 0;
|
||||
virtual void report(const Units *units,
|
||||
Report *report) const = 0;
|
||||
};
|
||||
|
|
@ -305,26 +298,25 @@ class Table0 : public Table
|
|||
{
|
||||
public:
|
||||
Table0(float value);
|
||||
virtual int order() const { return 0; }
|
||||
virtual float value(size_t axis_index1,
|
||||
size_t axis_index2,
|
||||
size_t axis_index3) const;
|
||||
virtual float findValue(float axis_value1,
|
||||
float axis_value2,
|
||||
float axis_value3) const;
|
||||
virtual void reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const;
|
||||
virtual void report(const Units *units,
|
||||
Report *report) const;
|
||||
int order() const override { return 0; }
|
||||
float value(size_t axis_index1,
|
||||
size_t axis_index2,
|
||||
size_t axis_index3) const override;
|
||||
float findValue(float axis_value1,
|
||||
float axis_value2,
|
||||
float axis_value3) const override;
|
||||
string reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits) const override;
|
||||
void report(const Units *units,
|
||||
Report *report) const override;
|
||||
using Table::findValue;
|
||||
|
||||
private:
|
||||
|
|
@ -341,35 +333,36 @@ public:
|
|||
virtual ~Table1();
|
||||
Table1(Table1 &&table);
|
||||
Table1 &operator= (Table1 &&table);
|
||||
virtual int order() const { return 1; }
|
||||
virtual TableAxisPtr axis1() const { return axis1_; }
|
||||
virtual float value(size_t axis_index1,
|
||||
size_t axis_index2,
|
||||
size_t axis_index3) const;
|
||||
int order() const override { return 1; }
|
||||
TableAxisPtr axis1() const override { return axis1_; }
|
||||
float value(size_t axis_index1,
|
||||
size_t axis_index2,
|
||||
size_t axis_index3) const override;
|
||||
float findValue(float value1,
|
||||
float value2,
|
||||
float value3) const override;
|
||||
string reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits) const override;
|
||||
void report(const Units *units,
|
||||
Report *report) const override;
|
||||
|
||||
// Table1 specific functions.
|
||||
float value(size_t index1) const;
|
||||
float findValue(float axis_value1) const;
|
||||
void findValue(float axis_value1,
|
||||
// Return values.
|
||||
float &value,
|
||||
bool &extrapolated) const;
|
||||
float findValue(float axis_value1) const;
|
||||
float findValueClip(float axis_value1,
|
||||
float clip_value) const;
|
||||
virtual float findValue(float value1,
|
||||
float value2,
|
||||
float value3) const;
|
||||
virtual void reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const;
|
||||
virtual void report(const Units *units,
|
||||
Report *report) const;
|
||||
FloatSeq *values() const { return values_; }
|
||||
using Table::findValue;
|
||||
|
||||
|
|
@ -386,31 +379,33 @@ public:
|
|||
TableAxisPtr axis1,
|
||||
TableAxisPtr axis2);
|
||||
virtual ~Table2();
|
||||
virtual int order() const { return 2; }
|
||||
TableAxisPtr axis1() const { return axis1_; }
|
||||
TableAxisPtr axis2() const { return axis2_; }
|
||||
virtual float value(size_t axis_index1,
|
||||
size_t axis_index2,
|
||||
size_t axis_index3) const;
|
||||
int order() const override { return 2; }
|
||||
TableAxisPtr axis1() const override { return axis1_; }
|
||||
TableAxisPtr axis2() const override { return axis2_; }
|
||||
float value(size_t axis_index1,
|
||||
size_t axis_index2,
|
||||
size_t axis_index3) const override;
|
||||
float findValue(float value1,
|
||||
float value2,
|
||||
float value3) const override;
|
||||
string reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits) const override;
|
||||
void report(const Units *units,
|
||||
Report *report) const override;
|
||||
|
||||
// Table2 specific functions.
|
||||
float value(size_t axis_index1,
|
||||
size_t axis_index2) const;
|
||||
virtual float findValue(float axis_value1,
|
||||
float axis_value2,
|
||||
float axis_value3) const;
|
||||
FloatTable *values3() { return values_; }
|
||||
virtual void reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const;
|
||||
virtual void report(const Units *units,
|
||||
Report *report) const;
|
||||
|
||||
using Table::findValue;
|
||||
|
||||
protected:
|
||||
|
|
@ -430,27 +425,28 @@ public:
|
|||
TableAxisPtr axis2,
|
||||
TableAxisPtr axis3);
|
||||
virtual ~Table3() {}
|
||||
virtual int order() const { return 3; }
|
||||
TableAxisPtr axis3() const { return axis3_; }
|
||||
virtual float value(size_t axis_index1,
|
||||
size_t axis_index2,
|
||||
size_t axis_index3) const;
|
||||
virtual float findValue(float axis_value1,
|
||||
float axis_value2,
|
||||
float axis_value3) const;
|
||||
virtual void reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const;
|
||||
virtual void report(const Units *units,
|
||||
Report *report) const;
|
||||
int order() const override { return 3; }
|
||||
TableAxisPtr axis1() const override { return axis1_; }
|
||||
TableAxisPtr axis2() const override { return axis2_; }
|
||||
TableAxisPtr axis3() const override { return axis3_; }
|
||||
float value(size_t axis_index1,
|
||||
size_t axis_index2,
|
||||
size_t axis_index3) const override;
|
||||
float findValue(float value1,
|
||||
float value2,
|
||||
float value3) const override;
|
||||
string reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float value1,
|
||||
const char *comment1,
|
||||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits) const override;
|
||||
void report(const Units *units,
|
||||
Report *report) const override;
|
||||
using Table::findValue;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -50,14 +50,13 @@ public:
|
|||
// Return values.
|
||||
ArcDelay &gate_delay,
|
||||
Slew &drvr_slew) const = 0;
|
||||
virtual void reportGateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits,
|
||||
string *result) const = 0;
|
||||
virtual string reportGateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits) const = 0;
|
||||
virtual float driveResistance(const LibertyCell *cell,
|
||||
const Pvt *pvt) const = 0;
|
||||
};
|
||||
|
|
@ -75,15 +74,14 @@ public:
|
|||
bool pocv_enabled,
|
||||
// Return values.
|
||||
ArcDelay &margin) const = 0;
|
||||
virtual void reportCheckDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits,
|
||||
string *result) const = 0;
|
||||
virtual string reportCheckDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits) const = 0;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
|
|
|||
|
|
@ -139,23 +139,23 @@ InternalPowerModel::power(const LibertyCell *cell,
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
InternalPowerModel::reportPower(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
if (model_) {
|
||||
float axis_value1, axis_value2, axis_value3;
|
||||
findAxisValues(in_slew, load_cap,
|
||||
axis_value1, axis_value2, axis_value3);
|
||||
const LibertyLibrary *library = cell->libertyLibrary();
|
||||
model_->reportValue("Power", library, cell, pvt,
|
||||
axis_value1, nullptr, axis_value2, axis_value3,
|
||||
library->units()->powerUnit(), digits, result);
|
||||
return model_->reportValue("Power", library, cell, pvt,
|
||||
axis_value1, nullptr, axis_value2, axis_value3,
|
||||
library->units()->powerUnit(), digits);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -43,30 +43,30 @@ GateLinearModel::gateDelay(const LibertyCell *,
|
|||
drvr_slew = 0.0;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
GateLinearModel::reportGateDelay(const LibertyCell *cell,
|
||||
const Pvt *,
|
||||
float,
|
||||
float load_cap,
|
||||
float,
|
||||
bool,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
const LibertyLibrary *library = cell->libertyLibrary();
|
||||
const Units *units = library->units();
|
||||
const Unit *time_unit = units->timeUnit();
|
||||
const Unit *res_unit = units->resistanceUnit();
|
||||
const Unit *cap_unit = units->capacitanceUnit();
|
||||
*result += "Delay = ";
|
||||
*result += time_unit->asString(intrinsic_, digits);
|
||||
*result += " + ";
|
||||
*result += res_unit->asString(resistance_, digits);
|
||||
*result += " * ";
|
||||
*result += cap_unit->asString(load_cap, digits);
|
||||
*result += " = ";
|
||||
string result = "Delay = ";
|
||||
result += time_unit->asString(intrinsic_, digits);
|
||||
result += " + ";
|
||||
result += res_unit->asString(resistance_, digits);
|
||||
result += " * ";
|
||||
result += cap_unit->asString(load_cap, digits);
|
||||
result += " = ";
|
||||
float delay = intrinsic_ + resistance_ * load_cap;
|
||||
*result += time_unit->asString(delay, digits);
|
||||
result += time_unit->asString(delay, digits);
|
||||
return result;
|
||||
}
|
||||
|
||||
float
|
||||
|
|
@ -98,7 +98,7 @@ CheckLinearModel::checkDelay(const LibertyCell *,
|
|||
margin = intrinsic_;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
CheckLinearModel::reportCheckDelay(const LibertyCell *cell,
|
||||
const Pvt *,
|
||||
float,
|
||||
|
|
@ -106,14 +106,14 @@ CheckLinearModel::reportCheckDelay(const LibertyCell *cell,
|
|||
float,
|
||||
float,
|
||||
bool,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
const LibertyLibrary *library = cell->libertyLibrary();
|
||||
const Units *units = library->units();
|
||||
const Unit *time_unit = units->timeUnit();
|
||||
*result += "Check = ";
|
||||
*result += time_unit->asString(intrinsic_, digits);
|
||||
string result = "Check = ";
|
||||
result += time_unit->asString(intrinsic_, digits);
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -33,13 +33,12 @@ using std::make_shared;
|
|||
|
||||
static void
|
||||
deleteSigmaModels(TableModel *models[EarlyLate::index_count]);
|
||||
static void
|
||||
static string
|
||||
reportPvt(const LibertyLibrary *library,
|
||||
const Pvt *pvt,
|
||||
int digits,
|
||||
string *result);
|
||||
int digits);
|
||||
static void
|
||||
appendSpaces(string *result,
|
||||
appendSpaces(string &result,
|
||||
int count);
|
||||
|
||||
GateTableModel::GateTableModel(TableModel *delay_model,
|
||||
|
|
@ -136,46 +135,46 @@ GateTableModel::gateDelay(const LibertyCell *cell,
|
|||
drvr_slew = makeDelay(slew, sigma_early, sigma_late);
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
GateTableModel::reportGateDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
const LibertyLibrary *library = cell->libertyLibrary();
|
||||
reportPvt(library, pvt, digits, result);
|
||||
reportTableLookup("Delay", library, cell, pvt, delay_model_, in_slew,
|
||||
load_cap, related_out_cap, digits, result);
|
||||
string result = reportPvt(library, pvt, digits);
|
||||
result += reportTableLookup("Delay", library, cell, pvt, delay_model_, in_slew,
|
||||
load_cap, related_out_cap, digits);
|
||||
if (pocv_enabled && delay_sigma_models_[EarlyLate::earlyIndex()])
|
||||
reportTableLookup("Delay sigma(early)", library, cell, pvt,
|
||||
delay_sigma_models_[EarlyLate::earlyIndex()],
|
||||
in_slew, load_cap, related_out_cap, digits, result);
|
||||
result += reportTableLookup("Delay sigma(early)", library, cell, pvt,
|
||||
delay_sigma_models_[EarlyLate::earlyIndex()],
|
||||
in_slew, load_cap, related_out_cap, digits);
|
||||
if (pocv_enabled && delay_sigma_models_[EarlyLate::lateIndex()])
|
||||
reportTableLookup("Delay sigma(late)", library, cell, pvt,
|
||||
delay_sigma_models_[EarlyLate::lateIndex()],
|
||||
in_slew, load_cap, related_out_cap, digits, result);
|
||||
*result += '\n';
|
||||
reportTableLookup("Slew", library, cell, pvt, slew_model_, in_slew,
|
||||
load_cap, related_out_cap, digits, result);
|
||||
result += reportTableLookup("Delay sigma(late)", library, cell, pvt,
|
||||
delay_sigma_models_[EarlyLate::lateIndex()],
|
||||
in_slew, load_cap, related_out_cap, digits);
|
||||
result += '\n';
|
||||
result += reportTableLookup("Slew", library, cell, pvt, slew_model_, in_slew,
|
||||
load_cap, related_out_cap, digits);
|
||||
if (pocv_enabled && slew_sigma_models_[EarlyLate::earlyIndex()])
|
||||
reportTableLookup("Slew sigma(early)", library, cell, pvt,
|
||||
result += reportTableLookup("Slew sigma(early)", library, cell, pvt,
|
||||
slew_sigma_models_[EarlyLate::earlyIndex()],
|
||||
in_slew, load_cap, related_out_cap, digits, result);
|
||||
in_slew, load_cap, related_out_cap, digits);
|
||||
if (pocv_enabled && slew_sigma_models_[EarlyLate::lateIndex()])
|
||||
reportTableLookup("Slew sigma(late)", library, cell, pvt,
|
||||
result += reportTableLookup("Slew sigma(late)", library, cell, pvt,
|
||||
slew_sigma_models_[EarlyLate::lateIndex()],
|
||||
in_slew, load_cap, related_out_cap, digits, result);
|
||||
in_slew, load_cap, related_out_cap, digits);
|
||||
float drvr_slew = findValue(library, cell, pvt, slew_model_, in_slew,
|
||||
load_cap, related_out_cap);
|
||||
if (drvr_slew < 0.0)
|
||||
*result += "Negative slew clipped to 0.0\n";
|
||||
result += "Negative slew clipped to 0.0\n";
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
GateTableModel::reportTableLookup(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
|
|
@ -184,17 +183,17 @@ GateTableModel::reportTableLookup(const char *result_name,
|
|||
float in_slew,
|
||||
float load_cap,
|
||||
float related_out_cap,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
if (model) {
|
||||
float axis_value1, axis_value2, axis_value3;
|
||||
findAxisValues(model, in_slew, load_cap, related_out_cap,
|
||||
axis_value1, axis_value2, axis_value3);
|
||||
model->reportValue(result_name, library, cell, pvt,
|
||||
axis_value1, nullptr, axis_value2, axis_value3,
|
||||
library->units()->timeUnit(), digits, result);
|
||||
return model->reportValue(result_name, library, cell, pvt,
|
||||
axis_value1, nullptr, axis_value2, axis_value3,
|
||||
library->units()->timeUnit(), digits);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
float
|
||||
|
|
@ -470,7 +469,7 @@ CheckTableModel::findValue(const LibertyLibrary *library,
|
|||
return 0.0;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
CheckTableModel::reportCheckDelay(const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
float from_slew,
|
||||
|
|
@ -478,26 +477,26 @@ CheckTableModel::reportCheckDelay(const LibertyCell *cell,
|
|||
float to_slew,
|
||||
float related_out_cap,
|
||||
bool pocv_enabled,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
const LibertyLibrary *library = cell->libertyLibrary();
|
||||
reportTableDelay("Check", library, cell, pvt, model_,
|
||||
from_slew, from_slew_annotation, to_slew,
|
||||
related_out_cap, digits, result);
|
||||
string result = reportTableDelay("Check", library, cell, pvt, model_,
|
||||
from_slew, from_slew_annotation, to_slew,
|
||||
related_out_cap, digits);
|
||||
if (pocv_enabled && sigma_models_[EarlyLate::earlyIndex()])
|
||||
reportTableDelay("Check sigma early", library, cell, pvt,
|
||||
sigma_models_[EarlyLate::earlyIndex()],
|
||||
from_slew, from_slew_annotation, to_slew,
|
||||
related_out_cap, digits, result);
|
||||
result += reportTableDelay("Check sigma early", library, cell, pvt,
|
||||
sigma_models_[EarlyLate::earlyIndex()],
|
||||
from_slew, from_slew_annotation, to_slew,
|
||||
related_out_cap, digits);
|
||||
if (pocv_enabled && sigma_models_[EarlyLate::lateIndex()])
|
||||
reportTableDelay("Check sigma late", library, cell, pvt,
|
||||
sigma_models_[EarlyLate::lateIndex()],
|
||||
from_slew, from_slew_annotation, to_slew,
|
||||
related_out_cap, digits, result);
|
||||
result += reportTableDelay("Check sigma late", library, cell, pvt,
|
||||
sigma_models_[EarlyLate::lateIndex()],
|
||||
from_slew, from_slew_annotation, to_slew,
|
||||
related_out_cap, digits);
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
CheckTableModel::reportTableDelay(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
|
|
@ -507,18 +506,19 @@ CheckTableModel::reportTableDelay(const char *result_name,
|
|||
const char *from_slew_annotation,
|
||||
float to_slew,
|
||||
float related_out_cap,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
if (model) {
|
||||
float axis_value1, axis_value2, axis_value3;
|
||||
findAxisValues(from_slew, to_slew, related_out_cap,
|
||||
axis_value1, axis_value2, axis_value3);
|
||||
reportPvt(library, pvt, digits, result);
|
||||
model_->reportValue(result_name, library, cell, pvt,
|
||||
axis_value1, from_slew_annotation, axis_value2,
|
||||
axis_value3, library->units()->timeUnit(), digits, result);
|
||||
string result = reportPvt(library, pvt, digits);
|
||||
result += model_->reportValue(result_name, library, cell, pvt,
|
||||
axis_value1, from_slew_annotation, axis_value2,
|
||||
axis_value3, library->units()->timeUnit(), digits);
|
||||
return result;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -690,7 +690,7 @@ TableModel::scaleFactor(const LibertyLibrary *library,
|
|||
rf_index_, cell, pvt);
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
TableModel::reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
|
|
@ -700,55 +700,55 @@ TableModel::reportValue(const char *result_name,
|
|||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
table_->reportValue("Table value", library, cell, pvt, value1,
|
||||
comment1, value2, value3, table_unit, digits, result);
|
||||
string result = table_->reportValue("Table value", library, cell, pvt, value1,
|
||||
comment1, value2, value3, table_unit, digits);
|
||||
|
||||
reportPvtScaleFactor(library, cell, pvt, digits, result);
|
||||
result += reportPvtScaleFactor(library, cell, pvt, digits);
|
||||
|
||||
*result += result_name;
|
||||
*result += " = ";
|
||||
*result += table_unit->asString(findValue(library, cell, pvt,
|
||||
result += result_name;
|
||||
result += " = ";
|
||||
result += table_unit->asString(findValue(library, cell, pvt,
|
||||
value1, value2, value3), digits);
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
static string
|
||||
reportPvt(const LibertyLibrary *library,
|
||||
const Pvt *pvt,
|
||||
int digits,
|
||||
string *result)
|
||||
int digits)
|
||||
{
|
||||
if (pvt == nullptr)
|
||||
pvt = library->defaultOperatingConditions();
|
||||
if (pvt) {
|
||||
string pvt_str;
|
||||
stringPrint(pvt_str, "P = %.*f V = %.*f T = %.*f\n",
|
||||
string result;
|
||||
stringPrint(result, "P = %.*f V = %.*f T = %.*f\n",
|
||||
digits, pvt->process(),
|
||||
digits, pvt->voltage(),
|
||||
digits, pvt->temperature());
|
||||
*result += pvt_str;
|
||||
return result;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
TableModel::reportPvtScaleFactor(const LibertyLibrary *library,
|
||||
const LibertyCell *cell,
|
||||
const Pvt *pvt,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
if (pvt == nullptr)
|
||||
pvt = library->defaultOperatingConditions();
|
||||
if (pvt) {
|
||||
string scale_str;
|
||||
stringPrint(scale_str, "PVT scale factor = %.*f\n",
|
||||
string result;
|
||||
stringPrint(result, "PVT scale factor = %.*f\n",
|
||||
digits,
|
||||
scaleFactor(library, cell, pvt));
|
||||
*result += scale_str;
|
||||
return result;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
|
@ -775,7 +775,7 @@ Table0::findValue(float,
|
|||
return value_;
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
Table0::reportValue(const char *result_name,
|
||||
const LibertyLibrary *,
|
||||
const LibertyCell *,
|
||||
|
|
@ -785,15 +785,15 @@ Table0::reportValue(const char *result_name,
|
|||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
*result += result_name;
|
||||
*result += " constant = ";
|
||||
*result += table_unit->asString(findValue(value1, value2, value3), digits);
|
||||
string result = result_name;
|
||||
result += " constant = ";
|
||||
result += table_unit->asString(findValue(value1, value2, value3), digits);
|
||||
if (comment1)
|
||||
*result += comment1;
|
||||
*result += '\n';
|
||||
result += comment1;
|
||||
result += '\n';
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -913,7 +913,7 @@ Table1::findValue(float axis_value1,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
Table1::reportValue(const char *result_name, const
|
||||
LibertyLibrary *library,
|
||||
const LibertyCell *,
|
||||
|
|
@ -923,42 +923,41 @@ Table1::reportValue(const char *result_name, const
|
|||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
const Units *units = library->units();
|
||||
const Unit *unit1 = axis1_->unit(units);
|
||||
*result += "Table is indexed by\n";
|
||||
*result += " ";
|
||||
*result += axis1_->variableString();
|
||||
*result += " = ";
|
||||
*result += unit1->asString(value1, digits);
|
||||
string result = "Table is indexed by\n ";
|
||||
result += axis1_->variableString();
|
||||
result += " = ";
|
||||
result += unit1->asString(value1, digits);
|
||||
if (comment1)
|
||||
*result += comment1;
|
||||
*result += '\n';
|
||||
result += comment1;
|
||||
result += '\n';
|
||||
|
||||
if (axis1_->size() != 1) {
|
||||
size_t index1 = axis1_->findAxisIndex(value1);
|
||||
*result += " ";
|
||||
*result += unit1->asString(axis1_->axisValue(index1), digits);
|
||||
*result += " ";
|
||||
*result += unit1->asString(axis1_->axisValue(index1 + 1), digits);
|
||||
*result += '\n';
|
||||
result += " ";
|
||||
result += unit1->asString(axis1_->axisValue(index1), digits);
|
||||
result += " ";
|
||||
result += unit1->asString(axis1_->axisValue(index1 + 1), digits);
|
||||
result += '\n';
|
||||
|
||||
*result += " --------------------\n";
|
||||
result += " --------------------\n";
|
||||
|
||||
*result += "| ";
|
||||
*result += table_unit->asString(value(index1), digits);
|
||||
*result += " ";
|
||||
*result += table_unit->asString(value(index1 + 1),
|
||||
result += "| ";
|
||||
result += table_unit->asString(value(index1), digits);
|
||||
result += " ";
|
||||
result += table_unit->asString(value(index1 + 1),
|
||||
digits);
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
}
|
||||
|
||||
*result += result_name;
|
||||
*result += " = ";
|
||||
*result += table_unit->asString(findValue(value1, value2, value3), digits);
|
||||
*result += '\n';
|
||||
result += result_name;
|
||||
result += " = ";
|
||||
result += table_unit->asString(findValue(value1, value2, value3), digits);
|
||||
result += '\n';
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1081,7 +1080,7 @@ Table2::findValue(float axis_value1,
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
string
|
||||
Table2::reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *,
|
||||
|
|
@ -1091,62 +1090,62 @@ Table2::reportValue(const char *result_name,
|
|||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
const Units *units = library->units();
|
||||
const Unit *unit1 = axis1_->unit(units);
|
||||
const Unit *unit2 = axis2_->unit(units);
|
||||
*result += "------- ";
|
||||
*result += axis1_->variableString(),
|
||||
*result += " = ";
|
||||
*result += unit1->asString(value1, digits);
|
||||
string result = "------- ";
|
||||
result += axis1_->variableString(),
|
||||
result += " = ";
|
||||
result += unit1->asString(value1, digits);
|
||||
if (comment1)
|
||||
*result += comment1;
|
||||
*result += '\n';
|
||||
result += comment1;
|
||||
result += '\n';
|
||||
|
||||
*result += "| ";
|
||||
*result += axis2_->variableString();
|
||||
*result += " = ";
|
||||
*result += unit2->asString(value2, digits);
|
||||
*result += '\n';
|
||||
result += "| ";
|
||||
result += axis2_->variableString();
|
||||
result += " = ";
|
||||
result += unit2->asString(value2, digits);
|
||||
result += '\n';
|
||||
|
||||
size_t index1 = axis1_->findAxisIndex(value1);
|
||||
size_t index2 = axis2_->findAxisIndex(value2);
|
||||
*result += "| ";
|
||||
*result += unit2->asString(axis2_->axisValue(index2), digits);
|
||||
result += "| ";
|
||||
result += unit2->asString(axis2_->axisValue(index2), digits);
|
||||
if (axis2_->size() != 1) {
|
||||
*result += " ";
|
||||
*result += unit2->asString(axis2_->axisValue(index2 + 1), digits);
|
||||
result += " ";
|
||||
result += unit2->asString(axis2_->axisValue(index2 + 1), digits);
|
||||
}
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
|
||||
*result += "v --------------------\n";
|
||||
*result += unit1->asString(axis1_->axisValue(index1), digits);
|
||||
*result += " | ";
|
||||
result += "v --------------------\n";
|
||||
result += unit1->asString(axis1_->axisValue(index1), digits);
|
||||
result += " | ";
|
||||
|
||||
*result += table_unit->asString(value(index1, index2), digits);
|
||||
result += table_unit->asString(value(index1, index2), digits);
|
||||
if (axis2_->size() != 1) {
|
||||
*result += " ";
|
||||
*result += table_unit->asString(value(index1, index2 + 1), digits);
|
||||
result += " ";
|
||||
result += table_unit->asString(value(index1, index2 + 1), digits);
|
||||
}
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
|
||||
if (axis1_->size() != 1) {
|
||||
*result += unit1->asString(axis1_->axisValue(index1 + 1), digits);
|
||||
*result += " | ";
|
||||
*result += table_unit->asString(value(index1 + 1, index2), digits);
|
||||
result += unit1->asString(axis1_->axisValue(index1 + 1), digits);
|
||||
result += " | ";
|
||||
result += table_unit->asString(value(index1 + 1, index2), digits);
|
||||
if (axis2_->size() != 1) {
|
||||
*result += " ";
|
||||
*result +=table_unit->asString(value(index1 + 1, index2 + 1),digits);
|
||||
result += " ";
|
||||
result +=table_unit->asString(value(index1 + 1, index2 + 1),digits);
|
||||
}
|
||||
}
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
|
||||
*result += result_name;
|
||||
*result += " = ";
|
||||
*result += table_unit->asString(findValue(value1, value2, value3), digits);
|
||||
*result += '\n';
|
||||
result += result_name;
|
||||
result += " = ";
|
||||
result += table_unit->asString(findValue(value1, value2, value3), digits);
|
||||
result += '\n';
|
||||
return result;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -1272,7 +1271,7 @@ Table3::findValue(float axis_value1,
|
|||
// 0.00 0.20 | 0.10 0.20
|
||||
// |/ 0.30 0.32
|
||||
// 0.40 | 0.20 0.30
|
||||
void
|
||||
string
|
||||
Table3::reportValue(const char *result_name,
|
||||
const LibertyLibrary *library,
|
||||
const LibertyCell *,
|
||||
|
|
@ -1282,117 +1281,117 @@ Table3::reportValue(const char *result_name,
|
|||
float value2,
|
||||
float value3,
|
||||
const Unit *table_unit,
|
||||
int digits,
|
||||
string *result) const
|
||||
int digits) const
|
||||
{
|
||||
const Units *units = library->units();
|
||||
const Unit *unit1 = axis1_->unit(units);
|
||||
const Unit *unit2 = axis2_->unit(units);
|
||||
const Unit *unit3 = axis3_->unit(units);
|
||||
|
||||
*result += " --------- ";
|
||||
*result += axis1_->variableString(),
|
||||
*result += " = ";
|
||||
*result += unit1->asString(value1, digits);
|
||||
string result = " --------- ";
|
||||
result += axis1_->variableString(),
|
||||
result += " = ";
|
||||
result += unit1->asString(value1, digits);
|
||||
if (comment1)
|
||||
*result += comment1;
|
||||
*result += '\n';
|
||||
result += comment1;
|
||||
result += '\n';
|
||||
|
||||
*result += " | ---- ";
|
||||
*result += axis2_->variableString(),
|
||||
*result += " = ";
|
||||
*result += unit2->asString(value2, digits);
|
||||
*result += '\n';
|
||||
result += " | ---- ";
|
||||
result += axis2_->variableString(),
|
||||
result += " = ";
|
||||
result += unit2->asString(value2, digits);
|
||||
result += '\n';
|
||||
|
||||
*result += " | | ";
|
||||
*result += axis3_->variableString();
|
||||
*result += " = ";
|
||||
*result += unit3->asString(value3, digits);
|
||||
*result += '\n';
|
||||
result += " | | ";
|
||||
result += axis3_->variableString();
|
||||
result += " = ";
|
||||
result += unit3->asString(value3, digits);
|
||||
result += '\n';
|
||||
|
||||
size_t axis_index1 = axis1_->findAxisIndex(value1);
|
||||
size_t axis_index2 = axis2_->findAxisIndex(value2);
|
||||
size_t axis_index3 = axis3_->findAxisIndex(value3);
|
||||
|
||||
*result += " | | ";
|
||||
*result += unit3->asString(axis3_->axisValue(axis_index3), digits);
|
||||
result += " | | ";
|
||||
result += unit3->asString(axis3_->axisValue(axis_index3), digits);
|
||||
if (axis3_->size() != 1) {
|
||||
*result += " ";
|
||||
*result += unit3->asString(axis3_->axisValue(axis_index3 + 1), digits);
|
||||
result += " ";
|
||||
result += unit3->asString(axis3_->axisValue(axis_index3 + 1), digits);
|
||||
}
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
|
||||
*result += " v | --------------------\n";
|
||||
result += " v | --------------------\n";
|
||||
|
||||
if (axis1_->size() != 1) {
|
||||
*result += " ";
|
||||
*result += unit1->asString(axis1_->axisValue(axis_index1+1), digits);
|
||||
*result += " v / ";
|
||||
*result += table_unit->asString(value(axis_index1+1,axis_index2,axis_index3),
|
||||
result += " ";
|
||||
result += unit1->asString(axis1_->axisValue(axis_index1+1), digits);
|
||||
result += " v / ";
|
||||
result += table_unit->asString(value(axis_index1+1,axis_index2,axis_index3),
|
||||
digits);
|
||||
if (axis3_->size() != 1) {
|
||||
*result += " ";
|
||||
*result += table_unit->asString(value(axis_index1+1,axis_index2,axis_index3+1),
|
||||
result += " ";
|
||||
result += table_unit->asString(value(axis_index1+1,axis_index2,axis_index3+1),
|
||||
digits);
|
||||
}
|
||||
}
|
||||
else {
|
||||
appendSpaces(result, digits+3);
|
||||
*result += " v / ";
|
||||
result += " v / ";
|
||||
}
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
|
||||
*result += unit1->asString(axis1_->axisValue(axis_index1), digits);
|
||||
*result += " ";
|
||||
*result += unit2->asString(axis2_->axisValue(axis_index2), digits);
|
||||
*result += " | ";
|
||||
*result += table_unit->asString(value(axis_index1, axis_index2, axis_index3), digits);
|
||||
result += unit1->asString(axis1_->axisValue(axis_index1), digits);
|
||||
result += " ";
|
||||
result += unit2->asString(axis2_->axisValue(axis_index2), digits);
|
||||
result += " | ";
|
||||
result += table_unit->asString(value(axis_index1, axis_index2, axis_index3), digits);
|
||||
if (axis3_->size() != 1) {
|
||||
*result += " ";
|
||||
*result += table_unit->asString(value(axis_index1, axis_index2, axis_index3+1),
|
||||
result += " ";
|
||||
result += table_unit->asString(value(axis_index1, axis_index2, axis_index3+1),
|
||||
digits);
|
||||
}
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
|
||||
*result += " |/ ";
|
||||
result += " |/ ";
|
||||
if (axis1_->size() != 1
|
||||
&& axis2_->size() != 1) {
|
||||
*result += table_unit->asString(value(axis_index1+1,axis_index2+1,axis_index3),
|
||||
result += table_unit->asString(value(axis_index1+1,axis_index2+1,axis_index3),
|
||||
digits);
|
||||
if (axis3_->size() != 1) {
|
||||
*result += " ";
|
||||
*result +=table_unit->asString(value(axis_index1+1,axis_index2+1,axis_index3+1),
|
||||
result += " ";
|
||||
result +=table_unit->asString(value(axis_index1+1,axis_index2+1,axis_index3+1),
|
||||
digits);
|
||||
}
|
||||
}
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
|
||||
*result += " ";
|
||||
*result += unit2->asString(axis2_->axisValue(axis_index2 + 1), digits);
|
||||
*result += " | ";
|
||||
result += " ";
|
||||
result += unit2->asString(axis2_->axisValue(axis_index2 + 1), digits);
|
||||
result += " | ";
|
||||
if (axis2_->size() != 1) {
|
||||
*result += table_unit->asString(value(axis_index1, axis_index2+1, axis_index3),
|
||||
digits);
|
||||
result += table_unit->asString(value(axis_index1, axis_index2+1, axis_index3),
|
||||
digits);
|
||||
if (axis3_->size() != 1) {
|
||||
*result += " ";
|
||||
*result +=table_unit->asString(value(axis_index1, axis_index2+1,axis_index3+1),
|
||||
digits);
|
||||
result += " ";
|
||||
result +=table_unit->asString(value(axis_index1, axis_index2+1,axis_index3+1),
|
||||
digits);
|
||||
}
|
||||
}
|
||||
*result += '\n';
|
||||
result += '\n';
|
||||
|
||||
*result += result_name;
|
||||
*result += " = ";
|
||||
*result += table_unit->asString(findValue(value1, value2, value3), digits);
|
||||
*result += '\n';
|
||||
result += result_name;
|
||||
result += " = ";
|
||||
result += table_unit->asString(findValue(value1, value2, value3), digits);
|
||||
result += '\n';
|
||||
return result;
|
||||
}
|
||||
|
||||
static void
|
||||
appendSpaces(string *result,
|
||||
appendSpaces(string &result,
|
||||
int count)
|
||||
{
|
||||
while (count--)
|
||||
*result += ' ';
|
||||
result += ' ';
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -3256,7 +3256,7 @@ Sta::worstSlack(const Corner *corner,
|
|||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
string *
|
||||
string
|
||||
Sta::reportDelayCalc(Edge *edge,
|
||||
TimingArc *arc,
|
||||
const Corner *corner,
|
||||
|
|
|
|||
|
|
@ -402,6 +402,13 @@ using namespace sta;
|
|||
//
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
||||
// String that is deleted after crossing over to tcland.
|
||||
%typemap(out) string {
|
||||
string &str = $1;
|
||||
// String is volatile because it is deleted.
|
||||
Tcl_SetResult(interp, const_cast<char*>(str.c_str()), TCL_VOLATILE);
|
||||
}
|
||||
|
||||
// String that is deleted after crossing over to tcland.
|
||||
%typemap(out) TmpString* {
|
||||
string *str = $1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue