From 52c5547e796dad45fc232dffd07d7111fe5530e0 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sun, 5 Jan 2020 13:56:51 -0800 Subject: [PATCH] PathEndLess break ties with startpoint --- search/PathEnd.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/search/PathEnd.cc b/search/PathEnd.cc index dea75332..ad633b9c 100644 --- a/search/PathEnd.cc +++ b/search/PathEnd.cc @@ -1959,9 +1959,19 @@ PathEnd::cmp(const PathEnd *path_end1, const Path *path1 = path_end1->path(); const Path *path2 = path_end2->path(); cmp = Path::cmpPinTrClk(path1, path2, sta); - if (cmp == 0) - return clkEdgeCmp(path_end1->targetClkEdge(sta), - path_end2->targetClkEdge(sta)); + if (cmp == 0) { + cmp = clkEdgeCmp(path_end1->targetClkEdge(sta), + path_end2->targetClkEdge(sta)); + if (cmp == 0) { + PathExpanded expanded1(path1, sta); + PathExpanded expanded2(path2, sta); + const Path *start1 = expanded1.startPath(); + const Path *start2 = expanded2.startPath(); + return Path::cmp(start1, start2, sta) < 0; + } + else + return cmp; + } else return cmp; }