Power::findClk watch out for vdd/vss

This commit is contained in:
James Cherry 2020-11-12 14:04:22 -07:00
parent 9799eff905
commit d13312eccf
1 changed files with 10 additions and 8 deletions

View File

@ -1100,14 +1100,16 @@ Power::findClk(const Pin *to_pin)
{
const Clock *clk = nullptr;
Vertex *to_vertex = graph_->pinDrvrVertex(to_pin);
VertexPathIterator path_iter(to_vertex, this);
while (path_iter.hasNext()) {
PathVertex *path = path_iter.next();
const Clock *path_clk = path->clock(this);
if (path_clk
&& (clk == nullptr
|| path_clk->period() < clk->period()))
clk = path_clk;
if (to_vertex) {
VertexPathIterator path_iter(to_vertex, this);
while (path_iter.hasNext()) {
PathVertex *path = path_iter.next();
const Clock *path_clk = path->clock(this);
if (path_clk
&& (clk == nullptr
|| path_clk->period() < clk->period()))
clk = path_clk;
}
}
return clk;
}