diff --git a/anabatic/src/GCell.cpp b/anabatic/src/GCell.cpp index c1454f1a..1ae7ea86 100644 --- a/anabatic/src/GCell.cpp +++ b/anabatic/src/GCell.cpp @@ -298,6 +298,7 @@ namespace Anabatic { , _contacts () , _depth (Session::getRoutingGauge()->getDepth()) , _pinDepth (0) + , _satProcessed (0) , _rpCount (0) , _blockages (new DbU::Unit [_depth]) , _cDensity (0.0) diff --git a/anabatic/src/LayerAssign.cpp b/anabatic/src/LayerAssign.cpp index fd5424d5..3943e3d7 100644 --- a/anabatic/src/LayerAssign.cpp +++ b/anabatic/src/LayerAssign.cpp @@ -368,10 +368,13 @@ namespace Anabatic { if (not finished) { optimized = gcell->stepNetDesaturate( depth, globalNets, invalidateds ); + gcell->setSatProcessed( depth ); if (optimized) { for ( GCell* gcell : invalidateds ) { - queue.push( gcell->cloneKey(depth) ); + if (not gcell->isSatProcessed(depth)) + queue.push( gcell->cloneKey(depth) ); } + invalidateds.clear(); } } } @@ -830,7 +833,7 @@ namespace Anabatic { cmess1 << " o Balance Global Density " << Session::getRoutingGauge()->getRoutingLayer(depth)->getName() << endl; - GCellDensitySet queue ( depth, getGCells()) ); + GCellDensitySet queue ( depth, getGCells() ); GCell::Set invalidateds; bool optimized = true; diff --git a/anabatic/src/anabatic/GCell.h b/anabatic/src/anabatic/GCell.h index 8660d7c5..c2f505be 100644 --- a/anabatic/src/anabatic/GCell.h +++ b/anabatic/src/anabatic/GCell.h @@ -140,6 +140,7 @@ namespace Anabatic { public: static GCell* create ( AnabaticEngine* ); public: + inline bool isSatProcessed ( size_t depth ) const; inline bool isSaturated () const; bool isSaturated ( size_t depth ) const; inline bool isInvalidated () const; @@ -257,6 +258,7 @@ namespace Anabatic { size_t checkDensity () const; bool checkEdgeSaturation ( size_t hreserved, size_t vreserved) const; void setType ( Flags ); + inline void setSatProcessed ( size_t depth ); void addBlockage ( size_t depth, DbU::Unit ); inline void addHSegment ( AutoSegment* ); inline void addVSegment ( AutoSegment* ); @@ -334,6 +336,7 @@ namespace Anabatic { vector _contacts; size_t _depth; size_t _pinDepth; + uint32_t _satProcessed; int _rpCount; DbU::Unit* _blockages; float _cDensity; @@ -486,6 +489,12 @@ namespace Anabatic { inline void GCell::addContact ( AutoContact* contact ) { _flags |= Flags::Invalidated; _contacts.push_back(contact); } + inline bool GCell::isSatProcessed ( size_t depth ) const + { return (_satProcessed & (1 << depth)); } + + inline void GCell::setSatProcessed ( size_t depth ) + { _satProcessed |= (1 << depth); } + inline bool operator< ( const GCell& lhs, const GCell& rhs ) {