From c137c1ac5b84bfc2dfdfaf762039d44445e43a27 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sun, 9 May 2021 11:03:09 +0200 Subject: [PATCH] Do not account self-segment in track cost calculation. * Change: In Katana::Track::addOverlapCost(), if an overlaping segment is owned by the net *and* is the one we want to insert, do not take it into account in the shared length. This case never occured before we introduced the "realign" stage, as a to be inserted segment, was, by definition, not already inserted in a track. But in the realign stage, it is. So we should not account it when computing the insertion cost in the track it is already in. This was preventing short segments (less than a pitch) to be correctly re-aligned. And, as a side effect, preventing the antenna/diodes to work as intended (diode connected at METAL3 layer while the antenna occur at METAL2 layer). --- katana/src/Track.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/katana/src/Track.cpp b/katana/src/Track.cpp index 08a6762e..37c7b155 100644 --- a/katana/src/Track.cpp +++ b/katana/src/Track.cpp @@ -561,6 +561,11 @@ namespace Katana { if ( (_segments[begin]->getNet() == cost.getNet()) and ((cost.getRefElement()->getAxis() != getAxis()) or not _segments[begin]->isNonPref() ) ) { + if ( (_segments[begin] == cost.getRefElement()) + or (_segments[begin] == cost.getSymElement())) { + cdebug_log(155,0) << "Segment istself in track, skip." << endl; + continue; + } cdebug_log(155,0) << "Same net overlap, increase delta shared." << endl; cost.incDeltaShared ( overlap.getSize() ); }