* ./katabatic:

- New: Adds support to restrict the number of routing layers.
This commit is contained in:
Jean-Paul Chaput 2010-05-27 16:12:28 +00:00
parent 2e6242df73
commit 67a5ecae40
4 changed files with 21 additions and 3 deletions

View File

@ -1296,7 +1296,7 @@ namespace Katabatic {
if ( isTerminal() and isLocal() ) return false; if ( isTerminal() and isLocal() ) return false;
size_t depth = Session::getRoutingGauge()->getLayerDepth(getLayer()) + 2; size_t depth = Session::getRoutingGauge()->getLayerDepth(getLayer()) + 2;
if ( depth >= Session::getRoutingGauge()->getDepth() ) return false; if ( depth >= Session::getConfiguration()->getAllowedDepth() ) return false;
vector<GCell*> gcells; vector<GCell*> gcells;
getGCells ( gcells ); getGCells ( gcells );

View File

@ -80,8 +80,12 @@ namespace Katabatic {
, _extensionCap (DbU::lambda(1.5)) , _extensionCap (DbU::lambda(1.5))
, _saturateRatio (0.80) , _saturateRatio (0.80)
, _globalThreshold (29*DbU::lambda(50.0)) // Ugly: direct uses of SxLib gauge. , _globalThreshold (29*DbU::lambda(50.0)) // Ugly: direct uses of SxLib gauge.
, _allowedDepth (0)
{ {
if ( rg ) _rg = rg->getClone(); if ( rg ) {
_rg = rg->getClone();
_allowedDepth = rg->getDepth();
}
_gmetalh = DataBase::getDB()->getTechnology()->getLayer("gmetalh"); _gmetalh = DataBase::getDB()->getTechnology()->getLayer("gmetalh");
_gmetalv = DataBase::getDB()->getTechnology()->getLayer("gmetalv"); _gmetalv = DataBase::getDB()->getTechnology()->getLayer("gmetalv");
@ -98,6 +102,7 @@ namespace Katabatic {
, _extensionCap (other._extensionCap) , _extensionCap (other._extensionCap)
, _saturateRatio (other._saturateRatio) , _saturateRatio (other._saturateRatio)
, _globalThreshold (other._globalThreshold) , _globalThreshold (other._globalThreshold)
, _allowedDepth (other._allowedDepth)
{ {
if ( other._rg ) _rg = other._rg->getClone(); if ( other._rg ) _rg = other._rg->getClone();
} }
@ -130,6 +135,10 @@ namespace Katabatic {
{ return _rg->getDepth(); } { return _rg->getDepth(); }
size_t ConfigurationConcrete::getAllowedDepth () const
{ return _allowedDepth; }
size_t ConfigurationConcrete::getLayerDepth ( const Layer* layer ) const size_t ConfigurationConcrete::getLayerDepth ( const Layer* layer ) const
{ return _rg->getLayerDepth(layer); } { return _rg->getLayerDepth(layer); }
@ -162,6 +171,10 @@ namespace Katabatic {
{ return _globalThreshold; } { return _globalThreshold; }
void ConfigurationConcrete::setAllowedDepth ( size_t allowedDepth )
{ _allowedDepth = (allowedDepth > getDepth()) ? getDepth() : allowedDepth; }
void ConfigurationConcrete::setSaturateRatio ( float ratio ) void ConfigurationConcrete::setSaturateRatio ( float ratio )
{ _saturateRatio = ratio; } { _saturateRatio = ratio; }

View File

@ -93,7 +93,7 @@ namespace Katabatic {
, unsigned long& total , unsigned long& total
, unsigned long& globals ) , unsigned long& globals )
{ {
if ( depth+2 >= Session::getRoutingGauge()->getDepth() ) { if ( depth+2 >= Session::getConfiguration()->getAllowedDepth() ) {
cerr << Warning("Katabatic::_desaturate(): %s, no remaining upper layers." cerr << Warning("Katabatic::_desaturate(): %s, no remaining upper layers."
,getString(Session::getRoutingGauge()->getRoutingLayer(depth)->getName()).c_str() ,getString(Session::getRoutingGauge()->getRoutingLayer(depth)->getName()).c_str()
) << endl; ) << endl;

View File

@ -66,6 +66,7 @@ namespace Katabatic {
// Methods. // Methods.
virtual bool isGMetal ( const Layer* ) const = 0; virtual bool isGMetal ( const Layer* ) const = 0;
virtual size_t getDepth () const = 0; virtual size_t getDepth () const = 0;
virtual size_t getAllowedDepth () const = 0;
virtual size_t getLayerDepth ( const Layer* ) const = 0; virtual size_t getLayerDepth ( const Layer* ) const = 0;
virtual RoutingGauge* getRoutingGauge () const = 0; virtual RoutingGauge* getRoutingGauge () const = 0;
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const = 0; virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const = 0;
@ -74,6 +75,7 @@ namespace Katabatic {
virtual DbU::Unit getExtensionCap () const = 0; virtual DbU::Unit getExtensionCap () const = 0;
virtual float getSaturateRatio () const = 0; virtual float getSaturateRatio () const = 0;
virtual DbU::Unit getGlobalThreshold () const = 0; virtual DbU::Unit getGlobalThreshold () const = 0;
virtual void setAllowedDepth ( size_t ) = 0;
virtual void setSaturateRatio ( float ) = 0; virtual void setSaturateRatio ( float ) = 0;
virtual void setGlobalThreshold ( DbU::Unit ) = 0; virtual void setGlobalThreshold ( DbU::Unit ) = 0;
virtual void print ( Cell* ) const = 0; virtual void print ( Cell* ) const = 0;
@ -103,6 +105,7 @@ namespace Katabatic {
// Methods. // Methods.
virtual bool isGMetal ( const Layer* ) const; virtual bool isGMetal ( const Layer* ) const;
virtual size_t getDepth () const; virtual size_t getDepth () const;
virtual size_t getAllowedDepth () const;
virtual size_t getLayerDepth ( const Layer* ) const; virtual size_t getLayerDepth ( const Layer* ) const;
virtual RoutingGauge* getRoutingGauge () const; virtual RoutingGauge* getRoutingGauge () const;
virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const; virtual RoutingLayerGauge* getLayerGauge ( size_t depth ) const;
@ -111,6 +114,7 @@ namespace Katabatic {
virtual DbU::Unit getExtensionCap () const; virtual DbU::Unit getExtensionCap () const;
virtual float getSaturateRatio () const; virtual float getSaturateRatio () const;
virtual DbU::Unit getGlobalThreshold () const; virtual DbU::Unit getGlobalThreshold () const;
virtual void setAllowedDepth ( size_t );
virtual void setSaturateRatio ( float ); virtual void setSaturateRatio ( float );
virtual void setGlobalThreshold ( DbU::Unit ); virtual void setGlobalThreshold ( DbU::Unit );
virtual void print ( Cell* ) const; virtual void print ( Cell* ) const;
@ -128,6 +132,7 @@ namespace Katabatic {
DbU::Unit _extensionCap; DbU::Unit _extensionCap;
float _saturateRatio; float _saturateRatio;
DbU::Unit _globalThreshold; DbU::Unit _globalThreshold;
size_t _allowedDepth;
private: private:
ConfigurationConcrete ( const ConfigurationConcrete& ); ConfigurationConcrete ( const ConfigurationConcrete& );
ConfigurationConcrete& operator= ( const ConfigurationConcrete& ); ConfigurationConcrete& operator= ( const ConfigurationConcrete& );