Skip to content

Commit

Permalink
report_clock_skew bug that ignored positive skews
Browse files Browse the repository at this point in the history
Signed-off-by: James Cherry <[email protected]>
  • Loading branch information
jjcherry56 committed Oct 29, 2022
1 parent 62e5c86 commit d663b36
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified doc/OpenSTA.odt
Binary file not shown.
6 changes: 3 additions & 3 deletions search/ClkSkew.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit d663b36

Please sign in to comment.