* 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. * ./kite: - Change: In Configuration/KiteEngine, propagate changes in Configuration in Kite. Note that a *second* singleton is created at Kite level. - New: KiteEngine::printConfiguration() method to allow quick checks of the router's main parameters. - New: ConfigurationWidget to display/sets all the revelant Katabatic/ Kite configuration parameters. To be used with the TabSettings from the ControllerWidget. The ConfigurationWidget is bound to the default (static) Kite configuration, as once it has been run you obviously cannot change the router's settings.
This commit is contained in:
parent
388b8b3ce0
commit
6a3440f4e6
|
@ -21,15 +21,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/")
|
||||
|
@ -38,6 +29,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)
|
||||
|
|
|
@ -579,7 +579,7 @@ namespace Kite {
|
|||
|
||||
forEach ( BasicLayer*, iLayer, technology->getBasicLayers() ) {
|
||||
if ( iLayer->getMaterial() != BasicLayer::Material::metal ) continue;
|
||||
if ( _configuration.isGMetal(*iLayer) ) continue;
|
||||
if ( _configuration->isGMetal(*iLayer) ) continue;
|
||||
|
||||
cmess1 << " - PowerRails in " << iLayer->getName() << " ..." << endl;
|
||||
|
||||
|
|
|
@ -30,8 +30,11 @@
|
|||
kite/Configuration.h
|
||||
kite/KiteEngine.h
|
||||
kite/GraphicKiteEngine.h
|
||||
kite/ConfigurationWidget.h
|
||||
)
|
||||
set ( mocIncludes kite/GraphicKiteEngine.h
|
||||
kite/ConfigurationWidget.h
|
||||
)
|
||||
set ( mocIncludes kite/GraphicKiteEngine.h )
|
||||
set ( cpps TrackSegmentCost.cpp
|
||||
TrackCost.cpp
|
||||
DataNegociate.cpp
|
||||
|
@ -60,6 +63,7 @@
|
|||
Configuration.cpp
|
||||
KiteEngine.cpp
|
||||
GraphicKiteEngine.cpp
|
||||
ConfigurationWidget.cpp
|
||||
)
|
||||
set ( kitecpps KiteMain.cpp )
|
||||
qt4_wrap_cpp ( mocCpps ${mocIncludes} )
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
// x-----------------------------------------------------------------x
|
||||
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "hurricane/Cell.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "kite/Configuration.h"
|
||||
#include "kite/KiteEngine.h"
|
||||
|
||||
|
@ -31,29 +35,29 @@
|
|||
namespace Kite {
|
||||
|
||||
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::ostringstream;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::inltrace;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Technology;
|
||||
using std::cout;
|
||||
using std::cerr;
|
||||
using std::endl;
|
||||
using std::ostringstream;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::inltrace;
|
||||
using Hurricane::Error;
|
||||
using Hurricane::Technology;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "Kite::Configuration".
|
||||
|
||||
|
||||
float Configuration::_defaultEdgeCapacity = 0.80;
|
||||
Configuration* Configuration::_default = NULL;
|
||||
|
||||
|
||||
void Configuration::setDefaultEdgeCapacity ( float percent )
|
||||
Configuration* Configuration::getDefault ()
|
||||
{
|
||||
if ( percent > 1.0 )
|
||||
throw Error("Configuration::setDefaultEdgeCapacity(): edge capacity ratio greater than 1.0 (%.1f)."
|
||||
,percent);
|
||||
|
||||
_defaultEdgeCapacity = percent;
|
||||
if ( _default == NULL ) {
|
||||
_default = new Configuration ( Katabatic::Configuration::getDefault() );
|
||||
}
|
||||
return _default;
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,8 +65,8 @@ namespace Kite {
|
|||
: Katabatic::Configuration()
|
||||
, _base (base)
|
||||
, _postEventCb ()
|
||||
, _edgeCapacityPercent(_defaultEdgeCapacity)
|
||||
, _expandStep (0.40)
|
||||
, _edgeCapacityPercent(0.80)
|
||||
, _expandStep (0.60)
|
||||
, _ripupLimits ()
|
||||
, _ripupCost (3)
|
||||
, _eventsLimit (4000000)
|
||||
|
@ -75,10 +79,38 @@ namespace Kite {
|
|||
}
|
||||
|
||||
|
||||
Configuration::Configuration ( const Configuration& other, Katabatic::Configuration* base )
|
||||
: Katabatic::Configuration()
|
||||
, _base (base)
|
||||
, _postEventCb (other._postEventCb)
|
||||
, _edgeCapacityPercent(other._edgeCapacityPercent)
|
||||
, _expandStep (other._expandStep)
|
||||
, _ripupLimits ()
|
||||
, _ripupCost (other._ripupCost)
|
||||
, _eventsLimit (other._eventsLimit)
|
||||
{
|
||||
if ( _base == NULL ) _base = other._base->clone();
|
||||
|
||||
_ripupLimits[BorderRipupLimit] = other._ripupLimits[BorderRipupLimit];
|
||||
_ripupLimits[StrapRipupLimit] = other._ripupLimits[StrapRipupLimit];
|
||||
_ripupLimits[LocalRipupLimit] = other._ripupLimits[LocalRipupLimit];
|
||||
_ripupLimits[GlobalRipupLimit] = other._ripupLimits[GlobalRipupLimit];
|
||||
_ripupLimits[LongGlobalRipupLimit] = other._ripupLimits[LongGlobalRipupLimit];
|
||||
}
|
||||
|
||||
|
||||
Configuration::~Configuration ()
|
||||
{ }
|
||||
|
||||
|
||||
Configuration* Configuration::clone () const
|
||||
{ return new Configuration(*this); }
|
||||
|
||||
|
||||
Configuration* Configuration::clone ( KiteEngine* kite ) const
|
||||
{ return new Configuration(*this,kite->base()->getKatabaticConfiguration()); }
|
||||
|
||||
|
||||
bool Configuration::isGMetal ( const Layer* layer ) const
|
||||
{ return _base->isGMetal(layer); }
|
||||
|
||||
|
@ -139,6 +171,16 @@ namespace Kite {
|
|||
}
|
||||
|
||||
|
||||
void Configuration::setEdgeCapacityPercent ( float percent )
|
||||
{
|
||||
if ( percent > 1.0 )
|
||||
throw Error("Configuration::setEdgeCapacityPercent(): edge capacity ratio greater than 1.0 (%.1f)."
|
||||
,percent);
|
||||
|
||||
_edgeCapacityPercent = percent;
|
||||
}
|
||||
|
||||
|
||||
unsigned int Configuration::getRipupLimit ( unsigned int type ) const
|
||||
{
|
||||
if ( type >= RipupLimitsTableSize ) {
|
||||
|
@ -150,6 +192,22 @@ namespace Kite {
|
|||
}
|
||||
|
||||
|
||||
void Configuration::print ( Cell* cell ) const
|
||||
{
|
||||
cout << " o Configuration of ToolEngine<Kite> for Cell <" << cell->getName() << ">" << endl;
|
||||
cout << Dots::asPercentage(" - Global router edge capacity" ,_edgeCapacityPercent) << endl;
|
||||
cout << Dots::asPercentage(" - GCell aggregation threshold (delta)",_expandStep) << endl;
|
||||
cout << Dots::asULong (" - Events limit (iterations)" ,_eventsLimit) << endl;
|
||||
cout << Dots::asUInt (" - Ripup limit, borders" ,_ripupLimits[BorderRipupLimit]) << endl;
|
||||
cout << Dots::asUInt (" - Ripup limit, straps" ,_ripupLimits[StrapRipupLimit]) << endl;
|
||||
cout << Dots::asUInt (" - Ripup limit, locals" ,_ripupLimits[LocalRipupLimit]) << endl;
|
||||
cout << Dots::asUInt (" - Ripup limit, globals" ,_ripupLimits[GlobalRipupLimit]) << endl;
|
||||
cout << Dots::asUInt (" - Ripup limit, long globals" ,_ripupLimits[LongGlobalRipupLimit]) << endl;
|
||||
|
||||
_base->print ( cell );
|
||||
}
|
||||
|
||||
|
||||
string Configuration::_getTypeName () const
|
||||
{
|
||||
return "Configuration";
|
||||
|
|
|
@ -41,10 +41,13 @@
|
|||
#include <hurricane/viewer/Graphics.h>
|
||||
#include <hurricane/viewer/CellWidget.h>
|
||||
#include <hurricane/viewer/CellViewer.h>
|
||||
#include <hurricane/viewer/ControllerWidget.h>
|
||||
#include <crlcore/Utilities.h>
|
||||
#include <crlcore/AllianceFramework.h>
|
||||
#include <katabatic/GCell.h>
|
||||
#include <knik/KnikEngine.h>
|
||||
#include <kite/GraphicKiteEngine.h>
|
||||
#include <kite/ConfigurationWidget.h>
|
||||
|
||||
|
||||
namespace Kite {
|
||||
|
@ -59,6 +62,7 @@ namespace Kite {
|
|||
using Hurricane::Net;
|
||||
using Hurricane::Graphics;
|
||||
using Hurricane::ColorScale;
|
||||
using Hurricane::ControllerWidget;
|
||||
using CRL::Catalog;
|
||||
using CRL::AllianceFramework;
|
||||
using Knik::KnikEngine;
|
||||
|
@ -112,13 +116,13 @@ namespace Kite {
|
|||
}
|
||||
|
||||
|
||||
KiteEngine* GraphicKiteEngine::createEngine ( const RoutingGauge* rg )
|
||||
KiteEngine* GraphicKiteEngine::createEngine ()
|
||||
{
|
||||
Cell* cell = getCell ();
|
||||
|
||||
KiteEngine* kite = KiteEngine::get ( cell );
|
||||
if ( not kite ) {
|
||||
kite = KiteEngine::create ( rg, cell );
|
||||
kite = KiteEngine::create ( cell );
|
||||
kite->setPostEventCb ( boost::bind(&GraphicKiteEngine::postEvent,this) );
|
||||
} else
|
||||
cerr << Warning("%s already has a Kite engine.",getString(cell).c_str()) << endl;
|
||||
|
@ -134,8 +138,7 @@ namespace Kite {
|
|||
KiteEngine* kite = KiteEngine::get ( getCell() );
|
||||
if ( kite ) return kite;
|
||||
|
||||
AllianceFramework* af = AllianceFramework::get ();
|
||||
kite = createEngine ( af->getRoutingGauge() );
|
||||
kite = createEngine ();
|
||||
|
||||
if ( not kite )
|
||||
throw Error("Failed to create Kite engine on %s.",getString(getCell()).c_str());
|
||||
|
@ -181,6 +184,8 @@ namespace Kite {
|
|||
if ( not kite ) {
|
||||
throw Error("KiteEngine not created yet, run the global router first.");
|
||||
}
|
||||
if ( cmess1.enabled() )
|
||||
kite->printConfiguration ();
|
||||
|
||||
emit cellPreModificated ();
|
||||
|
||||
|
@ -333,6 +338,17 @@ namespace Kite {
|
|||
|
||||
connect ( this, SIGNAL(cellPreModificated ()), _viewer->getCellWidget(), SLOT(cellPreModificate ()) );
|
||||
connect ( this, SIGNAL(cellPostModificated()), _viewer->getCellWidget(), SLOT(cellPostModificate()) );
|
||||
|
||||
ControllerWidget* controller = _viewer->getControllerWidget();
|
||||
ConfigurationWidget* setting = controller->getSettings()
|
||||
->findChild<ConfigurationWidget*>("controller.tabSettings.setting.kite");
|
||||
|
||||
if ( setting == NULL ) {
|
||||
setting = new ConfigurationWidget ();
|
||||
setting->setObjectName ( "controller.tabSettings.setting.kite" );
|
||||
setting->setConfiguration ( Configuration::getDefault() );
|
||||
controller->addSetting ( setting, "Kite" );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
|
@ -101,11 +101,11 @@ namespace Kite {
|
|||
}
|
||||
|
||||
|
||||
KiteEngine::KiteEngine ( const RoutingGauge* gauge, Cell* cell )
|
||||
: KatabaticEngine (gauge,cell)
|
||||
KiteEngine::KiteEngine ( Cell* cell )
|
||||
: KatabaticEngine (cell)
|
||||
, _knik (NULL)
|
||||
, _obstacleNet (NULL)
|
||||
, _configuration (getKatabaticConfiguration())
|
||||
, _configuration (Configuration::getDefault()->clone(this))
|
||||
, _routingPlanes ()
|
||||
, _kiteGrid (NULL)
|
||||
, _negociateWindow (NULL)
|
||||
|
@ -133,9 +133,9 @@ namespace Kite {
|
|||
}
|
||||
|
||||
|
||||
KiteEngine* KiteEngine::create ( const RoutingGauge* gauge, Cell* cell )
|
||||
KiteEngine* KiteEngine::create ( Cell* cell )
|
||||
{
|
||||
KiteEngine* kite = new KiteEngine ( gauge, cell );
|
||||
KiteEngine* kite = new KiteEngine ( cell );
|
||||
|
||||
kite->_postCreate ();
|
||||
return kite;
|
||||
|
@ -165,7 +165,9 @@ namespace Kite {
|
|||
|
||||
|
||||
KiteEngine::~KiteEngine ()
|
||||
{ }
|
||||
{
|
||||
delete _configuration;
|
||||
}
|
||||
|
||||
|
||||
const Name& KiteEngine::getName () const
|
||||
|
@ -173,7 +175,7 @@ namespace Kite {
|
|||
|
||||
|
||||
Configuration* KiteEngine::getConfiguration ()
|
||||
{ return &_configuration; }
|
||||
{ return _configuration; }
|
||||
|
||||
|
||||
unsigned int KiteEngine::getRipupLimit ( const TrackElement* segment ) const
|
||||
|
@ -182,21 +184,21 @@ namespace Kite {
|
|||
|
||||
if ( segment->getDataNegociate() ) {
|
||||
if ( segment->getDataNegociate()->isBorder() )
|
||||
return _configuration.getRipupLimit(Configuration::BorderRipupLimit);
|
||||
return _configuration->getRipupLimit(Configuration::BorderRipupLimit);
|
||||
|
||||
if ( segment->getDataNegociate()->isRing() )
|
||||
return _configuration.getRipupLimit(Configuration::GlobalRipupLimit);
|
||||
return _configuration->getRipupLimit(Configuration::GlobalRipupLimit);
|
||||
}
|
||||
|
||||
if ( segment->isStrap () ) return _configuration.getRipupLimit(Configuration::StrapRipupLimit);
|
||||
if ( segment->isStrap () ) return _configuration->getRipupLimit(Configuration::StrapRipupLimit);
|
||||
if ( segment->isGlobal() ) {
|
||||
vector<GCell*> gcells;
|
||||
segment->getGCells(gcells);
|
||||
if ( gcells.size() > 2 )
|
||||
return _configuration.getRipupLimit(Configuration::LongGlobalRipupLimit);
|
||||
return _configuration.getRipupLimit(Configuration::GlobalRipupLimit);
|
||||
return _configuration->getRipupLimit(Configuration::LongGlobalRipupLimit);
|
||||
return _configuration->getRipupLimit(Configuration::GlobalRipupLimit);
|
||||
}
|
||||
return _configuration.getRipupLimit(Configuration::LocalRipupLimit);
|
||||
return _configuration->getRipupLimit(Configuration::LocalRipupLimit);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -161,8 +161,7 @@ int main ( int argc, char *argv[] )
|
|||
}
|
||||
}
|
||||
|
||||
//KnikEngine::setEdgeCapacityPercent ( edgeCapacity );
|
||||
Kite::Configuration::setDefaultEdgeCapacity ( edgeCapacity );
|
||||
Kite::Configuration::getDefault()->setEdgeCapacityPercent ( edgeCapacity );
|
||||
|
||||
cell->flattenNets ( not arguments.count("global") );
|
||||
|
||||
|
@ -175,7 +174,7 @@ int main ( int argc, char *argv[] )
|
|||
}
|
||||
|
||||
static vector<Net*> routingNets;
|
||||
KiteEngine* kite = KiteEngine::create ( af->getRoutingGauge(), cell );
|
||||
KiteEngine* kite = KiteEngine::create ( cell );
|
||||
// kite->setSaturateRatio ( 0.85 );
|
||||
// kite->setExpandStep ( 0.20 );
|
||||
// kite->setRipupCost ( 3 );
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "hurricane/RoutingPad.h"
|
||||
#include "hurricane/Net.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
|
||||
#include "kite/DataNegociate.h"
|
||||
|
@ -538,10 +539,11 @@ namespace Kite {
|
|||
biggestRSsize = _gcellRoutingSets[i]->getGCells().size();
|
||||
}
|
||||
|
||||
cout << " - Processeds Events Total := " << RoutingEvent::getProcesseds() << endl;
|
||||
cout << " - Unique Events Total := " << (RoutingEvent::getProcesseds() - RoutingEvent::getCloneds()) << endl;
|
||||
cout << " - Biggest Events Chunk := " << biggestEventsCount << endl;
|
||||
cout << " - Biggest Routing Set := " << biggestRSsize << endl;
|
||||
cout << Dots::asSizet(" - Processeds Events Total",RoutingEvent::getProcesseds()) << endl;
|
||||
cout << Dots::asSizet(" - Unique Events Total"
|
||||
,(RoutingEvent::getProcesseds() - RoutingEvent::getCloneds())) << endl;
|
||||
cout << Dots::asSizet(" - Biggest Events Chunk" ,biggestEventsCount) << endl;
|
||||
cout << Dots::asSizet(" - Biggest Routing Set" ,biggestRSsize) << endl;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1132,7 +1132,7 @@ namespace {
|
|||
Interval constraints;
|
||||
vector<Cs1Candidate> candidates;
|
||||
TrackElement* segment = _event->getSegment();
|
||||
bool canMoveUp = (segment->isLocal()) ? segment->canPivotUp(1.0) : segment->canMoveUp(1.0);
|
||||
bool canMoveUp = (segment->isLocal()) ? segment->canPivotUp(0.5) : segment->canMoveUp(0.5);
|
||||
unsigned int relaxFlags
|
||||
= (_data and (_data->getStateCount() < 2)) ? Manipulator::AllowExpand : Manipulator::NoExpand;
|
||||
|
||||
|
@ -1194,7 +1194,7 @@ namespace {
|
|||
|
||||
if ( other->isGlobal()
|
||||
and (other->getDataNegociate()->getGCellOrder() == Session::getOrder())
|
||||
and other->canMoveUp(1.0) ) {
|
||||
and other->canMoveUp(0.5) ) {
|
||||
ltrace(200) << "conflictSolve1() - One conflict, other move up" << endl;
|
||||
if ( (success = other->moveUp()) ) break;
|
||||
}
|
||||
|
|
|
@ -33,12 +33,15 @@
|
|||
|
||||
namespace Kite {
|
||||
|
||||
using std::string;
|
||||
using Hurricane::Record;
|
||||
using Hurricane::Layer;
|
||||
using Hurricane::DbU;
|
||||
using CRL::RoutingGauge;
|
||||
using CRL::RoutingLayerGauge;
|
||||
using std::string;
|
||||
using Hurricane::Record;
|
||||
using Hurricane::Layer;
|
||||
using Hurricane::DbU;
|
||||
using Hurricane::Cell;
|
||||
using CRL::RoutingGauge;
|
||||
using CRL::RoutingLayerGauge;
|
||||
|
||||
class KiteEngine;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
@ -57,10 +60,11 @@ namespace Kite {
|
|||
, RipupLimitsTableSize=5
|
||||
};
|
||||
public:
|
||||
static void setDefaultEdgeCapacity ( float );
|
||||
static Configuration* getDefault ();
|
||||
public:
|
||||
// Constructor & Destructor.
|
||||
Configuration ( Katabatic::Configuration* );
|
||||
virtual Configuration* clone () const;
|
||||
virtual Configuration* clone ( KiteEngine* kite ) const;
|
||||
~Configuration ();
|
||||
// Decorateds.
|
||||
virtual bool isGMetal ( const Layer* ) const;
|
||||
|
@ -75,6 +79,7 @@ namespace Kite {
|
|||
virtual DbU::Unit getGlobalThreshold () const;
|
||||
virtual void setSaturateRatio ( float );
|
||||
virtual void setGlobalThreshold ( DbU::Unit );
|
||||
virtual void print ( Cell* ) const;
|
||||
// Methods.
|
||||
inline Katabatic::Configuration* base ();
|
||||
inline PostEventCb_t& getPostEventCb ();
|
||||
|
@ -88,14 +93,16 @@ namespace Kite {
|
|||
inline void setRipupCost ( unsigned int );
|
||||
void setRipupLimit ( unsigned int type, unsigned int limit );
|
||||
inline void setPostEventCb ( PostEventCb_t );
|
||||
inline void setEdgeCapacityPercent ( float );
|
||||
void setEdgeCapacityPercent ( float );
|
||||
virtual Record* _getRecord () const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
|
||||
protected:
|
||||
Configuration ( Katabatic::Configuration* );
|
||||
private:
|
||||
// Static Attributes.
|
||||
static float _defaultEdgeCapacity;
|
||||
static Configuration* _default;
|
||||
// Attributes.
|
||||
Katabatic::Configuration* _base;
|
||||
PostEventCb_t _postEventCb;
|
||||
|
@ -105,7 +112,7 @@ namespace Kite {
|
|||
unsigned int _ripupCost;
|
||||
unsigned long _eventsLimit;
|
||||
private:
|
||||
Configuration ( const Configuration& );
|
||||
Configuration ( const Configuration& other, Katabatic::Configuration* base=NULL );
|
||||
Configuration& operator= ( const Configuration& );
|
||||
};
|
||||
|
||||
|
@ -121,7 +128,6 @@ namespace Kite {
|
|||
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::setEdgeCapacityPercent ( float percent ) { _edgeCapacityPercent = percent; }
|
||||
|
||||
|
||||
} // End of Kite namespace.
|
||||
|
|
|
@ -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
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
|
@ -38,9 +38,6 @@ namespace Hurricane {
|
|||
}
|
||||
|
||||
#include "crlcore/GraphicToolEngine.h"
|
||||
namespace CRL {
|
||||
class RoutingGauge;
|
||||
}
|
||||
|
||||
#include "kite/KiteEngine.h"
|
||||
|
||||
|
@ -53,19 +50,18 @@ namespace Kite {
|
|||
using Hurricane::Transformation;
|
||||
using Hurricane::CellWidget;
|
||||
using Hurricane::CellViewer;
|
||||
using CRL::RoutingGauge;
|
||||
using CRL::GraphicTool;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Class : "CRL::GraphicKiteEngine".
|
||||
// Class : "Kite::GraphicKiteEngine".
|
||||
|
||||
|
||||
class GraphicKiteEngine : public GraphicTool {
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
KiteEngine* createEngine ( const RoutingGauge* );
|
||||
KiteEngine* createEngine ();
|
||||
KiteEngine* getForFramework ();
|
||||
static void initKatabaticAc ( CellWidget* );
|
||||
static void drawKatabaticAc ( CellWidget*
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace Kite {
|
|||
|
||||
public:
|
||||
static const Name& staticGetName ();
|
||||
static KiteEngine* create ( const RoutingGauge*, Cell* );
|
||||
static KiteEngine* create ( Cell* );
|
||||
static KiteEngine* get ( const Cell* );
|
||||
public:
|
||||
inline KatabaticEngine* base ();
|
||||
|
@ -101,6 +101,7 @@ namespace Kite {
|
|||
RoutingPlane* getRoutingPlaneByIndex ( size_t index ) const;
|
||||
RoutingPlane* getRoutingPlaneByLayer ( const Layer* ) const;
|
||||
Track* getTrackByPosition ( const Layer*, DbU::Unit axis, unsigned int mode=Constant::Nearest ) const;
|
||||
inline void printConfiguration () const;
|
||||
void printCompletion () const;
|
||||
void dumpMeasures ( std::ostream& ) const;
|
||||
void dumpMeasures () const;
|
||||
|
@ -143,7 +144,7 @@ namespace Kite {
|
|||
protected:
|
||||
Knik::KnikEngine* _knik;
|
||||
Net* _obstacleNet;
|
||||
Configuration _configuration;
|
||||
Configuration* _configuration;
|
||||
vector<RoutingPlane*> _routingPlanes;
|
||||
GCellGrid* _kiteGrid;
|
||||
NegociateWindow* _negociateWindow;
|
||||
|
@ -153,7 +154,7 @@ namespace Kite {
|
|||
|
||||
protected:
|
||||
// Constructors & Destructors.
|
||||
KiteEngine ( const RoutingGauge*, Cell* );
|
||||
KiteEngine ( Cell* );
|
||||
virtual ~KiteEngine ();
|
||||
virtual void _postCreate ();
|
||||
virtual void _preDestroy ();
|
||||
|
@ -165,25 +166,26 @@ namespace Kite {
|
|||
|
||||
// Inline Functions.
|
||||
inline KatabaticEngine* KiteEngine::base () { return static_cast<KatabaticEngine*>(this); }
|
||||
inline Configuration* KiteEngine::getKiteConfiguration () { return &_configuration; }
|
||||
inline Configuration* KiteEngine::getKiteConfiguration () { return _configuration; }
|
||||
inline Net* KiteEngine::getBlockageNet () { return _obstacleNet; }
|
||||
inline Configuration::PostEventCb_t& KiteEngine::getPostEventCb () { return _configuration.getPostEventCb(); }
|
||||
inline Configuration::PostEventCb_t& KiteEngine::getPostEventCb () { return _configuration->getPostEventCb(); }
|
||||
inline bool KiteEngine::getToolSuccess () const { return _toolSuccess; }
|
||||
inline unsigned long KiteEngine::getEventsLimit () const { return _configuration.getEventsLimit(); }
|
||||
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 unsigned int KiteEngine::getRipupLimit ( unsigned int type ) const { return _configuration.getRipupLimit(type); }
|
||||
inline unsigned long KiteEngine::getEventsLimit () const { return _configuration->getEventsLimit(); }
|
||||
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 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; }
|
||||
inline size_t KiteEngine::getRoutingPlanesSize () const { return _routingPlanes.size(); }
|
||||
inline void KiteEngine::setEventLimit ( unsigned long limit ) { _configuration.setEventsLimit(limit); }
|
||||
inline void KiteEngine::setRipupLimit ( unsigned int limit, unsigned int type ) { _configuration.setRipupLimit(limit,type); }
|
||||
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::setEventLimit ( unsigned long limit ) { _configuration->setEventsLimit(limit); }
|
||||
inline void KiteEngine::setRipupLimit ( unsigned int limit, unsigned int type ) { _configuration->setRipupLimit(limit,type); }
|
||||
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::setMinimumWL ( double minimum ) { _minimumWL = minimum; }
|
||||
inline void KiteEngine::setPostEventCb ( Configuration::PostEventCb_t cb ) { _configuration.setPostEventCb(cb); }
|
||||
inline void KiteEngine::setPostEventCb ( Configuration::PostEventCb_t cb ) { _configuration->setPostEventCb(cb); }
|
||||
inline void KiteEngine::printConfiguration () const { _configuration->print(getCell()); }
|
||||
inline TrackElementLut& KiteEngine::_getTrackElementLut () { return _trackSegmentLut; }
|
||||
inline TrackElement* KiteEngine::_lookup ( AutoSegment* as ) const { return _lookup(as->base()); }
|
||||
|
||||
|
|
Loading…
Reference in New Issue