From 248704c61c7743e041ae791a5b8877f7294df459 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 11 Aug 2016 11:05:11 +0200 Subject: [PATCH] Anabatic transient commit 17. Ripup long wires only. --- anabatic/src/Edge.cpp | 19 +++++++++++++++++++ anabatic/src/GlobalRoute.cpp | 18 ++++++++++-------- anabatic/src/anabatic/Edge.h | 1 + 3 files changed, 30 insertions(+), 8 deletions(-) diff --git a/anabatic/src/Edge.cpp b/anabatic/src/Edge.cpp index 7b07d390..68b50c7a 100644 --- a/anabatic/src/Edge.cpp +++ b/anabatic/src/Edge.cpp @@ -223,6 +223,25 @@ namespace Anabatic { } + size_t Edge::ripup () + { + AnabaticEngine* anabatic = getAnabatic(); + DbU::Unit globalThreshold = Session::getSliceHeight()*3; + size_t netCount = 0; + + for ( size_t i=0 ; i<_segments.size(); ) { + if (_segments[i]->getLength() >= globalThreshold) { + NetData* netData = anabatic->getNetData( _segments[i]->getNet() ); + if (netData->isGlobalRouted()) ++netCount; + + anabatic->ripup( _segments[i], Flags::Propagate ); + } else + ++i; + } + return netCount; + } + + void Edge::_setSource ( GCell* source ) { if (source == _target) diff --git a/anabatic/src/GlobalRoute.cpp b/anabatic/src/GlobalRoute.cpp index 4a366524..137d4a98 100644 --- a/anabatic/src/GlobalRoute.cpp +++ b/anabatic/src/GlobalRoute.cpp @@ -191,15 +191,17 @@ namespace Anabatic { for ( Edge* edge : ovEdges ) computeNextHCost( edge, edgeHInc ); netCount = 0; - while ( not ovEdges.empty() ) { - Edge* ovEdge = ovEdges[0]; + size_t iEdge = 0; + while ( iEdge < ovEdges.size() ) { + Edge* edge = ovEdges[iEdge]; + netCount += edge->ripup(); - vector segments = ovEdge->getSegments(); - for ( Segment* segment : segments ) { - NetData* netData = getNetData( segment->getNet() ); - if (netData->isGlobalRouted()) ++netCount; - - ripup( segment, Flags::Propagate ); + if (ovEdges[iEdge] == edge) { + cerr << Error( "AnabaticEngine::globalRoute(): Unable to ripup enough segments of edge:\n" + " %s" + , getString(edge).c_str() + ) << endl; + ++iEdge; } } diff --git a/anabatic/src/anabatic/Edge.h b/anabatic/src/anabatic/Edge.h index 912f8c34..3f440b74 100644 --- a/anabatic/src/anabatic/Edge.h +++ b/anabatic/src/anabatic/Edge.h @@ -79,6 +79,7 @@ namespace Anabatic { void add ( Segment* ); void remove ( Segment* ); void replace ( Segment* orig, Segment* repl ); + size_t ripup (); inline const Flags& flags () const; inline Flags& flags (); inline void revalidate () const;