diff --git a/anabatic/src/AnabaticEngine.cpp b/anabatic/src/AnabaticEngine.cpp index d39e8d44..b5f8cb9a 100644 --- a/anabatic/src/AnabaticEngine.cpp +++ b/anabatic/src/AnabaticEngine.cpp @@ -251,7 +251,14 @@ namespace Anabatic { or (source.getY() > gcellsArea.getYMax()) or (target.getX() <= gcellsArea.getXMin()) or (target.getY() <= gcellsArea.getYMin()) ) { - cerr << Error( "RawGCellsUnder::commonCtor(): Area is completly outside the GCells area (ignored)." + cerr << Error( "RawGCellsUnder::commonCtor(): Area is completly outside the GCells area (ignored).\n" + " * GCells area: %s\n" + " * Obstacle area: [%s %s %s %s]" + , getString(gcellsArea).c_str() + , DbU::getValueString(source.getX()).c_str() + , DbU::getValueString(source.getY()).c_str() + , DbU::getValueString(target.getX()).c_str() + , DbU::getValueString(target.getY()).c_str() ) << endl; cdebug_tabw(112,-1); DebugSession::close(); diff --git a/anabatic/src/PreRouteds.cpp b/anabatic/src/PreRouteds.cpp index 5ad99896..f5dd15ad 100644 --- a/anabatic/src/PreRouteds.cpp +++ b/anabatic/src/PreRouteds.cpp @@ -83,6 +83,7 @@ namespace Anabatic { if (net->getType() == Net::Type::GROUND) continue; // Don't skip the clock. + vector pins; vector segments; vector contacts; @@ -92,7 +93,11 @@ namespace Anabatic { size_t rpCount = 0; for( Component* component : net->getComponents() ) { - if (dynamic_cast(component)) continue; + Pin* pin = dynamic_cast( component ); + if (pin) { + pins.push_back( pin ); + continue; + } if (dynamic_cast(component)) continue; const RegularLayer* layer = dynamic_cast(component->getLayer()); @@ -139,36 +144,51 @@ namespace Anabatic { isFixed = true; } } else { - Contact* contact = dynamic_cast(component); - if (contact) { - if (not ab.contains(contact->getCenter())) continue; - - if (Session::isGLayer(component->getLayer())) { - isManualGlobalRouted = true; - } else { - isManualGlobalRouted = true; - contacts.push_back( contact ); - if ( (contact->getWidth () != Session::getViaWidth(contact->getLayer())) - or (contact->getHeight() != Session::getViaWidth(contact->getLayer())) - or (contact->getLayer () == Session::getContactLayer(0)) ) - isFixed = true; - } + Pin* pin = dynamic_cast(component); + if (pin) { + //cerr << "| " << pin << endl; + if (not ab.intersect(pin->getBoundingBox())) continue; + pins.push_back( pin ); } else { - RoutingPad* rp = dynamic_cast(component); - if (rp) { - ++rpCount; + Contact* contact = dynamic_cast(component); + if (contact) { + if (not ab.contains(contact->getCenter())) continue; + + if (Session::isGLayer(component->getLayer())) { + isManualGlobalRouted = true; + } else { + isManualGlobalRouted = true; + contacts.push_back( contact ); + if ( (contact->getWidth () != Session::getViaWidth(contact->getLayer())) + or (contact->getHeight() != Session::getViaWidth(contact->getLayer())) + or (contact->getLayer () == Session::getContactLayer(0)) ) + isFixed = true; + } } else { - // Plug* plug = dynamic_cast(component); - // if (plug) { - // cerr << "buildPreRouteds(): " << plug << endl; - // ++rpCount; - // } + RoutingPad* rp = dynamic_cast(component); + if (rp) { + ++rpCount; + } else { + // Plug* plug = dynamic_cast(component); + // if (plug) { + // cerr << "buildPreRouteds(): " << plug << endl; + // ++rpCount; + // } + } } } } } } + // cerr << net << " deepNet:" << net->isDeepNet() + // << " pins:" << pins.size() + // << " segments:" << segments.size() << endl; + if (not net->isDeepNet() and (pins.size() >= 1) and (segments.size() < 2)) { + ++toBeRouteds; + continue; + } + if ( (not isFixed) and (not isManualGlobalRouted) and (not isManualDetailRouted) @@ -213,6 +233,10 @@ namespace Anabatic { for ( auto segment : segments ) { AutoContact* source = Session::lookup( dynamic_cast( segment->getSource() )); AutoContact* target = Session::lookup( dynamic_cast( segment->getTarget() )); + if (not source or not target) { + cerr << Error( "Unable to protect %s", getString(segment).c_str() ) << endl; + continue; + } AutoSegment* autoSegment = AutoSegment::create( source, target, segment ); autoSegment->setFlags( AutoSegment::SegUserDefined|AutoSegment::SegAxisSet ); } diff --git a/cumulus/src/plugins/alpha/chip/__init__.py b/cumulus/src/plugins/alpha/chip/__init__.py index 86ec4223..810c6194 100644 --- a/cumulus/src/plugins/alpha/chip/__init__.py +++ b/cumulus/src/plugins/alpha/chip/__init__.py @@ -198,7 +198,7 @@ class CoreWire ( object ): if not isinstance(padLayer,BasicLayer): padLayer = padLayer.getBasicLayer() if self.side == West or self.side == East: - flags = OnHorizontalPitch + flags = OnHorizontalPitch hPitch = self.conf.getPitch( self.symSegmentLayer ) vPitch = self.conf.getPitch( self.padSegment.getLayer() ) yCore = self.conf.toCoronaPitchInChip( self.bbSegment.getCenter().getY(), self.symSegmentLayer ) @@ -221,7 +221,7 @@ class CoreWire ( object ): xPadMax = self.bbSegment.getXMax() xContact = self.corona.coreSymBb.getXMax() + self.offset * 2*vPitch xPadMin = xContact - xCore = coronaAb.getXMax() + xCore = coronaAb.getXMax() - vPitch if not self.preferredDir: #xPadMin -= self.bbSegment.getHeight()//2 xPadMin -= 3*vPitch @@ -375,7 +375,7 @@ class CoreWire ( object ): yPadMax = self.bbSegment.getYMax() yPadMin = self.corona.coreSymBb.getYMax() + self.offset * 2*hPitch yContact = yPadMin - yCore = coronaAb.getYMax() + yCore = coronaAb.getYMax() - vPitch #if not self.preferredDir: # yPadMin -= self.bbSegment.getWidth()//2 # yPadMin -= 3*hPitch