* Most of tools:

- Bug: In top CMakeLists.txt the SETUP_PROJECT_PATHS was not inserting
        X_USER_TOP *before* X_TOP, thus potentially allowing an obsolete
        system-wide configuration to shadow an up-to-date local one.

  * ./unicorn:
    - New: "--show-conf" options to dump the current configuration.
This commit is contained in:
Jean-Paul Chaput 2010-04-28 15:46:31 +00:00
parent 3a13c09ecd
commit 936998cff2
2 changed files with 27 additions and 13 deletions

View File

@ -32,15 +32,6 @@ ENDIF(COMMAND CMAKE_POLICY)
# This macro has to be included in all the tools CMakeLists.txt as it's
# the sole means of localizing other tools/projects.
MACRO(SETUP_PROJECT_PATHS project)
IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}")
SET(PROJECT_MODULE_PATH "$ENV{${project}_USER_TOP}/share/cmake_modules/")
LIST(FIND CMAKE_MODULE_PATH "${PROJECT_MODULE_PATH}" DIR_INDEX)
IF( DIR_INDEX LESS 0)
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( DIR_INDEX LESS 0)
ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
IF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}")
SET(PROJECT_MODULE_PATH "$ENV{${project}_TOP}/share/cmake_modules/")
@ -49,6 +40,15 @@ MACRO(SETUP_PROJECT_PATHS project)
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( DIR_INDEX LESS 0)
ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}")
SET(PROJECT_MODULE_PATH "$ENV{${project}_USER_TOP}/share/cmake_modules/")
LIST(FIND CMAKE_MODULE_PATH "${PROJECT_MODULE_PATH}" DIR_INDEX)
IF( DIR_INDEX LESS 0)
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( DIR_INDEX LESS 0)
ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
ENDMACRO(SETUP_PROJECT_PATHS project)
SETUP_PROJECT_PATHS(IO)

View File

@ -2,7 +2,7 @@
// -*- C++ -*-
//
// This file is part of the Coriolis Software.
// Copyright (c) UPMC/LIP6 2008-2009, All Rights Reserved
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
//
// ===================================================================
//
@ -23,6 +23,7 @@
// x-----------------------------------------------------------------x
#include <csignal>
#include <memory>
using namespace std;
@ -110,11 +111,13 @@ int main ( int argc, char *argv[] )
try {
float edgeCapacity;
float expandStep;
unsigned long eventsLimit;
unsigned int traceLevel;
bool verbose1;
bool verbose2;
bool info;
bool showConf;
bool coreDump;
bool logMode;
bool textMode;
@ -131,6 +134,8 @@ int main ( int argc, char *argv[] )
, "Second level of verbosity.")
( "info,i" , poptions::bool_switch(&info)->default_value(false)
, "Lots of informational messages.")
( "show-conf" , poptions::bool_switch(&showConf)->default_value(false)
, "Print Kite configuration settings.")
( "core-dump,D" , poptions::bool_switch(&coreDump)->default_value(false)
, "Enable core dumping.")
( "log-mode,L" , poptions::bool_switch(&logMode)->default_value(false)
@ -146,6 +151,8 @@ int main ( int argc, char *argv[] )
, "The tool to be run, in text mode." )
( "edge,e" , poptions::value<float>(&edgeCapacity)->default_value(0.65)
, "The egde density ratio applied on global router's edges." )
( "expand-step" , poptions::value<float>(&expandStep)->default_value(0.40)
, "The density delta above which GCells are aggregateds." )
( "events-limit" , poptions::value<unsigned long>(&eventsLimit)
, "The maximum number of iterations (events) that the router is"
"allowed to perform." )
@ -187,8 +194,13 @@ int main ( int argc, char *argv[] )
}
}
Kite::Configuration::setDefaultEdgeCapacity ( edgeCapacity );
//KnikEngine::setEdgeCapacityPercent ( edgeCapacity );
Kite::Configuration::getDefault()->setEdgeCapacityPercent ( edgeCapacity );
if ( arguments.count("events-limit") )
Kite::Configuration::getDefault()->setEventsLimit ( eventsLimit );
if ( arguments.count("expand-step") )
Kite::Configuration::getDefault()->setExpandStep ( expandStep );
if ( cell ) {
// addaccu.
@ -302,7 +314,9 @@ int main ( int argc, char *argv[] )
: Kite::BuildGlobalSolution;
static vector<Net*> routingNets;
KiteEngine* kite = KiteEngine::create ( af->getRoutingGauge(), cell );
KiteEngine* kite = KiteEngine::create ( cell );
kite->getConfiguration()->setExpandStep ( expandStep );
if ( showConf ) kite->printConfiguration ();
kite->runGlobalRouter ( globalFlags );
if ( saveGlobal ) kite->saveGlobalSolution ();