diff --git a/katabatic/CMakeLists.txt b/katabatic/CMakeLists.txt index 8cc9ae2c..791734b1 100644 --- a/katabatic/CMakeLists.txt +++ b/katabatic/CMakeLists.txt @@ -45,6 +45,7 @@ IF(BUILD_DOC) FIND_PACKAGE(Doxygen) ENDIF(BUILD_DOC) FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project +FIND_PACKAGE(VLSISAPD REQUIRED) FIND_PACKAGE(HURRICANE REQUIRED) FIND_PACKAGE(CORIOLIS REQUIRED) FIND_PACKAGE(KNIK REQUIRED) diff --git a/katabatic/src/CMakeLists.txt b/katabatic/src/CMakeLists.txt index 3de48088..10b9bdea 100644 --- a/katabatic/src/CMakeLists.txt +++ b/katabatic/src/CMakeLists.txt @@ -6,8 +6,9 @@ endif ( CHECK_DETERMINISM ) include ( ${QT_USE_FILE} ) include_directories ( ${KATABATIC_SOURCE_DIR}/src - ${HURRICANE_INCLUDE_DIR} ${CORIOLIS_INCLUDE_DIR} + ${HURRICANE_INCLUDE_DIR} + ${CONFIGURATION_INCLUDE_DIR} ) set ( includes katabatic/Configuration.h katabatic/AutoContact.h katabatic/AutoContacts.h diff --git a/katabatic/src/Configuration.cpp b/katabatic/src/Configuration.cpp index b59b841a..3bffe58d 100644 --- a/katabatic/src/Configuration.cpp +++ b/katabatic/src/Configuration.cpp @@ -26,6 +26,7 @@ #include #include +#include "vlsisapd/configuration/Configuration.h" #include "hurricane/Technology.h" #include "hurricane/DataBase.h" #include "hurricane/Cell.h" @@ -54,18 +55,6 @@ namespace Katabatic { // Class : "Katabatic::Configuration". - Configuration* Configuration::_default = NULL; - - - Configuration* Configuration::getDefault () - { - if ( _default == NULL ) { - _default = new ConfigurationConcrete ( AllianceFramework::get()->getRoutingGauge() ); - } - return _default; - } - - Configuration::Configuration () { } Configuration::~Configuration () { } @@ -78,14 +67,14 @@ namespace Katabatic { : Configuration() , _rg (NULL) , _extensionCap (DbU::lambda(1.5)) - , _saturateRatio (0.80) - , _globalThreshold (29*DbU::lambda(50.0)) // Ugly: direct uses of SxLib gauge. + , _saturateRatio (Cfg::getParamPercentage("katabatic.saturateRatio",80.0)->asDouble()) + , _globalThreshold (DbU::lambda(Cfg::getParamDouble("katabatic.globalLengthThreshold",29*50.0)->asDouble())) // Ugly: direct uses of SxLib gauge. , _allowedDepth (0) { - if ( rg ) { - _rg = rg->getClone(); - _allowedDepth = rg->getDepth(); - } + if ( rg == NULL ) rg = AllianceFramework::get()->getRoutingGauge(); + + _rg = rg->getClone(); + _allowedDepth = rg->getDepth(); _gmetalh = DataBase::getDB()->getTechnology()->getLayer("gmetalh"); _gmetalv = DataBase::getDB()->getTechnology()->getLayer("gmetalv"); diff --git a/katabatic/src/KatabaticEngine.cpp b/katabatic/src/KatabaticEngine.cpp index 66a9f5a1..5001fdc4 100644 --- a/katabatic/src/KatabaticEngine.cpp +++ b/katabatic/src/KatabaticEngine.cpp @@ -219,10 +219,12 @@ namespace Katabatic { , _destroyBaseSegment(false) , _demoMode (false) , _warnGCellOverload (false) - , _configuration (Configuration::getDefault()->clone()) + , _configuration (new ConfigurationConcrete()) , _gcellGrid (NULL) , _routingNets () { + cerr << "KatabaticEngine::_configuration: " << (void*)_configuration << endl; + addMeasure ( cell, "Gates" , AllianceFramework::getInstancesCount(cell,AllianceFramework::IgnoreFeeds |AllianceFramework::Recursive) ); diff --git a/katabatic/src/katabatic/Configuration.h b/katabatic/src/katabatic/Configuration.h index 6431da60..4a922538 100644 --- a/katabatic/src/katabatic/Configuration.h +++ b/katabatic/src/katabatic/Configuration.h @@ -57,8 +57,6 @@ namespace Katabatic { class Configuration { - public: - static Configuration* getDefault (); public: // Constructor & Destructor. virtual ~Configuration (); @@ -100,8 +98,9 @@ namespace Katabatic { friend class Configuration; public: // Constructor & Destructor. - virtual ConfigurationConcrete* clone () const; + ConfigurationConcrete ( const RoutingGauge* rg=NULL ); virtual ~ConfigurationConcrete (); + virtual ConfigurationConcrete* clone () const; // Methods. virtual bool isGMetal ( const Layer* ) const; virtual size_t getDepth () const; @@ -121,8 +120,6 @@ namespace Katabatic { virtual Record* _getRecord () const; virtual string _getString () const; virtual string _getTypeName () const; - protected: - ConfigurationConcrete ( const RoutingGauge* ); protected: // Attributes. const Layer* _gmetalh;