Anabatic transient commit 17. Ripup long wires only.

This commit is contained in:
Jean-Paul Chaput 2016-08-11 11:05:11 +02:00
parent d29cbe976a
commit 248704c61c
3 changed files with 30 additions and 8 deletions

View File

@ -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 ) void Edge::_setSource ( GCell* source )
{ {
if (source == _target) if (source == _target)

View File

@ -191,15 +191,17 @@ namespace Anabatic {
for ( Edge* edge : ovEdges ) computeNextHCost( edge, edgeHInc ); for ( Edge* edge : ovEdges ) computeNextHCost( edge, edgeHInc );
netCount = 0; netCount = 0;
while ( not ovEdges.empty() ) { size_t iEdge = 0;
Edge* ovEdge = ovEdges[0]; while ( iEdge < ovEdges.size() ) {
Edge* edge = ovEdges[iEdge];
netCount += edge->ripup();
vector<Segment*> segments = ovEdge->getSegments(); if (ovEdges[iEdge] == edge) {
for ( Segment* segment : segments ) { cerr << Error( "AnabaticEngine::globalRoute(): Unable to ripup enough segments of edge:\n"
NetData* netData = getNetData( segment->getNet() ); " %s"
if (netData->isGlobalRouted()) ++netCount; , getString(edge).c_str()
) << endl;
ripup( segment, Flags::Propagate ); ++iEdge;
} }
} }

View File

@ -79,6 +79,7 @@ namespace Anabatic {
void add ( Segment* ); void add ( Segment* );
void remove ( Segment* ); void remove ( Segment* );
void replace ( Segment* orig, Segment* repl ); void replace ( Segment* orig, Segment* repl );
size_t ripup ();
inline const Flags& flags () const; inline const Flags& flags () const;
inline Flags& flags (); inline Flags& flags ();
inline void revalidate () const; inline void revalidate () const;