diff --git a/kite/src/BuildPowerRails.cpp b/kite/src/BuildPowerRails.cpp index 37b28bb7..5454df3c 100644 --- a/kite/src/BuildPowerRails.cpp +++ b/kite/src/BuildPowerRails.cpp @@ -451,7 +451,7 @@ namespace { class QueryPowerRails : public Query { public: - QueryPowerRails ( KiteEngine* ); + QueryPowerRails ( KiteEngine* ); virtual bool hasGoCallback () const; virtual void setBasicLayer ( const BasicLayer* ); virtual void goCallback ( Go* ); diff --git a/kite/src/CMakeLists.txt b/kite/src/CMakeLists.txt index ebedf09a..52ab35ce 100644 --- a/kite/src/CMakeLists.txt +++ b/kite/src/CMakeLists.txt @@ -75,6 +75,7 @@ ${HURRICANE_GRAPHICAL_LIBRARIES} ${HURRICANE_LIBRARIES} ${CONFIGURATION_LIBRARY} + ${BOOKSHELF_LIBRARY} ${CIF_LIBRARY} ${AGDS_LIBRARY} ${LEFDEF_LIBRARIES} diff --git a/kite/src/Configuration.cpp b/kite/src/Configuration.cpp index fbfd1b45..03f7184b 100644 --- a/kite/src/Configuration.cpp +++ b/kite/src/Configuration.cpp @@ -56,6 +56,7 @@ namespace Kite { , _postEventCb () , _edgeCapacityPercent(Cfg::getParamPercentage("kite.edgeCapacity", 80.0)->asDouble()) , _expandStep (Cfg::getParamPercentage("kite.expandStep" ,100.0)->asDouble()) + , _globalMinBreak (DbU::lambda((double)Cfg::getParamInt("kite.globalMinBreak",29*50)->asInt())) // Ugly: direct uses of SxLib gauge. , _ripupLimits () , _ripupCost (Cfg::getParamInt("kite.ripupCost" , 3)->asInt()) , _eventsLimit (Cfg::getParamInt("kite.eventsLimit" ,4000000)->asInt()) @@ -140,6 +141,10 @@ namespace Kite { { return _base->getSaturateRatio(); } + size_t Configuration::getSaturateRp () const + { return _base->getSaturateRp(); } + + DbU::Unit Configuration::getGlobalThreshold () const { return _base->getGlobalThreshold(); } @@ -152,6 +157,10 @@ namespace Kite { { _base->setSaturateRatio(ratio); } + void Configuration::setSaturateRp ( size_t threshold ) + { _base->setSaturateRp(threshold); } + + void Configuration::setGlobalThreshold ( DbU::Unit threshold ) { _base->setGlobalThreshold(threshold); } diff --git a/kite/src/GraphicKiteEngine.cpp b/kite/src/GraphicKiteEngine.cpp index 9537864d..499aab6a 100644 --- a/kite/src/GraphicKiteEngine.cpp +++ b/kite/src/GraphicKiteEngine.cpp @@ -207,9 +207,9 @@ namespace Kite { //Breakpoint::stop ( 0, "Point d'arret:
  runNegociate()
" // "Routage par Negociation." ); - emit cellPreModificated (); - kite->runNegociate (); - emit cellPostModificated (); + emit cellPreModificated (); + kite->runNegociate (); + emit cellPostModificated (); } diff --git a/kite/src/RoutingEvent.cpp b/kite/src/RoutingEvent.cpp index 7bdc9c12..9844e30b 100644 --- a/kite/src/RoutingEvent.cpp +++ b/kite/src/RoutingEvent.cpp @@ -1244,7 +1244,7 @@ namespace { //if ( track && (track->getAxis() < constraints.getVMin()) ) track = track->getNext(); //for ( ; !success && track && (track->getAxis() <= constraints.getVMax()) ; track = track->getNext() ) - if ( not success and (segment->getLength() >= Session::getConfiguration()->getGlobalThreshold()) ) { + if ( not success and (segment->getLength() >= Session::getConfiguration()->getGlobalMinBreak()) ) { ltrace(200) << "Long global wire, break in the middle." << endl; Interval span; segment->getCanonical ( span ); diff --git a/kite/src/kite/Configuration.h b/kite/src/kite/Configuration.h index bb160324..31d93d8c 100644 --- a/kite/src/kite/Configuration.h +++ b/kite/src/kite/Configuration.h @@ -76,9 +76,11 @@ namespace Kite { virtual Layer* getContactLayer ( size_t depth ) const; virtual DbU::Unit getExtensionCap () const; virtual float getSaturateRatio () const; + virtual size_t getSaturateRp () const; virtual DbU::Unit getGlobalThreshold () const; virtual void setAllowedDepth ( size_t ); virtual void setSaturateRatio ( float ); + virtual void setSaturateRp ( size_t ); virtual void setGlobalThreshold ( DbU::Unit ); virtual void print ( Cell* ) const; // Methods. @@ -86,11 +88,13 @@ namespace Kite { inline PostEventCb_t& getPostEventCb (); inline unsigned long getEventsLimit () const; inline float getExpandStep () const; + inline DbU::Unit getGlobalMinBreak () const; inline unsigned int getRipupCost () const; unsigned int getRipupLimit ( unsigned int type ) const; inline float getEdgeCapacityPercent () const; inline void setEventsLimit ( unsigned long ); inline void setExpandStep ( float ); + inline void setGlobalMinBreak ( DbU::Unit ); inline void setRipupCost ( unsigned int ); void setRipupLimit ( unsigned int limit, unsigned int type ); inline void setPostEventCb ( PostEventCb_t ); @@ -104,6 +108,7 @@ namespace Kite { PostEventCb_t _postEventCb; float _edgeCapacityPercent; float _expandStep; + DbU::Unit _globalMinBreak; unsigned int _ripupLimits[RipupLimitsTableSize]; unsigned int _ripupCost; unsigned long _eventsLimit; @@ -120,10 +125,13 @@ namespace Kite { inline unsigned int Configuration::getRipupCost () const { return _ripupCost; } inline float Configuration::getExpandStep () const { return _expandStep; } inline float Configuration::getEdgeCapacityPercent () const { return _edgeCapacityPercent; } + inline DbU::Unit Configuration::getGlobalMinBreak () const { return _globalMinBreak; } inline void Configuration::setRipupCost ( unsigned int cost ) { _ripupCost = cost; } inline void Configuration::setExpandStep ( float step ) { _expandStep = step; } inline void Configuration::setPostEventCb ( PostEventCb_t cb ) { _postEventCb = cb; } inline void Configuration::setEventsLimit ( unsigned long limit ) { _eventsLimit = limit; } + inline void Configuration::setGlobalMinBreak ( DbU::Unit threshold ) { _globalMinBreak = threshold; } + } // End of Kite namespace. diff --git a/kite/src/kite/KiteEngine.h b/kite/src/kite/KiteEngine.h index 264641b3..7efb59a0 100644 --- a/kite/src/kite/KiteEngine.h +++ b/kite/src/kite/KiteEngine.h @@ -92,6 +92,7 @@ namespace Kite { inline unsigned int getRipupCost () const; inline float getExpandStep () const; inline float getEdgeCapacityPercent () const; + inline DbU::Unit getGlobalMinBreak () const; inline GCellGrid* getGCellGrid () const; virtual const Name& getName () const; inline Configuration::PostEventCb_t& @@ -112,6 +113,7 @@ namespace Kite { inline void setRipupCost ( unsigned int ); inline void setExpandStep ( float ); inline void setEdgeCapacityPercent ( float ); + inline void setGlobalMinBreak ( DbU::Unit ); void preProcess (); void buildBlockages (); void buildPowerRails (); @@ -174,6 +176,7 @@ namespace Kite { inline unsigned int KiteEngine::getRipupCost () const { return _configuration->getRipupCost(); } inline float KiteEngine::getExpandStep () const { return _configuration->getExpandStep(); } inline float KiteEngine::getEdgeCapacityPercent () const { return _configuration->getEdgeCapacityPercent(); } + inline DbU::Unit KiteEngine::getGlobalMinBreak () const { return _configuration->getGlobalMinBreak(); } inline unsigned int KiteEngine::getRipupLimit ( unsigned int type ) const { return _configuration->getRipupLimit(type); } inline GCellGrid* KiteEngine::getGCellGrid () const { return _kiteGrid; } inline NegociateWindow* KiteEngine::getNegociateWindow () { return _negociateWindow; } @@ -183,6 +186,7 @@ namespace Kite { inline void KiteEngine::setRipupCost ( unsigned int cost ) { _configuration->setRipupCost(cost); } inline void KiteEngine::setExpandStep ( float step ) { _configuration->setExpandStep(step); } inline void KiteEngine::setEdgeCapacityPercent ( float percent ) { _configuration->setEdgeCapacityPercent(percent); } + inline void KiteEngine::setGlobalMinBreak ( DbU::Unit threshold ) { _configuration->setGlobalMinBreak(threshold); } inline void KiteEngine::setMinimumWL ( double minimum ) { _minimumWL = minimum; } inline void KiteEngine::setPostEventCb ( Configuration::PostEventCb_t cb ) { _configuration->setPostEventCb(cb); } inline void KiteEngine::printConfiguration () const { _configuration->print(getCell()); }