From 2140737e1060395569af5a2bc58c20a29e06660a Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 29 Mar 2021 19:03:26 +0200 Subject: [PATCH] In Anabatic::antennaProtect(), error in computing the diode GCell location. --- anabatic/src/AntennaProtect.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/anabatic/src/AntennaProtect.cpp b/anabatic/src/AntennaProtect.cpp index 2c49ca13..3465de3a 100644 --- a/anabatic/src/AntennaProtect.cpp +++ b/anabatic/src/AntennaProtect.cpp @@ -256,14 +256,18 @@ namespace { cdebug_log(147,0) << "DiodeCluster::createDiode(): from=" << gcell << " distance=" << distance << endl; - GCell* neighbor = gcell; - for ( uint32_t i=0 ; igetWest(); - else if (side.contains(Flags::EastSide )) neighbor = neighbor->getEast(); - else if (side.contains(Flags::NorthSide)) neighbor = neighbor->getNorth(); - else if (side.contains(Flags::SouthSide)) neighbor = neighbor->getSouth(); + GCell* neighbor = gcell; + GCell* current = gcell; + uint32_t i = 0; + while ( igetWest(); + else if (side.contains(Flags::EastSide )) current = current->getEast(); + else if (side.contains(Flags::NorthSide)) current = current->getNorth(); + else if (side.contains(Flags::SouthSide)) current = current->getSouth(); + if (not current) break; + neighbor = current; + ++i; } - if (not neighbor) return NULL; DbU::Unit xHint = 0; if (side.contains(Flags::WestSide )) xHint = neighbor->getBoundingBox().getXMax(); @@ -275,6 +279,10 @@ namespace { Instance* diode = area->createDiodeUnder( getRefRp(), bb, xHint ); if (diode) { _diodes.push_back( diode ); + Transformation trans = getRefRp()->getPlugOccurrence().getPath().getTransformation(); + Point center = diode->getAbutmentBox().getCenter(); + trans.applyOn( center ); + neighbor = _anabatic->getGCellUnder( center ); cdebug_log(147,0) << "> GCell area (neighbor): " << bb << endl; Contact* sourceContact = gcell->breakGoThrough( getTopNet() ); Contact* targetContact = neighbor->hasGContact( getTopNet() ); @@ -282,8 +290,10 @@ namespace { if (not targetContact) { bool hasGoThrough = (neighbor->hasGoThrough(getTopNet()) != NULL); targetContact = neighbor->breakGoThrough( getTopNet() ); + cdebug_log(147,0) << "| breakGoThrough(), targetContact= " << targetContact << endl; if (not hasGoThrough) { + cdebug_log(147,0) << "| Target GCell do not have a go-through, connecting. " << endl; if (side & Flags::Horizontal) { if (sourceContact->getX() > targetContact->getX()) std::swap( sourceContact, targetContact );