set_load -subtract_pin_cap with rise/fall pin caps
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
e748b23187
commit
22acd12935
BIN
doc/OpenSTA.odt
BIN
doc/OpenSTA.odt
Binary file not shown.
BIN
doc/OpenSTA.pdf
BIN
doc/OpenSTA.pdf
Binary file not shown.
|
|
@ -112,6 +112,18 @@ private:
|
||||||
const Network *network_;
|
const Network *network_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class NetWireCaps : public MinMaxFloatValues
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NetWireCaps();
|
||||||
|
bool subtractPinCap(const MinMax *min_max);
|
||||||
|
void setSubtractPinCap(bool subtrace_pin_cap,
|
||||||
|
const MinMax *min_max);
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool subtract_pin_cap_[MinMax::index_count];
|
||||||
|
};
|
||||||
|
|
||||||
typedef Map<const char*,Clock*, CharPtrLess> ClockNameMap;
|
typedef Map<const char*,Clock*, CharPtrLess> ClockNameMap;
|
||||||
typedef UnorderedMap<const Pin*, ClockSet*, PinIdHash> ClockPinMap;
|
typedef UnorderedMap<const Pin*, ClockSet*, PinIdHash> ClockPinMap;
|
||||||
typedef Set<InputDelay*> InputDelaySet;
|
typedef Set<InputDelay*> InputDelaySet;
|
||||||
|
|
@ -149,8 +161,8 @@ typedef Map<const Pin*, MinMaxFloatValues> PinCapLimitMap;
|
||||||
typedef Map<const Port*, MinMaxFloatValues> PortFanoutLimitMap;
|
typedef Map<const Port*, MinMaxFloatValues> PortFanoutLimitMap;
|
||||||
typedef Map<const Cell*, MinMaxFloatValues> CellFanoutLimitMap;
|
typedef Map<const Cell*, MinMaxFloatValues> CellFanoutLimitMap;
|
||||||
typedef Map<const Port*, PortExtCap*, PortIdLess> PortExtCapMap;
|
typedef Map<const Port*, PortExtCap*, PortIdLess> PortExtCapMap;
|
||||||
typedef Map<const Net*, MinMaxFloatValues, NetIdLess> NetWireCapMap;
|
typedef Map<const Net*, NetWireCaps, NetIdLess> NetWireCapMap;
|
||||||
typedef Map<const Pin*, MinMaxFloatValues*, PinIdLess> PinWireCapMap;
|
typedef Map<const Pin*, NetWireCaps*, PinIdLess> PinWireCapMap;
|
||||||
typedef Map<const Instance*, Pvt*> InstancePvtMap;
|
typedef Map<const Instance*, Pvt*> InstancePvtMap;
|
||||||
typedef Map<const Edge*, ClockLatency*> EdgeClockLatencyMap;
|
typedef Map<const Edge*, ClockLatency*> EdgeClockLatencyMap;
|
||||||
typedef Map<const Pin*, RiseFallValues*> PinMinPulseWidthMap;
|
typedef Map<const Pin*, RiseFallValues*> PinMinPulseWidthMap;
|
||||||
|
|
@ -595,7 +607,7 @@ public:
|
||||||
bool subtract_pin_cap,
|
bool subtract_pin_cap,
|
||||||
const Corner *corner,
|
const Corner *corner,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
float cap);
|
float wire_cap);
|
||||||
bool hasNetWireCap(const Net *net) const;
|
bool hasNetWireCap(const Net *net) const;
|
||||||
// True if driver pin net has wire capacitance.
|
// True if driver pin net has wire capacitance.
|
||||||
bool drvrPinHasWireCap(const Pin *pin,
|
bool drvrPinHasWireCap(const Pin *pin,
|
||||||
|
|
@ -606,7 +618,8 @@ public:
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
// Return values.
|
// Return values.
|
||||||
float &cap,
|
float &cap,
|
||||||
bool &exists) const;
|
bool &exists,
|
||||||
|
bool &subtract_pin_cap) const;
|
||||||
// Pin capacitance derated by operating conditions and instance pvt.
|
// Pin capacitance derated by operating conditions and instance pvt.
|
||||||
float pinCapacitance(const Pin *pin,
|
float pinCapacitance(const Pin *pin,
|
||||||
const RiseFall *rf,
|
const RiseFall *rf,
|
||||||
|
|
|
||||||
61
sdc/Sdc.cc
61
sdc/Sdc.cc
|
|
@ -3057,14 +3057,18 @@ Sdc::drvrPinWireCap(const Pin *pin,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
// Return values.
|
// Return values.
|
||||||
float &cap,
|
float &cap,
|
||||||
bool &exists) const
|
bool &exists,
|
||||||
|
bool &subtract_pin_cap) const
|
||||||
{
|
{
|
||||||
MinMaxFloatValues *values = drvr_pin_wire_cap_maps_[corner->index()].findKey(pin);
|
NetWireCaps *net_caps = drvr_pin_wire_cap_maps_[corner->index()].findKey(pin);
|
||||||
if (values)
|
if (net_caps) {
|
||||||
values->value(min_max, cap, exists);
|
net_caps->value(min_max, cap, exists);
|
||||||
|
subtract_pin_cap = net_caps->subtractPinCap(min_max);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
cap = 0.0;
|
cap = 0.0;
|
||||||
exists = false;
|
exists = false;
|
||||||
|
subtract_pin_cap = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3073,27 +3077,15 @@ Sdc::setNetWireCap(const Net *net,
|
||||||
bool subtract_pin_cap,
|
bool subtract_pin_cap,
|
||||||
const Corner *corner,
|
const Corner *corner,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max,
|
||||||
float cap)
|
float wire_cap)
|
||||||
{
|
{
|
||||||
float wire_cap = cap;
|
NetWireCaps &net_caps = net_wire_cap_maps_[corner->index()][net];
|
||||||
if (subtract_pin_cap) {
|
net_caps.setValue(min_max, wire_cap);
|
||||||
NetConnectedPinIterator *pin_iter = network_->connectedPinIterator(net);
|
net_caps.setSubtractPinCap(subtract_pin_cap, min_max);
|
||||||
if (pin_iter->hasNext()) {
|
|
||||||
const Pin *pin = pin_iter->next();
|
|
||||||
float pin_cap_rise = connectedPinCap(pin, RiseFall::rise(), corner, min_max);
|
|
||||||
float pin_cap_fall = connectedPinCap(pin, RiseFall::fall(), corner, min_max);
|
|
||||||
float pin_cap = (pin_cap_rise + pin_cap_fall) / 2.0F;
|
|
||||||
wire_cap -= pin_cap;
|
|
||||||
if ((wire_cap + pin_cap) < 0.0)
|
|
||||||
wire_cap = -pin_cap;
|
|
||||||
delete pin_iter;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MinMaxFloatValues &values = net_wire_cap_maps_[corner->index()][net];
|
|
||||||
values.setValue(min_max, wire_cap);
|
|
||||||
|
|
||||||
for (const Pin *pin : *network_->drivers(net))
|
for (const Pin *pin : *network_->drivers(net))
|
||||||
drvr_pin_wire_cap_maps_[corner->index()][pin] = &values;
|
drvr_pin_wire_cap_maps_[corner->index()][pin] = &net_caps;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
@ -3121,7 +3113,10 @@ Sdc::connectedCap(const Pin *pin,
|
||||||
{
|
{
|
||||||
netCaps(pin, rf, corner, min_max, pin_cap, wire_cap, fanout, has_net_load);
|
netCaps(pin, rf, corner, min_max, pin_cap, wire_cap, fanout, has_net_load);
|
||||||
float net_wire_cap;
|
float net_wire_cap;
|
||||||
drvrPinWireCap(pin, corner, min_max, net_wire_cap, has_net_load);
|
bool subtract_pin_cap;
|
||||||
|
drvrPinWireCap(pin, corner, min_max, net_wire_cap, has_net_load, subtract_pin_cap);
|
||||||
|
if (subtract_pin_cap)
|
||||||
|
pin_cap = 0.0;
|
||||||
if (has_net_load)
|
if (has_net_load)
|
||||||
wire_cap += net_wire_cap;
|
wire_cap += net_wire_cap;
|
||||||
}
|
}
|
||||||
|
|
@ -5800,4 +5795,24 @@ findLeafDriverPins(const Pin *pin,
|
||||||
leaf_pins->insert(pin);
|
leaf_pins->insert(pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
NetWireCaps::NetWireCaps() :
|
||||||
|
subtract_pin_cap_{false, false}
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
NetWireCaps::subtractPinCap(const MinMax *min_max)
|
||||||
|
{
|
||||||
|
return subtract_pin_cap_[min_max->index()];
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
NetWireCaps::setSubtractPinCap(bool subtrace_pin_cap,
|
||||||
|
const MinMax *min_max)
|
||||||
|
{
|
||||||
|
subtract_pin_cap_[min_max->index()] = subtrace_pin_cap;
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue