get_property lib_pin intrinsic_delay
This commit is contained in:
parent
01a1ab6707
commit
f457b75304
|
|
@ -655,10 +655,14 @@ public:
|
||||||
void setCapacitance(const RiseFall *rf,
|
void setCapacitance(const RiseFall *rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
float cap);
|
float cap);
|
||||||
float driveResistance(const RiseFall *rf,
|
|
||||||
const MinMax *min_max) const;
|
|
||||||
// Max of rise/fall.
|
// Max of rise/fall.
|
||||||
float driveResistance() const;
|
float driveResistance() const;
|
||||||
|
float driveResistance(const RiseFall *rf,
|
||||||
|
const MinMax *min_max) const;
|
||||||
|
// Zero load delay.
|
||||||
|
float intrinsicDelay() const;
|
||||||
|
float intrinsicDelay(const RiseFall *rf,
|
||||||
|
const MinMax *min_max) const;
|
||||||
FuncExpr *function() const { return function_; }
|
FuncExpr *function() const { return function_; }
|
||||||
void setFunction(FuncExpr *func);
|
void setFunction(FuncExpr *func);
|
||||||
FuncExpr *&functionRef() { return function_; }
|
FuncExpr *&functionRef() { return function_; }
|
||||||
|
|
|
||||||
|
|
@ -1989,7 +1989,13 @@ LibertyPort::capacitanceIsOneValue() const
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Use the min/max "drive" for all the timing arcs in the cell.
|
float
|
||||||
|
LibertyPort::driveResistance() const
|
||||||
|
{
|
||||||
|
return driveResistance(nullptr, MinMax::max());
|
||||||
|
}
|
||||||
|
|
||||||
|
// Min/max "drive" for all cell timing arcs.
|
||||||
float
|
float
|
||||||
LibertyPort::driveResistance(const RiseFall *rf,
|
LibertyPort::driveResistance(const RiseFall *rf,
|
||||||
const MinMax *min_max) const
|
const MinMax *min_max) const
|
||||||
|
|
@ -2023,11 +2029,49 @@ LibertyPort::driveResistance(const RiseFall *rf,
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
LibertyPort::driveResistance() const
|
LibertyPort::intrinsicDelay() const
|
||||||
{
|
{
|
||||||
return driveResistance(nullptr, MinMax::max());
|
return intrinsicDelay(nullptr, MinMax::max());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
LibertyPort::intrinsicDelay(const RiseFall *rf,
|
||||||
|
const MinMax *min_max) const
|
||||||
|
{
|
||||||
|
float max_delay = min_max->initValue();
|
||||||
|
bool found_delay = false;
|
||||||
|
LibertyCellTimingArcSetIterator set_iter(liberty_cell_, nullptr, this);
|
||||||
|
while (set_iter.hasNext()) {
|
||||||
|
TimingArcSet *set = set_iter.next();
|
||||||
|
if (!set->role()->isTimingCheck()) {
|
||||||
|
TimingArcSetArcIterator arc_iter(set);
|
||||||
|
while (arc_iter.hasNext()) {
|
||||||
|
TimingArc *arc = arc_iter.next();
|
||||||
|
if (rf == nullptr
|
||||||
|
|| arc->toTrans()->asRiseFall() == rf) {
|
||||||
|
GateTimingModel *model = dynamic_cast<GateTimingModel*>(arc->model());
|
||||||
|
if (model) {
|
||||||
|
ArcDelay arc_delay;
|
||||||
|
Slew slew;
|
||||||
|
model->gateDelay(liberty_cell_, nullptr, 0.0, 0.0, 0.0, false,
|
||||||
|
arc_delay, slew);
|
||||||
|
float delay = delayAsFloat(arc_delay);
|
||||||
|
if (min_max->compare(delay, max_delay))
|
||||||
|
max_delay = delay;
|
||||||
|
found_delay = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (found_delay)
|
||||||
|
return max_delay;
|
||||||
|
else
|
||||||
|
return 0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void
|
void
|
||||||
LibertyPort::setFunction(FuncExpr *func)
|
LibertyPort::setFunction(FuncExpr *func)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -691,23 +691,48 @@ getProperty(const LibertyPort *port,
|
||||||
}
|
}
|
||||||
else if (stringEqual(property, "is_register_clock"))
|
else if (stringEqual(property, "is_register_clock"))
|
||||||
return PropertyValue(port->isRegClk());
|
return PropertyValue(port->isRegClk());
|
||||||
|
|
||||||
else if (stringEqual(property, "drive_resistance")) {
|
else if (stringEqual(property, "drive_resistance")) {
|
||||||
float drive = max(port->driveResistance(RiseFall::rise(), MinMax::max()),
|
float res = port->driveResistance();
|
||||||
port->driveResistance(RiseFall::fall(), MinMax::max()));
|
return PropertyValue(sta->units()->resistanceUnit()->asString(res, 6));
|
||||||
return PropertyValue(drive);
|
}
|
||||||
|
else if (stringEqual(property, "drive_resistance_rise_min")) {
|
||||||
|
float res = port->driveResistance(RiseFall::rise(), MinMax::min());
|
||||||
|
return PropertyValue(sta->units()->resistanceUnit()->asString(res, 6));
|
||||||
|
}
|
||||||
|
else if (stringEqual(property, "drive_resistance_rise_max")) {
|
||||||
|
float res = port->driveResistance(RiseFall::rise(), MinMax::max());
|
||||||
|
return PropertyValue(sta->units()->resistanceUnit()->asString(res, 6));
|
||||||
|
}
|
||||||
|
else if (stringEqual(property, "drive_resistance_fall_min")) {
|
||||||
|
float res = port->driveResistance(RiseFall::fall(), MinMax::min());
|
||||||
|
return PropertyValue(sta->units()->resistanceUnit()->asString(res, 6));
|
||||||
|
}
|
||||||
|
else if (stringEqual(property, "drive_resistance_fall_max")) {
|
||||||
|
float res = port->driveResistance(RiseFall::fall(), MinMax::max());
|
||||||
|
return PropertyValue(sta->units()->resistanceUnit()->asString(res, 6));
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (stringEqual(property, "intrinsic_delay")) {
|
||||||
|
float drive = port->intrinsicDelay();
|
||||||
|
return PropertyValue(sta->units()->timeUnit()->asString(drive, 6));
|
||||||
|
}
|
||||||
|
else if (stringEqual(property, "intrinsic_delay_rise_min")) {
|
||||||
|
float drive = port->intrinsicDelay(RiseFall::rise(), MinMax::min());
|
||||||
|
return PropertyValue(sta->units()->timeUnit()->asString(drive, 6));
|
||||||
|
}
|
||||||
|
else if (stringEqual(property, "intrinsic_delay_rise_max")) {
|
||||||
|
float drive = port->intrinsicDelay(RiseFall::rise(), MinMax::max());
|
||||||
|
return PropertyValue(sta->units()->timeUnit()->asString(drive, 6));
|
||||||
|
}
|
||||||
|
else if (stringEqual(property, "intrinsic_delay_fall_min")) {
|
||||||
|
float drive = port->intrinsicDelay(RiseFall::fall(), MinMax::min());
|
||||||
|
return PropertyValue(sta->units()->timeUnit()->asString(drive, 6));
|
||||||
|
}
|
||||||
|
else if (stringEqual(property, "intrinsic_delay_fall_max")) {
|
||||||
|
float drive = port->intrinsicDelay(RiseFall::fall(), MinMax::max());
|
||||||
|
return PropertyValue(sta->units()->timeUnit()->asString(drive, 6));
|
||||||
}
|
}
|
||||||
else if (stringEqual(property, "drive_resistance_rise_min"))
|
|
||||||
return PropertyValue(port->driveResistance(RiseFall::rise(),
|
|
||||||
MinMax::min()));
|
|
||||||
else if (stringEqual(property, "drive_resistance_rise_max"))
|
|
||||||
return PropertyValue(port->driveResistance(RiseFall::rise(),
|
|
||||||
MinMax::max()));
|
|
||||||
else if (stringEqual(property, "drive_resistance_fall_min"))
|
|
||||||
return PropertyValue(port->driveResistance(RiseFall::fall(),
|
|
||||||
MinMax::min()));
|
|
||||||
else if (stringEqual(property, "drive_resistance_fall_max"))
|
|
||||||
return PropertyValue(port->driveResistance(RiseFall::fall(),
|
|
||||||
MinMax::max()));
|
|
||||||
else
|
else
|
||||||
throw PropertyUnknown("liberty port", property);
|
throw PropertyUnknown("liberty port", property);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue