Liberty::internalPowers() return ref
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
58a34f1221
commit
937efddf5e
|
|
@ -417,8 +417,8 @@ public:
|
|||
TimingArcSet *findTimingArcSet(unsigned arc_set_index) const;
|
||||
bool hasTimingArcs(LibertyPort *port) const;
|
||||
|
||||
InternalPowerSeq *internalPowers();
|
||||
InternalPowerSeq *internalPowers(const LibertyPort *port);
|
||||
const InternalPowerSeq &internalPowers() const { return internal_powers_; }
|
||||
const InternalPowerSeq &internalPowers(const LibertyPort *port);
|
||||
LeakagePowerSeq *leakagePowers() { return &leakage_powers_; }
|
||||
void leakagePower(// Return values.
|
||||
float &leakage,
|
||||
|
|
|
|||
|
|
@ -1181,16 +1181,10 @@ LibertyCell::addInternalPower(InternalPower *power)
|
|||
port_internal_powers_[power->port()].push_back(power);
|
||||
}
|
||||
|
||||
InternalPowerSeq *
|
||||
LibertyCell::internalPowers()
|
||||
{
|
||||
return &internal_powers_;
|
||||
}
|
||||
|
||||
InternalPowerSeq *
|
||||
const InternalPowerSeq &
|
||||
LibertyCell::internalPowers(const LibertyPort *port)
|
||||
{
|
||||
return &port_internal_powers_[port];
|
||||
return port_internal_powers_[port];
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -637,8 +637,8 @@ Power::findInputInternalPower(const Pin *pin,
|
|||
LibertyCell *corner_cell = cell->cornerCell(lib_ap_index);
|
||||
const LibertyPort *corner_port = port->cornerPort(lib_ap_index);
|
||||
if (corner_cell && corner_port) {
|
||||
InternalPowerSeq *internal_pwrs = corner_cell->internalPowers(corner_port);
|
||||
if (!internal_pwrs->empty()) {
|
||||
const InternalPowerSeq &internal_pwrs = corner_cell->internalPowers(corner_port);
|
||||
if (!internal_pwrs.empty()) {
|
||||
debugPrint(debug_, "power", 2, "internal input %s/%s (%s)",
|
||||
network_->pathName(inst),
|
||||
port->name(),
|
||||
|
|
@ -650,7 +650,7 @@ Power::findInputInternalPower(const Pin *pin,
|
|||
units_->capacitanceUnit()->asString(load_cap));
|
||||
debugPrint(debug_, "power", 2, " when act/ns duty energy power");
|
||||
float internal = 0.0;
|
||||
for (InternalPower *pwr : *internal_pwrs) {
|
||||
for (InternalPower *pwr : internal_pwrs) {
|
||||
const char *related_pg_pin = pwr->relatedPgPin();
|
||||
float energy = 0.0;
|
||||
int rf_count = 0;
|
||||
|
|
@ -784,7 +784,7 @@ Power::findOutputInternalPower(const Pin *to_pin,
|
|||
FuncExpr *func = to_port->function();
|
||||
|
||||
map<const char*, float, StringLessIf> pg_duty_sum;
|
||||
for (InternalPower *pwr : *corner_cell->internalPowers(to_corner_port)) {
|
||||
for (InternalPower *pwr : corner_cell->internalPowers(to_corner_port)) {
|
||||
float duty = findInputDuty(to_pin, inst, func, pwr);
|
||||
const char *related_pg_pin = pwr->relatedPgPin();
|
||||
// Note related_pg_pin may be null.
|
||||
|
|
@ -792,7 +792,7 @@ Power::findOutputInternalPower(const Pin *to_pin,
|
|||
}
|
||||
|
||||
float internal = 0.0;
|
||||
for (InternalPower *pwr : *corner_cell->internalPowers(to_corner_port)) {
|
||||
for (InternalPower *pwr : corner_cell->internalPowers(to_corner_port)) {
|
||||
FuncExpr *when = pwr->when();
|
||||
const char *related_pg_pin = pwr->relatedPgPin();
|
||||
float duty = findInputDuty(to_pin, inst, func, pwr);
|
||||
|
|
|
|||
Loading…
Reference in New Issue