In Anabatic, Do not take into account diodes when making nets size histogram.
This commit is contained in:
parent
1a918c69b1
commit
a2665b6e3a
|
@ -20,6 +20,7 @@
|
||||||
#include "hurricane/Error.h"
|
#include "hurricane/Error.h"
|
||||||
#include "hurricane/Warning.h"
|
#include "hurricane/Warning.h"
|
||||||
#include "hurricane/Breakpoint.h"
|
#include "hurricane/Breakpoint.h"
|
||||||
|
#include "hurricane/DataBase.h"
|
||||||
#include "hurricane/RegularLayer.h"
|
#include "hurricane/RegularLayer.h"
|
||||||
#include "hurricane/Horizontal.h"
|
#include "hurricane/Horizontal.h"
|
||||||
#include "hurricane/RoutingPad.h"
|
#include "hurricane/RoutingPad.h"
|
||||||
|
@ -135,6 +136,7 @@ namespace Anabatic {
|
||||||
using Hurricane::Error;
|
using Hurricane::Error;
|
||||||
using Hurricane::Warning;
|
using Hurricane::Warning;
|
||||||
using Hurricane::Breakpoint;
|
using Hurricane::Breakpoint;
|
||||||
|
using Hurricane::DataBase;
|
||||||
using Hurricane::RegularLayer;
|
using Hurricane::RegularLayer;
|
||||||
using Hurricane::Component;
|
using Hurricane::Component;
|
||||||
using Hurricane::Horizontal;
|
using Hurricane::Horizontal;
|
||||||
|
@ -282,19 +284,27 @@ namespace Anabatic {
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Class : "Anabatic::NetData".
|
// Class : "Anabatic::NetData".
|
||||||
|
|
||||||
NetData::NetData ( Net* net )
|
NetData::NetData ( Net* net, AnabaticEngine* anabatic )
|
||||||
: _net (net)
|
: _net (net)
|
||||||
, _state (NetRoutingExtension::get(net))
|
, _state (NetRoutingExtension::get(net))
|
||||||
, _searchArea()
|
, _searchArea()
|
||||||
, _rpCount (0)
|
, _rpCount (0)
|
||||||
|
, _diodeCount(0)
|
||||||
, _sparsity (0)
|
, _sparsity (0)
|
||||||
, _flags ()
|
, _flags ()
|
||||||
{
|
{
|
||||||
if (_state and _state->isMixedPreRoute()) return;
|
if (_state and _state->isMixedPreRoute()) return;
|
||||||
|
|
||||||
|
Cell* diodeCell = anabatic->getDiodeCell();
|
||||||
for ( RoutingPad* rp : _net->getRoutingPads() ) {
|
for ( RoutingPad* rp : _net->getRoutingPads() ) {
|
||||||
_searchArea.merge( rp->getBoundingBox() );
|
_searchArea.merge( rp->getBoundingBox() );
|
||||||
++_rpCount;
|
++_rpCount;
|
||||||
|
|
||||||
|
if (diodeCell) {
|
||||||
|
Plug* plug = dynamic_cast<Plug*>( rp->getPlugOccurrence().getEntity() );
|
||||||
|
if (plug and (plug->getInstance()->getMasterCell() == diodeCell))
|
||||||
|
++_diodeCount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
_update();
|
_update();
|
||||||
}
|
}
|
||||||
|
@ -336,6 +346,7 @@ namespace Anabatic {
|
||||||
, _autoContactLut ()
|
, _autoContactLut ()
|
||||||
, _edgeCapacitiesLut()
|
, _edgeCapacitiesLut()
|
||||||
, _blockageNet (cell->getNet("blockagenet"))
|
, _blockageNet (cell->getNet("blockagenet"))
|
||||||
|
, _diodeCell (NULL)
|
||||||
{
|
{
|
||||||
_matrix.setCell( cell, _configuration->getSliceHeight() );
|
_matrix.setCell( cell, _configuration->getSliceHeight() );
|
||||||
Edge::unity = _configuration->getSliceHeight();
|
Edge::unity = _configuration->getSliceHeight();
|
||||||
|
@ -351,6 +362,13 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
Super::_postCreate();
|
Super::_postCreate();
|
||||||
|
|
||||||
|
_diodeCell = DataBase::getDB()->getCell( getConfiguration()->getDiodeName() );;
|
||||||
|
if (not _diodeCell) {
|
||||||
|
cerr << Warning( "AnabaticEngine::_postCreate() Unable to find \"%s\" diode cell."
|
||||||
|
, getConfiguration()->getDiodeName().c_str()
|
||||||
|
) << endl;
|
||||||
|
}
|
||||||
|
|
||||||
UpdateSession::open();
|
UpdateSession::open();
|
||||||
GCell::create( this );
|
GCell::create( this );
|
||||||
UpdateSession::close();
|
UpdateSession::close();
|
||||||
|
@ -644,10 +662,10 @@ namespace Anabatic {
|
||||||
size_t oindex = _netOrdering.size();
|
size_t oindex = _netOrdering.size();
|
||||||
for ( Net* net : _cell->getNets() ) {
|
for ( Net* net : _cell->getNets() ) {
|
||||||
if (_netDatas.find(net->getId()) != _netDatas.end()) continue;
|
if (_netDatas.find(net->getId()) != _netDatas.end()) continue;
|
||||||
NetData* data = new NetData( net );
|
NetData* data = new NetData( net, this );
|
||||||
_netOrdering.push_back( data );
|
_netOrdering.push_back( data );
|
||||||
|
|
||||||
netHistogram.addSample( (float)data->getRpCount(), 0 );
|
netHistogram.addSample( (float)(data->getRpCount() - data->getDiodeRpCount()), 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( ; oindex < _netOrdering.size() ; ++oindex ) {
|
for ( ; oindex < _netOrdering.size() ; ++oindex ) {
|
||||||
|
@ -725,7 +743,7 @@ namespace Anabatic {
|
||||||
NetData* data = NULL;
|
NetData* data = NULL;
|
||||||
NetDatas::iterator idata = _netDatas.find( net->getId() );
|
NetDatas::iterator idata = _netDatas.find( net->getId() );
|
||||||
if (idata == _netDatas.end()) {
|
if (idata == _netDatas.end()) {
|
||||||
data = new NetData( net );
|
data = new NetData( net, this );
|
||||||
_netDatas.insert( make_pair(net->getId(),data) );
|
_netDatas.insert( make_pair(net->getId(),data) );
|
||||||
_netOrdering.push_back( data );
|
_netOrdering.push_back( data );
|
||||||
// cerr << Bug( "AnabaticEngine::getNetData() - %s is missing in NetDatas table."
|
// cerr << Bug( "AnabaticEngine::getNetData() - %s is missing in NetDatas table."
|
||||||
|
|
|
@ -85,12 +85,13 @@ namespace Anabatic {
|
||||||
, _allowedDepth (0)
|
, _allowedDepth (0)
|
||||||
, _edgeLength (DbU::fromLambda(Cfg::getParamInt("anabatic.edgeLength",24)->asInt()))
|
, _edgeLength (DbU::fromLambda(Cfg::getParamInt("anabatic.edgeLength",24)->asInt()))
|
||||||
, _edgeWidth (DbU::fromLambda(Cfg::getParamInt("anabatic.edgeWidth" , 4)->asInt()))
|
, _edgeWidth (DbU::fromLambda(Cfg::getParamInt("anabatic.edgeWidth" , 4)->asInt()))
|
||||||
, _edgeCostH (Cfg::getParamDouble("anabatic.edgeCostH" , 9.0)->asDouble())
|
, _edgeCostH (Cfg::getParamDouble("anabatic.edgeCostH" , 9.0)->asDouble())
|
||||||
, _edgeCostK (Cfg::getParamDouble("anabatic.edgeCostK" ,-10.0)->asDouble())
|
, _edgeCostK (Cfg::getParamDouble("anabatic.edgeCostK" , -10.0)->asDouble())
|
||||||
, _edgeHInc (Cfg::getParamDouble("anabatic.edgeHInc" , 1.5)->asDouble())
|
, _edgeHInc (Cfg::getParamDouble("anabatic.edgeHInc" , 1.5)->asDouble())
|
||||||
, _edgeHScaling (Cfg::getParamDouble("anabatic.edgeHScaling" , 1.0)->asDouble())
|
, _edgeHScaling (Cfg::getParamDouble("anabatic.edgeHScaling" , 1.0)->asDouble())
|
||||||
, _globalIterations(Cfg::getParamInt ("anabatic.globalIterations", 10 )->asInt())
|
, _globalIterations(Cfg::getParamInt ("anabatic.globalIterations", 10 )->asInt())
|
||||||
, _antennaMaxWL (Cfg::getParamInt ("etesian.antennaMaxWL" , 0 )->asInt())
|
, _diodeName (Cfg::getParamString("etesian.diodeName" , "dio_x0")->asString() )
|
||||||
|
, _antennaMaxWL (Cfg::getParamInt ("etesian.antennaMaxWL" , 0 )->asInt())
|
||||||
{
|
{
|
||||||
GCell::setDisplayMode( Cfg::getParamEnumerate("anabatic.gcell.displayMode", GCell::Boundary)->asInt() );
|
GCell::setDisplayMode( Cfg::getParamEnumerate("anabatic.gcell.displayMode", GCell::Boundary)->asInt() );
|
||||||
|
|
||||||
|
@ -181,6 +182,7 @@ namespace Anabatic {
|
||||||
, _edgeHInc (other._edgeHInc)
|
, _edgeHInc (other._edgeHInc)
|
||||||
, _edgeHScaling (other._edgeHScaling)
|
, _edgeHScaling (other._edgeHScaling)
|
||||||
, _globalIterations(other._globalIterations)
|
, _globalIterations(other._globalIterations)
|
||||||
|
, _diodeName (other._diodeName)
|
||||||
, _antennaMaxWL (other._antennaMaxWL)
|
, _antennaMaxWL (other._antennaMaxWL)
|
||||||
{
|
{
|
||||||
GCell::setDisplayMode( Cfg::getParamEnumerate("anabatic.gcell.displayMode", GCell::Boundary)->asInt() );
|
GCell::setDisplayMode( Cfg::getParamEnumerate("anabatic.gcell.displayMode", GCell::Boundary)->asInt() );
|
||||||
|
|
|
@ -100,7 +100,7 @@ namespace Anabatic {
|
||||||
|
|
||||||
class NetData {
|
class NetData {
|
||||||
public:
|
public:
|
||||||
NetData ( Net* );
|
NetData ( Net*, AnabaticEngine* );
|
||||||
inline bool isGlobalEstimated () const;
|
inline bool isGlobalEstimated () const;
|
||||||
inline bool isGlobalRouted () const;
|
inline bool isGlobalRouted () const;
|
||||||
inline bool isGlobalFixed () const;
|
inline bool isGlobalFixed () const;
|
||||||
|
@ -112,6 +112,7 @@ namespace Anabatic {
|
||||||
inline const Box& getSearchArea () const;
|
inline const Box& getSearchArea () const;
|
||||||
inline DbU::Unit getHalfPerimeter () const;
|
inline DbU::Unit getHalfPerimeter () const;
|
||||||
inline size_t getRpCount () const;
|
inline size_t getRpCount () const;
|
||||||
|
inline size_t getDiodeRpCount () const;
|
||||||
inline DbU::Unit getSparsity () const;
|
inline DbU::Unit getSparsity () const;
|
||||||
inline void setNetRoutingState ( NetRoutingState* );
|
inline void setNetRoutingState ( NetRoutingState* );
|
||||||
inline void setSearchArea ( Box );
|
inline void setSearchArea ( Box );
|
||||||
|
@ -129,6 +130,7 @@ namespace Anabatic {
|
||||||
NetRoutingState* _state;
|
NetRoutingState* _state;
|
||||||
Box _searchArea;
|
Box _searchArea;
|
||||||
size_t _rpCount;
|
size_t _rpCount;
|
||||||
|
size_t _diodeCount;
|
||||||
DbU::Unit _sparsity;
|
DbU::Unit _sparsity;
|
||||||
Flags _flags;
|
Flags _flags;
|
||||||
};
|
};
|
||||||
|
@ -145,6 +147,7 @@ namespace Anabatic {
|
||||||
inline const Box& NetData::getSearchArea () const { return _searchArea; }
|
inline const Box& NetData::getSearchArea () const { return _searchArea; }
|
||||||
inline DbU::Unit NetData::getHalfPerimeter () const { return (_searchArea.isEmpty()) ? 0.0 : (_searchArea.getWidth()+_searchArea.getHeight()); }
|
inline DbU::Unit NetData::getHalfPerimeter () const { return (_searchArea.isEmpty()) ? 0.0 : (_searchArea.getWidth()+_searchArea.getHeight()); }
|
||||||
inline size_t NetData::getRpCount () const { return _rpCount; }
|
inline size_t NetData::getRpCount () const { return _rpCount; }
|
||||||
|
inline size_t NetData::getDiodeRpCount () const { return _diodeCount; }
|
||||||
inline void NetData::setNetRoutingState ( NetRoutingState* state ) { _state=state; }
|
inline void NetData::setNetRoutingState ( NetRoutingState* state ) { _state=state; }
|
||||||
inline DbU::Unit NetData::getSparsity () const { return _sparsity; }
|
inline DbU::Unit NetData::getSparsity () const { return _sparsity; }
|
||||||
inline void NetData::setGlobalEstimated ( bool state ) { _flags.set(Flags::GlobalEstimated,state); }
|
inline void NetData::setGlobalEstimated ( bool state ) { _flags.set(Flags::GlobalEstimated,state); }
|
||||||
|
@ -250,6 +253,7 @@ namespace Anabatic {
|
||||||
inline float getSaturateRatio () const;
|
inline float getSaturateRatio () const;
|
||||||
inline size_t getSaturateRp () const;
|
inline size_t getSaturateRp () const;
|
||||||
inline DbU::Unit getExtensionCap () const;
|
inline DbU::Unit getExtensionCap () const;
|
||||||
|
inline Cell* getDiodeCell () const;
|
||||||
inline Net* getBlockageNet () const;
|
inline Net* getBlockageNet () const;
|
||||||
inline const ChipTools& getChipTools () const;
|
inline const ChipTools& getChipTools () const;
|
||||||
inline const vector<NetData*>& getNetOrdering () const;
|
inline const vector<NetData*>& getNetOrdering () const;
|
||||||
|
@ -342,6 +346,7 @@ namespace Anabatic {
|
||||||
AutoContactLut _autoContactLut;
|
AutoContactLut _autoContactLut;
|
||||||
EdgeCapacityLut _edgeCapacitiesLut;
|
EdgeCapacityLut _edgeCapacitiesLut;
|
||||||
Net* _blockageNet;
|
Net* _blockageNet;
|
||||||
|
Cell* _diodeCell;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -377,6 +382,7 @@ namespace Anabatic {
|
||||||
inline size_t AnabaticEngine::getSaturateRp () const { return _configuration->getSaturateRp(); }
|
inline size_t AnabaticEngine::getSaturateRp () const { return _configuration->getSaturateRp(); }
|
||||||
inline void AnabaticEngine::setSaturateRatio ( float ratio ) { _configuration->setSaturateRatio(ratio); }
|
inline void AnabaticEngine::setSaturateRatio ( float ratio ) { _configuration->setSaturateRatio(ratio); }
|
||||||
inline void AnabaticEngine::setSaturateRp ( size_t threshold ) { _configuration->setSaturateRp(threshold); }
|
inline void AnabaticEngine::setSaturateRp ( size_t threshold ) { _configuration->setSaturateRp(threshold); }
|
||||||
|
inline Cell* AnabaticEngine::getDiodeCell () const { return _diodeCell; }
|
||||||
inline Net* AnabaticEngine::getBlockageNet () const { return _blockageNet; }
|
inline Net* AnabaticEngine::getBlockageNet () const { return _blockageNet; }
|
||||||
inline const ChipTools& AnabaticEngine::getChipTools () const { return _chipTools; }
|
inline const ChipTools& AnabaticEngine::getChipTools () const { return _chipTools; }
|
||||||
inline const vector<NetData*>& AnabaticEngine::getNetOrdering () const { return _netOrdering; }
|
inline const vector<NetData*>& AnabaticEngine::getNetOrdering () const { return _netOrdering; }
|
||||||
|
|
|
@ -115,6 +115,7 @@ namespace Anabatic {
|
||||||
Flags getDirection ( const Layer* ) const;
|
Flags getDirection ( const Layer* ) const;
|
||||||
float getSaturateRatio () const;
|
float getSaturateRatio () const;
|
||||||
size_t getSaturateRp () const;
|
size_t getSaturateRp () const;
|
||||||
|
inline std::string getDiodeName () const;
|
||||||
inline DbU::Unit getAntennaMaxWL () const;
|
inline DbU::Unit getAntennaMaxWL () const;
|
||||||
DbU::Unit getGlobalThreshold () const;
|
DbU::Unit getGlobalThreshold () const;
|
||||||
void setAllowedDepth ( size_t );
|
void setAllowedDepth ( size_t );
|
||||||
|
@ -158,6 +159,7 @@ namespace Anabatic {
|
||||||
float _edgeHInc;
|
float _edgeHInc;
|
||||||
float _edgeHScaling;
|
float _edgeHScaling;
|
||||||
int _globalIterations;
|
int _globalIterations;
|
||||||
|
std::string _diodeName;
|
||||||
DbU::Unit _antennaMaxWL;
|
DbU::Unit _antennaMaxWL;
|
||||||
private:
|
private:
|
||||||
Configuration& operator= ( const Configuration& ) = delete;
|
Configuration& operator= ( const Configuration& ) = delete;
|
||||||
|
@ -186,6 +188,7 @@ namespace Anabatic {
|
||||||
inline const Layer* Configuration::getDContactLayer () const { return getContactLayer( getDContactDepth() ); }
|
inline const Layer* Configuration::getDContactLayer () const { return getContactLayer( getDContactDepth() ); }
|
||||||
inline DbU::Unit Configuration::getDContactWidth () const { return getWireWidth ( getDContactDepth() ); }
|
inline DbU::Unit Configuration::getDContactWidth () const { return getWireWidth ( getDContactDepth() ); }
|
||||||
inline DbU::Unit Configuration::getDContactPitch () const { return getPitch ( getDContactDepth(), Flags::NoFlags ); }
|
inline DbU::Unit Configuration::getDContactPitch () const { return getPitch ( getDContactDepth(), Flags::NoFlags ); }
|
||||||
|
inline std::string Configuration::getDiodeName () const { return _diodeName; }
|
||||||
inline DbU::Unit Configuration::getAntennaMaxWL () const { return _antennaMaxWL; }
|
inline DbU::Unit Configuration::getAntennaMaxWL () const { return _antennaMaxWL; }
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue