report_clock_skew bug that ignored positive skews

Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2022-10-28 17:42:43 -07:00
parent 62e5c864a5
commit d663b36b48
2 changed files with 3 additions and 3 deletions

Binary file not shown.

View File

@ -175,11 +175,11 @@ ClkSkews::findWorstClkSkew(const Corner *corner,
ClkSkewMap skews;
findClkSkew(&clks, corner, setup_hold, skews);
if (!skews.empty()) {
float worst_skew = INF;
float worst_skew = 0.0;
for (auto clk_skew_itr : skews) {
ClkSkew *clk_skew = clk_skew_itr.second;
float skew = clk_skew->skew();
if (skew < worst_skew)
if (abs(skew) > abs(worst_skew))
worst_skew = skew;
}
return worst_skew;
@ -309,7 +309,7 @@ ClkSkews::findClkSkew(Vertex *src_vertex,
clk_skew = new ClkSkew(probe);
skews[src_clk] = clk_skew;
}
else if (fuzzyGreater(probe.skew(), clk_skew->skew()))
else if (abs(probe.skew()), abs(clk_skew->skew()))
*clk_skew = probe;
}
}