From 912023ffac8aea00ed8323a9b32416d72fff3831 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 18 Jun 2010 14:14:16 +0000 Subject: [PATCH] * ./nimbus, ./metis, ./mauka, ./katabatic, ./kite : - Change: switch toward the XML configuration system. Suppress the need of a default static configuration (now built on demand from the XML database). In Mauka and Kite, suppress the ConfigurationWidget, wich are obsoleted by the generic XML configuration widget. --- nimbus/CMakeLists.txt | 1 + nimbus/src/CMakeLists.txt | 1 + nimbus/src/Configuration.cpp | 30 +++++++----------------------- nimbus/src/NimbusEngine.cpp | 2 +- nimbus/src/nimbus/Configuration.h | 6 +----- 5 files changed, 11 insertions(+), 29 deletions(-) diff --git a/nimbus/CMakeLists.txt b/nimbus/CMakeLists.txt index 33f550fb..a9e74e96 100644 --- a/nimbus/CMakeLists.txt +++ b/nimbus/CMakeLists.txt @@ -40,6 +40,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) diff --git a/nimbus/src/CMakeLists.txt b/nimbus/src/CMakeLists.txt index 4740acbb..ed491f56 100644 --- a/nimbus/src/CMakeLists.txt +++ b/nimbus/src/CMakeLists.txt @@ -4,6 +4,7 @@ include_directories ( ${NIMBUS_SOURCE_DIR}/src ${HURRICANE_INCLUDE_DIR} ${CORIOLIS_INCLUDE_DIR} + ${CONFIGURATION_INCLUDE_DIR} ) set ( includes nimbus/Configuration.h nimbus/SplitterContact.h nimbus/SplitterContacts.h diff --git a/nimbus/src/Configuration.cpp b/nimbus/src/Configuration.cpp index 73f2e22e..ebf95b86 100644 --- a/nimbus/src/Configuration.cpp +++ b/nimbus/src/Configuration.cpp @@ -26,6 +26,7 @@ #include #include +#include "vlsisapd/configuration/Configuration.h" #include "hurricane/Cell.h" #include "crlcore/Utilities.h" #include "crlcore/AllianceFramework.h" @@ -42,6 +43,7 @@ namespace Nimbus { using std::setprecision; using std::ostringstream; using std::string; + using Cfg::Parameter; using Hurricane::tab; using Hurricane::inltrace; using CRL::AllianceFramework; @@ -51,30 +53,16 @@ namespace Nimbus { // Class : "Nimbus::Configuration". - Configuration* Configuration::_default = NULL; - - - Configuration* Configuration::getDefault () - { - if ( _default == NULL ) { - _default = new Configuration ( AllianceFramework::get()->getCellGauge() - , AllianceFramework::get()->getRoutingGauge() - ); - } - return _default; - } - - Configuration::Configuration ( CellGauge* cg, RoutingGauge* rg ) : _cellGauge (NULL) , _routingGauge (NULL) - , _pinsPlacement(false) - , _aspectRatio (1.00) - , _margin (0.40) + , _pinsPlacement(Cfg::getParamBool ("nimbus.pinsPlacement",false)->asBool ()) + , _aspectRatio (Cfg::getParamPercentage("nimbus.aspectRatio" ,100.0)->asDouble()) + , _margin (Cfg::getParamPercentage("nimbus.spaceMargin" , 40.0)->asDouble()) , _workZone () { - _cellGauge = cg->getClone(); - _routingGauge = rg->getClone(); + _cellGauge = (cg != NULL) ? cg->getClone() : AllianceFramework::get()->getCellGauge(); + _routingGauge = (rg != NULL) ? rg->getClone() : AllianceFramework::get()->getRoutingGauge(); } @@ -92,10 +80,6 @@ namespace Nimbus { { } - Configuration* Configuration::clone () const - { return new Configuration(*this); } - - void Configuration::print ( Cell* cell ) const { cout << " o Configuration of ToolEngine for Cell <" << cell->getName() << ">" << endl; diff --git a/nimbus/src/NimbusEngine.cpp b/nimbus/src/NimbusEngine.cpp index 29b328de..11ae4018 100644 --- a/nimbus/src/NimbusEngine.cpp +++ b/nimbus/src/NimbusEngine.cpp @@ -363,7 +363,7 @@ const Name NimbusEngine::_toolName = "Nimbus"; NimbusEngine::NimbusEngine (Cell* cell, const Box& workZone) // ********************************************************* : Inherit (cell) - , _configuration (Configuration::getDefault()->clone()) + , _configuration (new Configuration()) , _depth (0) , _placementBoxSet() , _routingBoxSet () diff --git a/nimbus/src/nimbus/Configuration.h b/nimbus/src/nimbus/Configuration.h index 4b37fe9f..c0ba1a1b 100644 --- a/nimbus/src/nimbus/Configuration.h +++ b/nimbus/src/nimbus/Configuration.h @@ -58,13 +58,10 @@ namespace Nimbus { class Configuration { - public: - static Configuration* getDefault (); public: // Constructor & Destruct or. - Configuration ( CellGauge*, RoutingGauge* ); + Configuration ( CellGauge* cg=NULL, RoutingGauge* rg=NULL ); ~Configuration (); - Configuration* clone () const; // Methods. inline const CellGauge* getCellGauge () const; inline const RoutingGauge* getRoutingGauge () const; @@ -88,7 +85,6 @@ namespace Nimbus { std::string _getTypeName () const; private: // Attributes. - static Configuration* _default; CellGauge* _cellGauge; RoutingGauge* _routingGauge; bool _pinsPlacement;