* ./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.
This commit is contained in:
Jean-Paul Chaput 2010-06-18 14:14:33 +00:00
parent 912023ffac
commit 991e024c91
5 changed files with 21 additions and 36 deletions

View File

@ -42,6 +42,7 @@ ENDFOREACH(PATH)
SET(QT_USE_QTXML "true")
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(NIMBUS REQUIRED)

View File

@ -6,8 +6,9 @@ endif ( HMETIS_FOUND )
include ( ${QT_USE_FILE} )
include_directories ( ${METIS_SOURCE_DIR}/src
${HURRICANE_INCLUDE_DIR}
${CORIOLIS_INCLUDE_DIR}
${HURRICANE_INCLUDE_DIR}
${CONFIGURATION_INCLUDE_DIR}
)
set ( includes metis/hmetis.h
metis/MetisGraph.h

View File

@ -26,6 +26,7 @@
#include <iostream>
#include <iomanip>
#include "vlsisapd/configuration/Configuration.h"
#include "hurricane/Cell.h"
#include "crlcore/Utilities.h"
#include "metis/Configuration.h"
@ -40,6 +41,7 @@ namespace Metis {
using std::setprecision;
using std::ostringstream;
using std::string;
using Cfg::Parameter;
using Hurricane::tab;
using Hurricane::inltrace;
using Hurricane::Cell;
@ -49,35 +51,23 @@ namespace Metis {
// Class : "Metis::Configuration".
Configuration* Configuration::_default = NULL;
Configuration* Configuration::getDefault ()
{
if ( _default == NULL ) {
_default = new Configuration ();
}
return _default;
}
Configuration::Configuration ()
: _refreshCb ()
, _partOrKWayHMetis (true)
, _numberOfInstancesStopCriterion(45)
, _globalConnectionsWeightRatio (1)
, _ubFactor (0)
, _partOrKWayHMetis (Cfg::getParamBool("metis.partOrKWayHMetis" ,true)->asBool ())
, _numberOfInstancesStopCriterion(Cfg::getParamInt ("metis.numberOfInstancesStopCriterion",45 )->asInt ())
, _globalConnectionsWeightRatio (Cfg::getParamInt ("metis.globalConnectionsWeightRatio" ,1 )->asInt ())
, _ubFactor (Cfg::getParamInt ("metis.ubFactor" ,0 )->asInt ())
, _hmetisOptions ()
{
_hmetisOptions[CustomOptions ] = 1;
_hmetisOptions[HMetisNRuns ] = 10;
_hmetisOptions[HMetisCType ] = CTypeHFC;
_hmetisOptions[HMetisRType ] = RTypeFM;
_hmetisOptions[HMetisVCycle ] = VCycleDisable;
_hmetisOptions[HMetisReconst ] = ReconstRemoveCutHE;
_hmetisOptions[HMetisPreAssign ] = 1;
_hmetisOptions[CustomOptions ] = Cfg::getParamBool ("metis.tuneHMetisParameters" ,true )->asBool() ? 1 : 0;
_hmetisOptions[HMetisNRuns ] = Cfg::getParamInt ("metis.numberOfTriedBisections",10 )->asInt();
_hmetisOptions[HMetisCType ] = Cfg::getParamEnumerate("metis.CType" ,CTypeHFC )->asInt();
_hmetisOptions[HMetisRType ] = Cfg::getParamEnumerate("metis.RType" ,RTypeFM )->asInt();
_hmetisOptions[HMetisVCycle ] = Cfg::getParamEnumerate("metis.VCycle" ,VCycleDisable )->asInt();
_hmetisOptions[HMetisReconst ] = Cfg::getParamEnumerate("metis.Reconst",ReconstRemoveCutHE)->asInt();
_hmetisOptions[HMetisPreAssign ] = 1;
_hmetisOptions[HMetisRandom ] = -1;
_hmetisOptions[HMetisDebugLevel] = DebugDisable;
_hmetisOptions[HMetisDebugLevel] = Cfg::getParamEnumerate("metis.debug" ,DebugDisable )->asInt();
}
@ -98,10 +88,6 @@ namespace Metis {
{ }
Configuration* Configuration::clone () const
{ return new Configuration(*this); }
void Configuration::print ( Cell* cell ) const
{
cout << " o Configuration of ToolEngine<Metis> for Cell <" << cell->getName() << ">" << endl;

View File

@ -35,6 +35,7 @@
#include <cmath>
using namespace std;
#include "vlsisapd/configuration/Configuration.h"
#include "hurricane/Warning.h"
#include "hurricane/Net.h"
#include "hurricane/Instance.h"
@ -61,7 +62,7 @@ namespace Metis {
MetisEngine::MetisEngine ( Cell* cell )
: Inherit (cell)
, _configuration(Configuration::getDefault()->clone())
, _configuration(new Configuration())
, _step (0)
, _actualGraphs ()
, _newGraphs ()
@ -273,8 +274,8 @@ namespace Metis {
{
size_t gates = getInstancesCount ( cell );
double partitions = log((double)gates / (double)Configuration::getDefault()
->getNumberOfInstancesStopCriterion() ) / log(4.0) + 1.0;
int partitionSizeStop = Cfg::getParamInt("metis.numberOfInstancesStopCriterion",45)->asInt();
double partitions = log((double)gates / (double)partitionSizeStop) / log(4.0) + 1.0;
return (unsigned int)(partitions);
}

View File

@ -85,13 +85,10 @@ namespace Metis {
, DebugMultRuns =8 // Debug multiple runs stage.
, DebugMoreMultRuns =16 // More debug of the multiple runs stage.
};
public:
static Configuration* getDefault ();
public:
// Constructor & Destructor.
Configuration ();
~Configuration ();
Configuration* clone () const;
// Methods.
void print ( Cell* ) const;
inline RefreshCb_t& getRefreshCb ();
@ -112,7 +109,6 @@ namespace Metis {
std::string _getTypeName () const;
private:
// Attributes.
static Configuration* _default;
RefreshCb_t _refreshCb;
bool _partOrKWayHMetis; // True for Recursive 2-part, false for KWay.
unsigned int _numberOfInstancesStopCriterion; // Minimal number of instances to partition.