report_power seg fault on missing pin
This commit is contained in:
parent
a258b31bb9
commit
dd29fafe5d
|
|
@ -775,6 +775,7 @@ Power::findInputDuty(const Pin *to_pin,
|
||||||
const LibertyPort *from_port = pwr->relatedPort();
|
const LibertyPort *from_port = pwr->relatedPort();
|
||||||
if (from_port) {
|
if (from_port) {
|
||||||
const Pin *from_pin = network_->findPin(inst, from_port);
|
const Pin *from_pin = network_->findPin(inst, from_port);
|
||||||
|
if (from_pin) {
|
||||||
FuncExpr *when = pwr->when();
|
FuncExpr *when = pwr->when();
|
||||||
Vertex *from_vertex = graph_->pinLoadVertex(from_pin);
|
Vertex *from_vertex = graph_->pinLoadVertex(from_pin);
|
||||||
if (func && func->hasPort(from_port)) {
|
if (func && func->hasPort(from_port)) {
|
||||||
|
|
@ -792,7 +793,7 @@ Power::findInputDuty(const Pin *to_pin,
|
||||||
return 1.0;
|
return 1.0;
|
||||||
return 0.5;
|
return 0.5;
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue