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/Warning.h"
|
||||
#include "hurricane/Breakpoint.h"
|
||||
#include "hurricane/DataBase.h"
|
||||
#include "hurricane/RegularLayer.h"
|
||||
#include "hurricane/Horizontal.h"
|
||||
#include "hurricane/RoutingPad.h"
|
||||
|
@ -135,6 +136,7 @@ namespace Anabatic {
|
|||
using Hurricane::Error;
|
||||
using Hurricane::Warning;
|
||||
using Hurricane::Breakpoint;
|
||||
using Hurricane::DataBase;
|
||||
using Hurricane::RegularLayer;
|
||||
using Hurricane::Component;
|
||||
using Hurricane::Horizontal;
|
||||
|
@ -282,19 +284,27 @@ namespace Anabatic {
|
|||
// -------------------------------------------------------------------
|
||||
// Class : "Anabatic::NetData".
|
||||
|
||||
NetData::NetData ( Net* net )
|
||||
NetData::NetData ( Net* net, AnabaticEngine* anabatic )
|
||||
: _net (net)
|
||||
, _state (NetRoutingExtension::get(net))
|
||||
, _searchArea()
|
||||
, _rpCount (0)
|
||||
, _diodeCount(0)
|
||||
, _sparsity (0)
|
||||
, _flags ()
|
||||
{
|
||||
if (_state and _state->isMixedPreRoute()) return;
|
||||
|
||||
Cell* diodeCell = anabatic->getDiodeCell();
|
||||
for ( RoutingPad* rp : _net->getRoutingPads() ) {
|
||||
_searchArea.merge( rp->getBoundingBox() );
|
||||
++_rpCount;
|
||||
|
||||
if (diodeCell) {
|
||||
Plug* plug = dynamic_cast<Plug*>( rp->getPlugOccurrence().getEntity() );
|
||||
if (plug and (plug->getInstance()->getMasterCell() == diodeCell))
|
||||
++_diodeCount;
|
||||
}
|
||||
}
|
||||
_update();
|
||||
}
|
||||
|
@ -336,6 +346,7 @@ namespace Anabatic {
|
|||
, _autoContactLut ()
|
||||
, _edgeCapacitiesLut()
|
||||
, _blockageNet (cell->getNet("blockagenet"))
|
||||
, _diodeCell (NULL)
|
||||
{
|
||||
_matrix.setCell( cell, _configuration->getSliceHeight() );
|
||||
Edge::unity = _configuration->getSliceHeight();
|
||||
|
@ -351,6 +362,13 @@ namespace Anabatic {
|
|||
{
|
||||
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();
|
||||
GCell::create( this );
|
||||
UpdateSession::close();
|
||||
|
@ -644,10 +662,10 @@ namespace Anabatic {
|
|||
size_t oindex = _netOrdering.size();
|
||||
for ( Net* net : _cell->getNets() ) {
|
||||
if (_netDatas.find(net->getId()) != _netDatas.end()) continue;
|
||||
NetData* data = new NetData( net );
|
||||
NetData* data = new NetData( net, this );
|
||||
_netOrdering.push_back( data );
|
||||
|
||||
netHistogram.addSample( (float)data->getRpCount(), 0 );
|
||||
netHistogram.addSample( (float)(data->getRpCount() - data->getDiodeRpCount()), 0 );
|
||||
}
|
||||
|
||||
for ( ; oindex < _netOrdering.size() ; ++oindex ) {
|
||||
|
@ -725,7 +743,7 @@ namespace Anabatic {
|
|||
NetData* data = NULL;
|
||||
NetDatas::iterator idata = _netDatas.find( net->getId() );
|
||||
if (idata == _netDatas.end()) {
|
||||
data = new NetData( net );
|
||||
data = new NetData( net, this );
|
||||
_netDatas.insert( make_pair(net->getId(),data) );
|
||||
_netOrdering.push_back( data );
|
||||
// cerr << Bug( "AnabaticEngine::getNetData() - %s is missing in NetDatas table."
|
||||
|
|
|
@ -90,6 +90,7 @@ namespace Anabatic {
|
|||
, _edgeHInc (Cfg::getParamDouble("anabatic.edgeHInc" , 1.5)->asDouble())
|
||||
, _edgeHScaling (Cfg::getParamDouble("anabatic.edgeHScaling" , 1.0)->asDouble())
|
||||
, _globalIterations(Cfg::getParamInt ("anabatic.globalIterations", 10 )->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() );
|
||||
|
@ -181,6 +182,7 @@ namespace Anabatic {
|
|||
, _edgeHInc (other._edgeHInc)
|
||||
, _edgeHScaling (other._edgeHScaling)
|
||||
, _globalIterations(other._globalIterations)
|
||||
, _diodeName (other._diodeName)
|
||||
, _antennaMaxWL (other._antennaMaxWL)
|
||||
{
|
||||
GCell::setDisplayMode( Cfg::getParamEnumerate("anabatic.gcell.displayMode", GCell::Boundary)->asInt() );
|
||||
|
|
|
@ -100,7 +100,7 @@ namespace Anabatic {
|
|||
|
||||
class NetData {
|
||||
public:
|
||||
NetData ( Net* );
|
||||
NetData ( Net*, AnabaticEngine* );
|
||||
inline bool isGlobalEstimated () const;
|
||||
inline bool isGlobalRouted () const;
|
||||
inline bool isGlobalFixed () const;
|
||||
|
@ -112,6 +112,7 @@ namespace Anabatic {
|
|||
inline const Box& getSearchArea () const;
|
||||
inline DbU::Unit getHalfPerimeter () const;
|
||||
inline size_t getRpCount () const;
|
||||
inline size_t getDiodeRpCount () const;
|
||||
inline DbU::Unit getSparsity () const;
|
||||
inline void setNetRoutingState ( NetRoutingState* );
|
||||
inline void setSearchArea ( Box );
|
||||
|
@ -129,6 +130,7 @@ namespace Anabatic {
|
|||
NetRoutingState* _state;
|
||||
Box _searchArea;
|
||||
size_t _rpCount;
|
||||
size_t _diodeCount;
|
||||
DbU::Unit _sparsity;
|
||||
Flags _flags;
|
||||
};
|
||||
|
@ -145,6 +147,7 @@ namespace Anabatic {
|
|||
inline const Box& NetData::getSearchArea () const { return _searchArea; }
|
||||
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::getDiodeRpCount () const { return _diodeCount; }
|
||||
inline void NetData::setNetRoutingState ( NetRoutingState* state ) { _state=state; }
|
||||
inline DbU::Unit NetData::getSparsity () const { return _sparsity; }
|
||||
inline void NetData::setGlobalEstimated ( bool state ) { _flags.set(Flags::GlobalEstimated,state); }
|
||||
|
@ -250,6 +253,7 @@ namespace Anabatic {
|
|||
inline float getSaturateRatio () const;
|
||||
inline size_t getSaturateRp () const;
|
||||
inline DbU::Unit getExtensionCap () const;
|
||||
inline Cell* getDiodeCell () const;
|
||||
inline Net* getBlockageNet () const;
|
||||
inline const ChipTools& getChipTools () const;
|
||||
inline const vector<NetData*>& getNetOrdering () const;
|
||||
|
@ -342,6 +346,7 @@ namespace Anabatic {
|
|||
AutoContactLut _autoContactLut;
|
||||
EdgeCapacityLut _edgeCapacitiesLut;
|
||||
Net* _blockageNet;
|
||||
Cell* _diodeCell;
|
||||
};
|
||||
|
||||
|
||||
|
@ -377,6 +382,7 @@ namespace Anabatic {
|
|||
inline size_t AnabaticEngine::getSaturateRp () const { return _configuration->getSaturateRp(); }
|
||||
inline void AnabaticEngine::setSaturateRatio ( float ratio ) { _configuration->setSaturateRatio(ratio); }
|
||||
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 const ChipTools& AnabaticEngine::getChipTools () const { return _chipTools; }
|
||||
inline const vector<NetData*>& AnabaticEngine::getNetOrdering () const { return _netOrdering; }
|
||||
|
|
|
@ -115,6 +115,7 @@ namespace Anabatic {
|
|||
Flags getDirection ( const Layer* ) const;
|
||||
float getSaturateRatio () const;
|
||||
size_t getSaturateRp () const;
|
||||
inline std::string getDiodeName () const;
|
||||
inline DbU::Unit getAntennaMaxWL () const;
|
||||
DbU::Unit getGlobalThreshold () const;
|
||||
void setAllowedDepth ( size_t );
|
||||
|
@ -158,6 +159,7 @@ namespace Anabatic {
|
|||
float _edgeHInc;
|
||||
float _edgeHScaling;
|
||||
int _globalIterations;
|
||||
std::string _diodeName;
|
||||
DbU::Unit _antennaMaxWL;
|
||||
private:
|
||||
Configuration& operator= ( const Configuration& ) = delete;
|
||||
|
@ -186,6 +188,7 @@ namespace Anabatic {
|
|||
inline const Layer* Configuration::getDContactLayer () const { return getContactLayer( getDContactDepth() ); }
|
||||
inline DbU::Unit Configuration::getDContactWidth () const { return getWireWidth ( getDContactDepth() ); }
|
||||
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; }
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue