* ./kite:
- Bug: In CMakeLists.txt, local include directories *first*. - Change: In Configuration::setRipupLimit(), swap the two parameters, more natural ordering. - New: In ConfigurationWidget, adds an "apply" button to register the new parameters values.
This commit is contained in:
parent
8bab63c864
commit
0c7878df11
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
include ( ${QT_USE_FILE} )
|
include ( ${QT_USE_FILE} )
|
||||||
|
|
||||||
include_directories ( ${Boost_INCLUDE_DIRS}
|
include_directories ( ${KITE_SOURCE_DIR}/src
|
||||||
${KITE_SOURCE_DIR}/src
|
${Boost_INCLUDE_DIRS}
|
||||||
${HURRICANE_INCLUDE_DIR}
|
${HURRICANE_INCLUDE_DIR}
|
||||||
${CORIOLIS_INCLUDE_DIR}
|
${CORIOLIS_INCLUDE_DIR}
|
||||||
)
|
)
|
||||||
|
|
|
@ -167,7 +167,7 @@ namespace Kite {
|
||||||
{ _base->setGlobalThreshold(threshold); }
|
{ _base->setGlobalThreshold(threshold); }
|
||||||
|
|
||||||
|
|
||||||
void Configuration::setRipupLimit ( unsigned int limit, unsigned int type )
|
void Configuration::setRipupLimit ( unsigned int type, unsigned int limit )
|
||||||
{
|
{
|
||||||
if ( type >= RipupLimitsTableSize ) {
|
if ( type >= RipupLimitsTableSize ) {
|
||||||
cerr << Error("setRipupLimit(): Bad ripup limit index: %ud (> %ud)."
|
cerr << Error("setRipupLimit(): Bad ripup limit index: %ud (> %ud)."
|
||||||
|
@ -192,7 +192,7 @@ namespace Kite {
|
||||||
unsigned int Configuration::getRipupLimit ( unsigned int type ) const
|
unsigned int Configuration::getRipupLimit ( unsigned int type ) const
|
||||||
{
|
{
|
||||||
if ( type >= RipupLimitsTableSize ) {
|
if ( type >= RipupLimitsTableSize ) {
|
||||||
cerr << Error("getRipupLimit(): Bad ripup limit index: %ud (> %ud)."
|
cerr << Error("getRipupLimit(): Bad ripup limit index: %u (> %u)."
|
||||||
,type,RipupLimitsTableSize) << endl;
|
,type,RipupLimitsTableSize) << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,9 @@
|
||||||
|
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
#include <QPushButton>
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
|
#include <QHBoxLayout>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
#include <QSpinBox>
|
#include <QSpinBox>
|
||||||
|
@ -163,22 +165,38 @@ namespace Kite {
|
||||||
gLayout->addWidget ( label , kiteRow+8, 2, Qt::AlignRight );
|
gLayout->addWidget ( label , kiteRow+8, 2, Qt::AlignRight );
|
||||||
gLayout->addWidget ( _longGlobalRipupLimitSb, kiteRow+8, 3, Qt::AlignLeft );
|
gLayout->addWidget ( _longGlobalRipupLimitSb, kiteRow+8, 3, Qt::AlignLeft );
|
||||||
|
|
||||||
|
separator = new QFrame ();
|
||||||
|
separator->setFrameShape ( QFrame::HLine );
|
||||||
|
separator->setFrameShadow ( QFrame::Sunken );
|
||||||
|
gLayout->addWidget ( separator, kiteRow+9, 0, 1, 4 );
|
||||||
|
|
||||||
vLayout->addLayout ( gLayout );
|
vLayout->addLayout ( gLayout );
|
||||||
|
|
||||||
|
QHBoxLayout* hLayout = new QHBoxLayout ();
|
||||||
|
hLayout->addStretch ();
|
||||||
|
|
||||||
|
QPushButton* apply = new QPushButton ();
|
||||||
|
apply->setText ( tr("Apply") );
|
||||||
|
hLayout->addWidget ( apply );
|
||||||
|
hLayout->addStretch ();
|
||||||
|
|
||||||
|
vLayout->addLayout ( hLayout );
|
||||||
vLayout->addStretch ();
|
vLayout->addStretch ();
|
||||||
|
|
||||||
setLayout ( vLayout );
|
setLayout ( vLayout );
|
||||||
|
|
||||||
connect ( _saturateRatioEdit , SIGNAL(returnPressed()) , this, SLOT(_updateSaturateRatio()) );
|
connect ( apply, SIGNAL(clicked()), this, SLOT(_applySettings()) );
|
||||||
connect ( _globalThresholdEdit , SIGNAL(returnPressed()) , this, SLOT(_updateGlobalThreshold()) );
|
// connect ( _saturateRatioEdit , SIGNAL(returnPressed()) , this, SLOT(_updateSaturateRatio()) );
|
||||||
connect ( _edgeCapacityEdit , SIGNAL(returnPressed()) , this, SLOT(_updateEdgeCapacity()) );
|
// connect ( _globalThresholdEdit , SIGNAL(returnPressed()) , this, SLOT(_updateGlobalThreshold()) );
|
||||||
connect ( _expandStepEdit , SIGNAL(returnPressed()) , this, SLOT(_updateExpandStep()) );
|
// connect ( _edgeCapacityEdit , SIGNAL(returnPressed()) , this, SLOT(_updateEdgeCapacity()) );
|
||||||
connect ( _eventsLimitEdit , SIGNAL(returnPressed()) , this, SLOT(_updateEventsLimit()) );
|
// connect ( _expandStepEdit , SIGNAL(returnPressed()) , this, SLOT(_updateExpandStep()) );
|
||||||
connect ( _ripupCostSb , SIGNAL(valueChanged(int)), this, SLOT(_updateRipupCost(int)) );
|
// connect ( _eventsLimitEdit , SIGNAL(returnPressed()) , this, SLOT(_updateEventsLimit()) );
|
||||||
connect ( _borderRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateBorderRipupLimit(int)) );
|
// connect ( _ripupCostSb , SIGNAL(valueChanged(int)), this, SLOT(_updateRipupCost(int)) );
|
||||||
connect ( _strapRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateStrapRipupLimit(int)) );
|
// connect ( _borderRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateBorderRipupLimit(int)) );
|
||||||
connect ( _localRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateLocalRipupLimit(int)) );
|
// connect ( _strapRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateStrapRipupLimit(int)) );
|
||||||
connect ( _globalRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateGlobalRipupLimit(int)) );
|
// connect ( _localRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateLocalRipupLimit(int)) );
|
||||||
connect ( _longGlobalRipupLimitSb, SIGNAL(valueChanged(int)), this, SLOT(_updateLongGlobalRipupLimit(int)) );
|
// connect ( _globalRipupLimitSb , SIGNAL(valueChanged(int)), this, SLOT(_updateGlobalRipupLimit(int)) );
|
||||||
|
// connect ( _longGlobalRipupLimitSb, SIGNAL(valueChanged(int)), this, SLOT(_updateLongGlobalRipupLimit(int)) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -227,6 +245,24 @@ namespace Kite {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ConfigurationWidget::_applySettings ()
|
||||||
|
{
|
||||||
|
if ( _configuration == NULL ) return;
|
||||||
|
|
||||||
|
_updateSaturateRatio ();
|
||||||
|
_updateGlobalThreshold ();
|
||||||
|
_updateEdgeCapacity ();
|
||||||
|
_updateExpandStep ();
|
||||||
|
_updateEventsLimit ();
|
||||||
|
_updateRipupCost (_ripupCostSb ->value());
|
||||||
|
_updateBorderRipupLimit (_borderRipupLimitSb ->value());
|
||||||
|
_updateStrapRipupLimit (_strapRipupLimitSb ->value());
|
||||||
|
_updateLocalRipupLimit (_localRipupLimitSb ->value());
|
||||||
|
_updateGlobalRipupLimit (_globalRipupLimitSb ->value());
|
||||||
|
_updateLongGlobalRipupLimit(_longGlobalRipupLimitSb->value());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ConfigurationWidget::_updateSaturateRatio ()
|
void ConfigurationWidget::_updateSaturateRatio ()
|
||||||
{
|
{
|
||||||
if ( _configuration == NULL ) return;
|
if ( _configuration == NULL ) return;
|
||||||
|
|
|
@ -178,11 +178,11 @@ int main ( int argc, char *argv[] )
|
||||||
// kite->setSaturateRatio ( 0.85 );
|
// kite->setSaturateRatio ( 0.85 );
|
||||||
// kite->setExpandStep ( 0.20 );
|
// kite->setExpandStep ( 0.20 );
|
||||||
// kite->setRipupCost ( 3 );
|
// kite->setRipupCost ( 3 );
|
||||||
// kite->setRipupLimit ( 25, Configuration::BorderRipupLimit );
|
// kite->setRipupLimit ( Configuration::BorderRipupLimit, 25 );
|
||||||
// kite->setRipupLimit ( 15, Configuration::StrapRipupLimit );
|
// kite->setRipupLimit ( Configuration::StrapRipupLimit , 15 );
|
||||||
// kite->setRipupLimit ( 5, Configuration::LocalRipupLimit );
|
// kite->setRipupLimit ( Configuration::LocalRipupLimit , 5 );
|
||||||
// kite->setRipupLimit ( 5, Configuration::GlobalRipupLimit );
|
// kite->setRipupLimit ( Configuration::GlobalRipupLimit, 5 );
|
||||||
// kite->setRipupLimit ( 5, Configuration::LongGlobalRipupLimit );
|
// kite->setRipupLimit ( Configuration::LongGlobalRipupLimit, 5 );
|
||||||
kite->runGlobalRouter ( Kite::LoadGlobalSolution );
|
kite->runGlobalRouter ( Kite::LoadGlobalSolution );
|
||||||
kite->loadGlobalRouting ( Katabatic::LoadGrByNet, routingNets );
|
kite->loadGlobalRouting ( Katabatic::LoadGrByNet, routingNets );
|
||||||
kite->layerAssign ( Katabatic::NoNetLayerAssign );
|
kite->layerAssign ( Katabatic::NoNetLayerAssign );
|
||||||
|
|
|
@ -93,7 +93,7 @@ namespace Kite {
|
||||||
inline void setEventsLimit ( unsigned long );
|
inline void setEventsLimit ( unsigned long );
|
||||||
inline void setExpandStep ( float );
|
inline void setExpandStep ( float );
|
||||||
inline void setRipupCost ( unsigned int );
|
inline void setRipupCost ( unsigned int );
|
||||||
void setRipupLimit ( unsigned int type, unsigned int limit );
|
void setRipupLimit ( unsigned int limit, unsigned int type );
|
||||||
inline void setPostEventCb ( PostEventCb_t );
|
inline void setPostEventCb ( PostEventCb_t );
|
||||||
void setEdgeCapacityPercent ( float );
|
void setEdgeCapacityPercent ( float );
|
||||||
virtual Record* _getRecord () const;
|
virtual Record* _getRecord () const;
|
||||||
|
|
|
@ -46,6 +46,7 @@ namespace Kite {
|
||||||
ConfigurationWidget ( QWidget* parent=NULL );
|
ConfigurationWidget ( QWidget* parent=NULL );
|
||||||
public slots:
|
public slots:
|
||||||
void setConfiguration ( Configuration* );
|
void setConfiguration ( Configuration* );
|
||||||
|
void _applySettings ();
|
||||||
void _updateSaturateRatio ();
|
void _updateSaturateRatio ();
|
||||||
void _updateGlobalThreshold ();
|
void _updateGlobalThreshold ();
|
||||||
void _updateEdgeCapacity ();
|
void _updateEdgeCapacity ();
|
||||||
|
|
|
@ -108,7 +108,7 @@ namespace Kite {
|
||||||
inline void setPostEventCb ( Configuration::PostEventCb_t );
|
inline void setPostEventCb ( Configuration::PostEventCb_t );
|
||||||
inline void setEventLimit ( unsigned long );
|
inline void setEventLimit ( unsigned long );
|
||||||
inline void setMinimumWL ( double );
|
inline void setMinimumWL ( double );
|
||||||
inline void setRipupLimit ( unsigned int, unsigned int type );
|
inline void setRipupLimit ( unsigned int type, unsigned int );
|
||||||
inline void setRipupCost ( unsigned int );
|
inline void setRipupCost ( unsigned int );
|
||||||
inline void setExpandStep ( float );
|
inline void setExpandStep ( float );
|
||||||
inline void setEdgeCapacityPercent ( float );
|
inline void setEdgeCapacityPercent ( float );
|
||||||
|
@ -179,7 +179,7 @@ namespace Kite {
|
||||||
inline NegociateWindow* KiteEngine::getNegociateWindow () { return _negociateWindow; }
|
inline NegociateWindow* KiteEngine::getNegociateWindow () { return _negociateWindow; }
|
||||||
inline size_t KiteEngine::getRoutingPlanesSize () const { return _routingPlanes.size(); }
|
inline size_t KiteEngine::getRoutingPlanesSize () const { return _routingPlanes.size(); }
|
||||||
inline void KiteEngine::setEventLimit ( unsigned long limit ) { _configuration->setEventsLimit(limit); }
|
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::setRipupLimit ( unsigned int type, unsigned int limit ) { _configuration->setRipupLimit(limit,type); }
|
||||||
inline void KiteEngine::setRipupCost ( unsigned int cost ) { _configuration->setRipupCost(cost); }
|
inline void KiteEngine::setRipupCost ( unsigned int cost ) { _configuration->setRipupCost(cost); }
|
||||||
inline void KiteEngine::setExpandStep ( float step ) { _configuration->setExpandStep(step); }
|
inline void KiteEngine::setExpandStep ( float step ) { _configuration->setExpandStep(step); }
|
||||||
inline void KiteEngine::setEdgeCapacityPercent ( float percent ) { _configuration->setEdgeCapacityPercent(percent); }
|
inline void KiteEngine::setEdgeCapacityPercent ( float percent ) { _configuration->setEdgeCapacityPercent(percent); }
|
||||||
|
|
Loading…
Reference in New Issue