* ./katabatic:
- Change: In LayerAssign, desaturate until the last two top layers are reacheds instead of only METAL2 & METAL3. - Change: In Configuration/GCellGrid/GCell, correct computation of the edges capacity (based on the numbers of avalaibles layers and not hard-wired to 4).
This commit is contained in:
parent
a0dce4eceb
commit
1d525fec35
|
@ -25,12 +25,14 @@
|
|||
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <vector>
|
||||
|
||||
#include "vlsisapd/configuration/Configuration.h"
|
||||
#include "hurricane/Technology.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/Cell.h"
|
||||
#include "crlcore/Utilities.h"
|
||||
#include "crlcore/RoutingLayerGauge.h"
|
||||
#include "crlcore/AllianceFramework.h"
|
||||
#include "katabatic/Configuration.h"
|
||||
|
||||
|
@ -44,11 +46,14 @@ namespace Katabatic {
|
|||
using std::endl;
|
||||
using std::setprecision;
|
||||
using std::ostringstream;
|
||||
using std::vector;
|
||||
using Hurricane::tab;
|
||||
using Hurricane::inltrace;
|
||||
using Hurricane::Technology;
|
||||
using Hurricane::DataBase;
|
||||
using CRL::AllianceFramework;
|
||||
using CRL::RoutingGauge;
|
||||
using CRL::RoutingLayerGauge;
|
||||
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
@ -71,6 +76,8 @@ namespace Katabatic {
|
|||
, _saturateRp (Cfg::getParamInt ("katabatic.saturateRp" ,8 )->asInt())
|
||||
, _globalThreshold (DbU::lambda((double)Cfg::getParamInt("katabatic.globalLengthThreshold",29*50)->asInt())) // Ugly: direct uses of SxLib gauge.
|
||||
, _allowedDepth (0)
|
||||
, _hEdgeCapacity (0)
|
||||
, _vEdgeCapacity (0)
|
||||
{
|
||||
if ( rg == NULL ) rg = AllianceFramework::get()->getRoutingGauge();
|
||||
|
||||
|
@ -80,6 +87,18 @@ namespace Katabatic {
|
|||
_gmetalh = DataBase::getDB()->getTechnology()->getLayer("gmetalh");
|
||||
_gmetalv = DataBase::getDB()->getTechnology()->getLayer("gmetalv");
|
||||
_gcontact = DataBase::getDB()->getTechnology()->getLayer("gcontact");
|
||||
|
||||
vector<RoutingLayerGauge*>::const_iterator ilayerGauge = rg->getLayerGauges().begin();
|
||||
for ( ; ilayerGauge != rg->getLayerGauges().end() ; ++ilayerGauge ) {
|
||||
RoutingLayerGauge* layerGauge = (*ilayerGauge);
|
||||
if ( layerGauge->getType() != Constant::Default ) continue;
|
||||
|
||||
if ( layerGauge->getDirection() == Constant::Horizontal ) {
|
||||
_hEdgeCapacity += layerGauge->getTrackNumber ( 0, DbU::lambda(50.0) ) - 1;
|
||||
} else if ( layerGauge->getDirection() == Constant::Vertical ) {
|
||||
_vEdgeCapacity += layerGauge->getTrackNumber ( 0, DbU::lambda(50.0) ) - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -165,6 +184,14 @@ namespace Katabatic {
|
|||
{ return _globalThreshold; }
|
||||
|
||||
|
||||
size_t ConfigurationConcrete::getHEdgeCapacity () const
|
||||
{ return _hEdgeCapacity; }
|
||||
|
||||
|
||||
size_t ConfigurationConcrete::getVEdgeCapacity () const
|
||||
{ return _vEdgeCapacity; }
|
||||
|
||||
|
||||
void ConfigurationConcrete::setAllowedDepth ( size_t allowedDepth )
|
||||
{ _allowedDepth = (allowedDepth > getDepth()) ? getDepth() : allowedDepth; }
|
||||
|
||||
|
|
|
@ -912,7 +912,8 @@ namespace Katabatic {
|
|||
edgeUpUsage++;
|
||||
}
|
||||
}
|
||||
edgeUpSaturation = (float)edgeUpUsage/((float)getVCapacity()*2.0);
|
||||
//edgeUpSaturation = (float)edgeUpUsage/((float)getVCapacity()*2.0);
|
||||
edgeUpSaturation = (float)edgeUpUsage/getGCellGrid()->getVEdgeCapacity();
|
||||
}
|
||||
|
||||
if ( getRight() ) {
|
||||
|
@ -931,7 +932,8 @@ namespace Katabatic {
|
|||
edgeRightUsage++;
|
||||
}
|
||||
}
|
||||
edgeRightSaturation = (float)edgeRightUsage/((float)getHCapacity()*2.0);
|
||||
//edgeRightSaturation = (float)edgeRightUsage/((float)getHCapacity()*2.0);
|
||||
edgeRightSaturation = (float)edgeRightUsage/getGCellGrid()->getHEdgeCapacity();
|
||||
}
|
||||
|
||||
bool overload = false;
|
||||
|
@ -943,11 +945,11 @@ namespace Katabatic {
|
|||
ostringstream message;
|
||||
message << setprecision(3);
|
||||
if ( edgeUpSaturation > threshold )
|
||||
message << "up edge: " << edgeUpUsage << "/" << (getVCapacity()*2.0)
|
||||
message << "up edge: " << edgeUpUsage << "/" << getGCellGrid()->getVEdgeCapacity()
|
||||
<< " " << edgeUpSaturation;
|
||||
if ( edgeRightSaturation > threshold ) {
|
||||
if ( message.str().size() ) message << " & ";
|
||||
message << "right edge: " << edgeRightUsage << "/" << (getVCapacity()*2.0)
|
||||
message << "right edge: " << edgeRightUsage << "/" << getGCellGrid()->getHEdgeCapacity()
|
||||
<< " " << edgeRightSaturation;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,8 +54,10 @@ namespace Katabatic {
|
|||
|
||||
|
||||
GCellGrid::GCellGrid ( KatabaticEngine* ktbt )
|
||||
: Grid<GCell>(ktbt->getCell()->getAbutmentBox())
|
||||
, _katabatic(ktbt)
|
||||
: Grid<GCell> (ktbt->getCell()->getAbutmentBox())
|
||||
, _katabatic (ktbt)
|
||||
, _hEdgeCapacity(ktbt->getConfiguration()->getHEdgeCapacity())
|
||||
, _vEdgeCapacity(ktbt->getConfiguration()->getVEdgeCapacity())
|
||||
{ }
|
||||
|
||||
|
||||
|
|
|
@ -277,14 +277,24 @@ namespace Katabatic {
|
|||
|
||||
Session::revalidate ();
|
||||
|
||||
for ( int i=0 ; i < 3 ; i++ ) {
|
||||
_desaturate ( 1, globalNets, total, global );
|
||||
_desaturate ( 2, globalNets, total, global );
|
||||
// Look for RoutingPad overload.
|
||||
vector<GCell*> gcells = *(_gcellGrid->getGCellVector());
|
||||
for ( size_t i=0 ; i<gcells.size() ; ++i ) {
|
||||
gcells[i]->rpDesaturate ( globalNets );
|
||||
}
|
||||
|
||||
globalNets.clear ();
|
||||
if ( getConfiguration()->getAllowedDepth() > 2) {
|
||||
for ( int i=0 ; i < 3 ; i++ ) {
|
||||
for ( size_t depth=1 ; depth < getConfiguration()->getAllowedDepth()-2; ++depth ) {
|
||||
_desaturate ( depth, globalNets, total, global );
|
||||
if ( (depth > 1) and ((depth-1)%2 == 1) ) Session::revalidate ();
|
||||
}
|
||||
|
||||
globalNets.clear ();
|
||||
|
||||
if ( not _gcellGrid->updateDensity () ) break;
|
||||
}
|
||||
Session::revalidate ();
|
||||
if ( !_gcellGrid->updateDensity () ) break;
|
||||
}
|
||||
//refresh ( false );
|
||||
|
||||
|
@ -297,20 +307,6 @@ namespace Katabatic {
|
|||
_print ( *inet );
|
||||
#endif
|
||||
|
||||
// Look for RoutingPad overload.
|
||||
vector<GCell*> gcells = *(_gcellGrid->getGCellVector());
|
||||
for ( size_t i=0 ; i<gcells.size() ; ++i ) {
|
||||
gcells[i]->rpDesaturate ( globalNets );
|
||||
// set<RoutingPad*> rps;
|
||||
// gcells[i]->getRoutingPads ( rps );
|
||||
|
||||
// if ( rps.size() > 7 ) {
|
||||
// cerr << "[WARNING] " << gcells[i] << "has " << rps.size() << " terminals." << endl;
|
||||
// }
|
||||
}
|
||||
|
||||
Session::revalidate ();
|
||||
|
||||
Session::setWarnGCellOverload ( true );
|
||||
_gcellGrid->checkDensity ();
|
||||
|
||||
|
|
|
@ -74,6 +74,8 @@ namespace Katabatic {
|
|||
virtual float getSaturateRatio () const = 0;
|
||||
virtual size_t getSaturateRp () const = 0;
|
||||
virtual DbU::Unit getGlobalThreshold () const = 0;
|
||||
virtual size_t getHEdgeCapacity () const = 0;
|
||||
virtual size_t getVEdgeCapacity () const = 0;
|
||||
virtual void setAllowedDepth ( size_t ) = 0;
|
||||
virtual void setSaturateRatio ( float ) = 0;
|
||||
virtual void setSaturateRp ( size_t ) = 0;
|
||||
|
@ -116,6 +118,8 @@ namespace Katabatic {
|
|||
virtual float getSaturateRatio () const;
|
||||
virtual size_t getSaturateRp () const;
|
||||
virtual DbU::Unit getGlobalThreshold () const;
|
||||
virtual size_t getHEdgeCapacity () const;
|
||||
virtual size_t getVEdgeCapacity () const;
|
||||
virtual void setAllowedDepth ( size_t );
|
||||
virtual void setSaturateRatio ( float );
|
||||
virtual void setSaturateRp ( size_t );
|
||||
|
@ -135,6 +139,8 @@ namespace Katabatic {
|
|||
size_t _saturateRp;
|
||||
DbU::Unit _globalThreshold;
|
||||
size_t _allowedDepth;
|
||||
size_t _hEdgeCapacity;
|
||||
size_t _vEdgeCapacity;
|
||||
private:
|
||||
ConfigurationConcrete ( const ConfigurationConcrete& );
|
||||
ConfigurationConcrete& operator= ( const ConfigurationConcrete& );
|
||||
|
|
|
@ -50,20 +50,25 @@ namespace Katabatic {
|
|||
class GCellGrid : public Grid<GCell> {
|
||||
|
||||
public:
|
||||
Cell* getCell () const;
|
||||
Interval getUSide ( unsigned int ) const;
|
||||
void updateContacts ( bool openSession=true );
|
||||
size_t checkDensity () const;
|
||||
size_t updateDensity ();
|
||||
bool checkEdgeSaturation ( float threshold ) const;
|
||||
void _xmlWrite ( ostream& );
|
||||
virtual Record* _getRecord () const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
Cell* getCell () const;
|
||||
inline KatabaticEngine* getKatabatic () const;
|
||||
inline size_t getHEdgeCapacity () const;
|
||||
inline size_t getVEdgeCapacity () const;
|
||||
Interval getUSide ( unsigned int ) const;
|
||||
void updateContacts ( bool openSession=true );
|
||||
size_t checkDensity () const;
|
||||
size_t updateDensity ();
|
||||
bool checkEdgeSaturation ( float threshold ) const;
|
||||
void _xmlWrite ( ostream& );
|
||||
virtual Record* _getRecord () const;
|
||||
virtual string _getString () const;
|
||||
virtual string _getTypeName () const;
|
||||
|
||||
// Attributes.
|
||||
protected:
|
||||
KatabaticEngine* _katabatic;
|
||||
size_t _hEdgeCapacity;
|
||||
size_t _vEdgeCapacity;
|
||||
|
||||
// Constructors & Destructors.
|
||||
protected:
|
||||
|
@ -81,6 +86,11 @@ namespace Katabatic {
|
|||
};
|
||||
|
||||
|
||||
inline KatabaticEngine* GCellGrid::getKatabatic () const { return _katabatic; }
|
||||
inline size_t GCellGrid::getHEdgeCapacity () const { return _hEdgeCapacity; }
|
||||
inline size_t GCellGrid::getVEdgeCapacity () const { return _vEdgeCapacity; }
|
||||
|
||||
|
||||
} // End of Katabatic namespace.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue