liberty output pin internal power missing related_pin
This commit is contained in:
parent
34159b6742
commit
21ceec70a9
|
|
@ -716,8 +716,12 @@ Power::findOutputInternalPower(const Pin *to_pin,
|
||||||
const char *related_pg_pin = pwr->relatedPgPin();
|
const char *related_pg_pin = pwr->relatedPgPin();
|
||||||
float duty = findInputDuty(to_pin, inst, func, pwr);
|
float duty = findInputDuty(to_pin, inst, func, pwr);
|
||||||
const LibertyPort *from_port = pwr->relatedPort();
|
const LibertyPort *from_port = pwr->relatedPort();
|
||||||
const Pin *from_pin = network_->findPin(inst, from_port);
|
Vertex *from_vertex = nullptr;
|
||||||
Vertex *from_vertex = graph_->pinLoadVertex(from_pin);
|
if (from_port) {
|
||||||
|
const Pin *from_pin = network_->findPin(inst, from_port);
|
||||||
|
if (from_pin)
|
||||||
|
from_vertex = graph_->pinLoadVertex(from_pin);
|
||||||
|
}
|
||||||
float energy = 0.0;
|
float energy = 0.0;
|
||||||
int tr_count = 0;
|
int tr_count = 0;
|
||||||
debugPrint0(debug_, "power", 2, " when act/ns duty wgt energy power\n");
|
debugPrint0(debug_, "power", 2, " when act/ns duty wgt energy power\n");
|
||||||
|
|
@ -726,8 +730,10 @@ Power::findOutputInternalPower(const Pin *to_pin,
|
||||||
RiseFall *from_rf = isPositiveUnate(cell, from_port, to_port)
|
RiseFall *from_rf = isPositiveUnate(cell, from_port, to_port)
|
||||||
? to_rf
|
? to_rf
|
||||||
: to_rf->opposite();
|
: to_rf->opposite();
|
||||||
float slew = delayAsFloat(graph_->slew(from_vertex, from_rf,
|
float slew = from_vertex
|
||||||
dcalc_ap->index()));
|
? delayAsFloat(graph_->slew(from_vertex, from_rf,
|
||||||
|
dcalc_ap->index()))
|
||||||
|
: 0.0;
|
||||||
if (!fuzzyInf(slew)) {
|
if (!fuzzyInf(slew)) {
|
||||||
float table_energy = pwr->power(to_rf, pvt, slew, load_cap);
|
float table_energy = pwr->power(to_rf, pvt, slew, load_cap);
|
||||||
energy += table_energy;
|
energy += table_energy;
|
||||||
|
|
@ -766,23 +772,27 @@ Power::findInputDuty(const Pin *to_pin,
|
||||||
{
|
{
|
||||||
const char *related_pg_pin = pwr->relatedPgPin();
|
const char *related_pg_pin = pwr->relatedPgPin();
|
||||||
const LibertyPort *from_port = pwr->relatedPort();
|
const LibertyPort *from_port = pwr->relatedPort();
|
||||||
FuncExpr *when = pwr->when();
|
if (from_port) {
|
||||||
const Pin *from_pin = network_->findPin(inst, from_port);
|
const Pin *from_pin = network_->findPin(inst, from_port);
|
||||||
Vertex *from_vertex = graph_->pinLoadVertex(from_pin);
|
FuncExpr *when = pwr->when();
|
||||||
if (func && func->hasPort(from_port)) {
|
Vertex *from_vertex = graph_->pinLoadVertex(from_pin);
|
||||||
PwrActivity from_activity = findActivity(from_pin);
|
if (func && func->hasPort(from_port)) {
|
||||||
PwrActivity to_activity = findActivity(to_pin);
|
PwrActivity from_activity = findActivity(from_pin);
|
||||||
float duty1 = evalActivityDifference(func, inst, from_port).duty();
|
PwrActivity to_activity = findActivity(to_pin);
|
||||||
if (to_activity.activity() == 0.0)
|
float duty1 = evalActivityDifference(func, inst, from_port).duty();
|
||||||
return 0.0;
|
if (to_activity.activity() == 0.0)
|
||||||
else
|
return 0.0;
|
||||||
return from_activity.activity() / to_activity.activity() * duty1;
|
else
|
||||||
|
return from_activity.activity() / to_activity.activity() * duty1;
|
||||||
|
}
|
||||||
|
else if (when)
|
||||||
|
return evalActivity(when, inst).duty();
|
||||||
|
else if (search_->isClock(from_vertex))
|
||||||
|
return 1.0;
|
||||||
|
return 0.5;
|
||||||
}
|
}
|
||||||
else if (when)
|
else
|
||||||
return evalActivity(when, inst).duty();
|
return 0.0;
|
||||||
else if (search_->isClock(from_vertex))
|
|
||||||
return 1.0;
|
|
||||||
return 0.5;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue