From f95dcbfa30c7ddec9b36895462d4711b150911fd Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sun, 16 Jul 2023 17:49:09 -0700 Subject: [PATCH] path enum with latches critical error Signed-off-by: James Cherry --- search/PathEnum.cc | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/search/PathEnum.cc b/search/PathEnum.cc index 05c867c8..27e8f7c2 100644 --- a/search/PathEnum.cc +++ b/search/PathEnum.cc @@ -497,25 +497,24 @@ PathEnum::makeDiversions(PathEnd *path_end, Path *before) { PathRef path(before); + PathRef prev_path; TimingArc *prev_arc; + path.prevPath(this, prev_path, prev_arc); PathEnumFaninVisitor fanin_visitor(path_end, path, unique_pins_, this); - do { + while (prev_arc + // Do not enumerate beyond latch D to Q edges. + // This breaks latch loop paths. + && prev_arc->role() != TimingRole::latchDtoQ() + // Do not enumerate paths in the clk network. + && !path.isClock(this)) { // Fanin visitor does all the work. // While visiting the fanins the fanin_visitor finds the // previous path and arc as well as diversions. - PathRef prev_path; + fanin_visitor.visitFaninPathsThru(path.vertex(this), + prev_path.vertex(this), prev_arc); + path.init(prev_path); path.prevPath(this, prev_path, prev_arc); - if (prev_arc) { - fanin_visitor.visitFaninPathsThru(path.vertex(this), - prev_path.vertex(this), prev_arc); - path.init(prev_path); - } - } while (prev_arc - // Do not enumerate beyond latch D to Q edges. - // This breaks latch loop paths. - && prev_arc->role() != TimingRole::latchDtoQ() - // Do not enumerate paths in the clk network. - && !path.isClock(this)); + } } void