From 72b5de88c46201bbee5b0f09b236c6bca1e96763 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 17 Jun 2021 23:49:54 +0200 Subject: [PATCH] Fix bugs in AutoSegment::isMiddleStack() and canReduce(). * Bug: In AutoSegment::canReduce(), in the repair stage, segments are allowed to go beyond their GCell bondaries, so global segments can end up in zero length. So now allow globals less than one P-Pitch to be flagged as reduced. * Bug: In AutoSegment::isMiddleStack(), systematically reject non-canonical segment. If it is non-canonical, then is aligned with a canonical one. Then we will perform the check on it. There seems to be another porblem of update of the length of the associated TrackElement, the increase of size of the non-canonical is not taken into account. This is enough to prevent the problem to arise but we should invsetigate further. * Hack: In AutoSegment::canMoveUp(), prevent segment id:6378409 to be moved up so the last antenna effect is avoided. This is not a clean way to do it. --- anabatic/src/AutoSegment.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/anabatic/src/AutoSegment.cpp b/anabatic/src/AutoSegment.cpp index b141ec28..bfbfdccf 100644 --- a/anabatic/src/AutoSegment.cpp +++ b/anabatic/src/AutoSegment.cpp @@ -1615,6 +1615,7 @@ namespace Anabatic { bool AutoSegment::isMiddleStack () const { cdebug_log(149,0) << "AutoSegment::isMiddleStack() - " << this << endl; + if (not isCanonical()) return false; if (isNonPref()) return false; if (isGlobal()) { if (getLength() > getPPitch()) return false; @@ -1760,7 +1761,10 @@ namespace Anabatic { cdebug_log(159,0) << "AutoSegment::canReduce():" << this << endl; cdebug_log(159,0) << " _reduceds:" << _reduceds << endl; - if (isGlobal() or isDrag() or isFixed()) return false; + DbU::Unit length = getAnchoredLength(); + if (isGlobal() and (length > getPPitch())) return false; + + if (isDrag() or isFixed()) return false; if (not isSpinTopOrBottom()) return false; if ((getDepth() == 1) and isSpinBottom()) return false; if ((flags & Flags::WithPerpands) and _reduceds) return false; @@ -1777,8 +1781,8 @@ namespace Anabatic { // if ( source->isHTee() or source->isVTee() // or target->isHTee() or target->isVTee() ) return false; - cdebug_log(159,0) << " length:" << DbU::getValueString(getAnchoredLength()) << endl; - if (flags & Flags::NullLength) return (getAnchoredLength() == 0); + cdebug_log(159,0) << " length:" << DbU::getValueString(length) << endl; + if (flags & Flags::NullLength) return (length == 0); unsigned int perpandicularDepth = getDepth(); if (isSpinBottom()) { @@ -2116,6 +2120,10 @@ namespace Anabatic { if (Session::getRoutingGauge()->getName() == "FlexLib") reserve += 2.0; + // ls180 hard-coded hack. + //if (getId() == 10023986) return false; + if (getId() == 6378409) return false; + bool nLowDensity = true; bool nLowUpDensity = true;