New: Parameters hTrackReservedMin in Katana.

* New: In Katana::Configuration, two new parameters hTrackReservedMin
   and same for V. Forced decrease of all edges capacities, to use
   when the global router is too optimistic...
This commit is contained in:
Jean-Paul Chaput 2020-08-02 18:16:21 +02:00
parent d6b90a70ab
commit f211cae69a
3 changed files with 32 additions and 3 deletions

View File

@ -44,6 +44,8 @@ namespace Katana {
, _hTracksReservedLocal(Cfg::getParamInt ("katana.hTracksReservedLocal", 3)->asInt())
, _vTracksReservedLocal(Cfg::getParamInt ("katana.vTracksReservedLocal", 3)->asInt())
, _termSatReservedLocal(Cfg::getParamInt ("katana.termSatReservedLocal", 9)->asInt())
, _hTracksReservedMin (Cfg::getParamInt ("katana.hTracksReservedMin" , 1)->asInt())
, _vTracksReservedMin (Cfg::getParamInt ("katana.vTracksReservedMin" , 1)->asInt())
, _termSatThreshold (Cfg::getParamInt ("katana.termSatThreshold" , 8)->asInt())
, _ripupLimits ()
, _ripupCost (Cfg::getParamInt ("katana.ripupCost" , 3)->asInt())
@ -89,6 +91,8 @@ namespace Katana {
, _hTracksReservedLocal(other._hTracksReservedLocal)
, _vTracksReservedLocal(other._vTracksReservedLocal)
, _termSatReservedLocal(other._termSatReservedLocal)
, _hTracksReservedMin (other._hTracksReservedMin)
, _vTracksReservedMin (other._vTracksReservedMin)
, _termSatThreshold (other._termSatThreshold)
, _ripupLimits ()
, _ripupCost (other._ripupCost)
@ -144,6 +148,14 @@ namespace Katana {
}
void Configuration::setHTracksReservedMin ( uint32_t reserved )
{ _hTracksReservedMin = reserved; }
void Configuration::setVTracksReservedMin ( uint32_t reserved )
{ _vTracksReservedMin = reserved; }
uint32_t Configuration::getRipupLimit ( uint32_t type ) const
{
if ( type >= RipupLimitsTableSize ) {

View File

@ -536,12 +536,21 @@ namespace Katana {
}
}
} else {
uint32_t hReservedMin = getConfiguration()->getHTracksReservedMin();
uint32_t vReservedMin = getConfiguration()->getVTracksReservedMin();
for ( GCell* gcell : getGCells() ) {
if (not gcell->isMatrix()) continue;
for ( Edge* edge : gcell->getEdges( Flags::EastSide|Flags::NorthSide) ) {
if (edge->getReservedCapacity() == 0)
edge->reserveCapacity( 1 );
for ( Edge* edge : gcell->getEdges( Flags::NorthSide) ) {
if (edge->getReservedCapacity() < vReservedMin) {
edge->reserveCapacity( vReservedMin );
cerr << edge << endl;
}
}
for ( Edge* edge : gcell->getEdges( Flags::EastSide) ) {
if (edge->getReservedCapacity() < hReservedMin)
edge->reserveCapacity( hReservedMin );
}
}
}

View File

@ -79,6 +79,8 @@ namespace Katana {
inline uint32_t getHTracksReservedLocal () const;
inline uint32_t getVTracksReservedLocal () const;
inline uint32_t getTermSatReservedLocal () const;
inline uint32_t getHTracksReservedMin () const;
inline uint32_t getVTracksReservedMin () const;
inline uint32_t getTermSatThreshold () const;
inline void setEventsLimit ( uint64_t );
inline void setRipupCost ( uint32_t );
@ -87,6 +89,8 @@ namespace Katana {
inline void setBloatOverloadAdd ( uint32_t );
void setHTracksReservedLocal ( uint32_t );
void setVTracksReservedLocal ( uint32_t );
void setHTracksReservedMin ( uint32_t );
void setVTracksReservedMin ( uint32_t );
inline void setFlags ( unsigned int );
inline void unsetFlags ( unsigned int );
inline void setProfileEventCosts ( bool );
@ -101,6 +105,8 @@ namespace Katana {
uint32_t _hTracksReservedLocal;
uint32_t _vTracksReservedLocal;
uint32_t _termSatReservedLocal;
uint32_t _hTracksReservedMin;
uint32_t _vTracksReservedMin;
uint32_t _termSatThreshold;
uint32_t _ripupLimits [RipupLimitsTableSize];
uint32_t _ripupCost;
@ -125,6 +131,8 @@ namespace Katana {
inline uint32_t Configuration::getHTracksReservedLocal () const { return _hTracksReservedLocal; }
inline uint32_t Configuration::getVTracksReservedLocal () const { return _vTracksReservedLocal; }
inline uint32_t Configuration::getTermSatReservedLocal () const { return _termSatReservedLocal; }
inline uint32_t Configuration::getHTracksReservedMin () const { return _hTracksReservedMin; }
inline uint32_t Configuration::getVTracksReservedMin () const { return _vTracksReservedMin; }
inline uint32_t Configuration::getTermSatThreshold () const { return _termSatThreshold; }
inline void Configuration::setBloatOverloadAdd ( uint32_t add ) { _bloatOverloadAdd = add; }
inline void Configuration::setRipupCost ( uint32_t cost ) { _ripupCost = cost; }