From f22b7000b6d088a67eb0e5eb93c10778a9fc537d Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 28 Sep 2023 15:10:03 +0200 Subject: [PATCH] Fix wrong move up of non-preferred direction segments. * Change: In GCell::stepNetDesaturate(), never move up a segment in non-preferred direction as they are usually attached to terminals, so they won't reduce the GCell density anyway. * Change: In LayerAssign::RpsInRow::slacken(), do not slacken horizontals from M1 vertical terminals when they are tall enough. Arbitrarily choose above 6 H-tracks (should be made a configuration parameter). * Change: In DataNegociate::update(), when processing perpandicular, we were taking into account "fixed axis" even when they were reduced (so not in tracks). Now do not. --- anabatic/src/GCell.cpp | 1 + anabatic/src/LayerAssign.cpp | 14 ++++++++++++-- katana/src/DataNegociate.cpp | 4 +++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/anabatic/src/GCell.cpp b/anabatic/src/GCell.cpp index fe567666..beeedea0 100644 --- a/anabatic/src/GCell.cpp +++ b/anabatic/src/GCell.cpp @@ -1838,6 +1838,7 @@ namespace Anabatic { for ( ; (isegment != iend) ; isegment++ ) { unsigned int segmentDepth = Session::getRoutingGauge()->getLayerDepth((*isegment)->getLayer()); + if ((*isegment)->isNonPref()) continue; if (segmentDepth < depth) continue; if (segmentDepth > depth) break; diff --git a/anabatic/src/LayerAssign.cpp b/anabatic/src/LayerAssign.cpp index b17c39ca..1854d83c 100644 --- a/anabatic/src/LayerAssign.cpp +++ b/anabatic/src/LayerAssign.cpp @@ -214,24 +214,34 @@ namespace { { cdebug_log(149,1) << "RpsInRow::slacken()" << endl; + DbU::Unit hpitch = 0; for ( RoutingPad* rp : _rps ) { cdebug_log(149,0) << "Slacken from: " << rp << endl; if (rp->getLayer()) { - if (_anabatic->getConfiguration()->getLayerDepth(rp->getLayer()) == 1) { + size_t depth = _anabatic->getConfiguration()->getLayerDepth( rp->getLayer() ); + if (depth == 1) { cdebug_log(149,0) << "In METAL2, skiping" << endl; continue; } + hpitch = _anabatic->getConfiguration()->getPitch( depth, Flags::AboveLayer ); } for ( Component* component : rp->getSlaveComponents() ) { AutoContact* rpContact = Session::lookup( dynamic_cast(component) ); if (rpContact) { cdebug_log(149,0) << "+ " << rpContact << endl; + if (hpitch) { + Box bb = rp->getBoundingBox(); + if (bb.getHeight() / hpitch > 6) { + cdebug_log(149,0) << "| Terminal is tall enough (> 6 pitch), skipping." << endl; + continue; + } + } for ( AutoSegment* segment : rpContact->getAutoSegments() ) { cdebug_log(149,0) << "| " << segment << endl; - if (segment->isVertical()) { + if (segment->isVertical() and not segment->isNonPref()) { if (segment->getDepth() == 1) { cdebug_log(149,0) << "| Slacken: " << segment << endl; segment->changeDepth( 2, Flags::NoFlags ); diff --git a/katana/src/DataNegociate.cpp b/katana/src/DataNegociate.cpp index 78684bcb..1121355e 100644 --- a/katana/src/DataNegociate.cpp +++ b/katana/src/DataNegociate.cpp @@ -198,7 +198,9 @@ namespace Katana { _perpandicularFree.intersection( trackFree.inflate ( -sourceCap, -targetCap ) ); cdebug_log(159,0) << "Source cap:" << DbU::getValueString(perpandicular->getExtensionCap(Flags::Source)) << endl; - } else if (perpandicular->isFixedAxis() /*or _trackSegment->isDogleg()*/) { + } else if ( perpandicular->isFixedAxis() + and not perpandicular->isReduced() + /*or _trackSegment->isDogleg()*/) { RoutingPlane* plane = Session::getKatanaEngine()->getRoutingPlaneByLayer(perpandicular->getLayer()); Track* track = plane->getTrackByPosition( perpandicular->getAxis() ); if (track and (perpandicular->getAxis() == track->getAxis())) {