From 14ff6ce78afb2ce0f1a2462b5514e2957a048a30 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 1 Feb 2021 16:52:03 +0100 Subject: [PATCH] * Bug: In KatanaEngine::TrackFixedSegment CTOR, for finding the GCells under the fixed segment, we were using the axis *of the segment*, but if it is very wide, this is completly off. Now use the axis of the *track* to get the right GCells impacteds. --- katana/src/TrackFixedSegment.cpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/katana/src/TrackFixedSegment.cpp b/katana/src/TrackFixedSegment.cpp index 4152b303..199e7e2f 100644 --- a/katana/src/TrackFixedSegment.cpp +++ b/katana/src/TrackFixedSegment.cpp @@ -60,7 +60,7 @@ namespace Katana { : TrackElement (NULL) , _segment (segment) { - cdebug_log(159,0) << "TrackFixedSegment::TrackFixedSegment() track:" << track << endl; + cdebug_log(159,0) << "TrackFixedSegment::TrackFixedSegment() track=" << track << endl; Box boundingBox = segment->getBoundingBox(); uint32_t flags = TElemFixed | ((segment->getNet() == Session::getBlockageNet()) ? TElemBlockage : 0); @@ -74,6 +74,8 @@ namespace Katana { //if (layer2) { //cerr << track->getLayer() << " minSpace:" << DbU::getValueString(track->getLayer()->getMinimalSpacing()) << endl; + Point source; + Point target; Interval segside; Interval uside = track->getKatanaEngine()->getUSide( track->getDirection() ); DbU::Unit cap = track->getLayer()->getMinimalSpacing()/2 /*+ track->getLayer()->getExtentionCap()*/; @@ -83,23 +85,31 @@ namespace Katana { segside = Interval( boundingBox.getXMin(), boundingBox.getXMax() ); _sourceU = max( boundingBox.getXMin() - cap, uside.getVMin()); _targetU = min( boundingBox.getXMax() + cap, uside.getVMax()); + source = Point( boundingBox.getXMin(), track->getAxis() ); + target = Point( boundingBox.getXMax(), track->getAxis() ); } else { segside = Interval( boundingBox.getYMin(), boundingBox.getYMax() ); _sourceU = max( boundingBox.getYMin() - cap, uside.getVMin()); _targetU = min( boundingBox.getYMax() + cap, uside.getVMax()); + source = Point( track->getAxis(), boundingBox.getYMin() ); + target = Point( track->getAxis(), boundingBox.getYMax() ); } Flags gcellFlags = Flags::NoFlags; - if (segment->getNet()->isSupply() and (depth > 0)) { - gcellFlags |= Flags::GoStraight; - } + // if (segment->getNet()->isSupply() and (depth > 0)) { + // cerr << "GoStraight from " << segment << endl; + // // gcellFlags |= Flags::GoStraight; + // } - GCellsUnder gcells = track->getKatanaEngine()->getGCellsUnder( segment ); + GCellsUnder gcells = track->getKatanaEngine()->getGCellsUnder( source, target ); for ( size_t i=0 ; isize() ; ++i ) { GCell* gcell = gcells->gcellAt(i); gcell->addBlockage ( depth, gcell->getSide( track->getDirection() ).getIntersection( segside ).getSize() ); gcell->flags() |= gcellFlags; + // if (gcellFlags & Flags::GoStraight) { + // cerr << "| Set GoStraight on " << gcell << endl; + // } } //} } else