Remove unused datastructures in EtesianEngine
This commit is contained in:
parent
0fe1deac94
commit
23975c541d
|
@ -317,11 +317,8 @@ namespace Etesian {
|
||||||
, _circuit (NULL)
|
, _circuit (NULL)
|
||||||
, _placementLB (NULL)
|
, _placementLB (NULL)
|
||||||
, _placementUB (NULL)
|
, _placementUB (NULL)
|
||||||
//, _densityLimits(NULL)
|
|
||||||
, _netsToIds ()
|
|
||||||
, _instsToIds ()
|
, _instsToIds ()
|
||||||
, _idsToInsts ()
|
, _idsToInsts ()
|
||||||
, _idsToNets ()
|
|
||||||
, _viewer (NULL)
|
, _viewer (NULL)
|
||||||
, _diodeCell (NULL)
|
, _diodeCell (NULL)
|
||||||
, _feedCells (this)
|
, _feedCells (this)
|
||||||
|
@ -456,10 +453,6 @@ namespace Etesian {
|
||||||
delete _circuit;
|
delete _circuit;
|
||||||
delete _placementLB;
|
delete _placementLB;
|
||||||
delete _placementUB;
|
delete _placementUB;
|
||||||
//delete _densityLimits;
|
|
||||||
|
|
||||||
NetsToIds emptyNetsToIds;
|
|
||||||
_netsToIds.swap( emptyNetsToIds );
|
|
||||||
|
|
||||||
InstancesToIds emptyInstsToIds;
|
InstancesToIds emptyInstsToIds;
|
||||||
_instsToIds.swap( emptyInstsToIds );
|
_instsToIds.swap( emptyInstsToIds );
|
||||||
|
@ -467,14 +460,10 @@ namespace Etesian {
|
||||||
vector<InstanceInfos> emptyIdsToInsts;
|
vector<InstanceInfos> emptyIdsToInsts;
|
||||||
_idsToInsts.swap( emptyIdsToInsts );
|
_idsToInsts.swap( emptyIdsToInsts );
|
||||||
|
|
||||||
vector<NetInfos> emptyIdsToNets;
|
|
||||||
_idsToNets.swap( emptyIdsToNets );
|
|
||||||
|
|
||||||
_surface = NULL;
|
_surface = NULL;
|
||||||
_circuit = NULL;
|
_circuit = NULL;
|
||||||
_placementLB = NULL;
|
_placementLB = NULL;
|
||||||
_placementUB = NULL;
|
_placementUB = NULL;
|
||||||
//_densityLimits = NULL;
|
|
||||||
_diodeCount = 0;
|
_diodeCount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -721,6 +710,8 @@ namespace Etesian {
|
||||||
DbU::Unit sliceHeight = getSliceHeight();
|
DbU::Unit sliceHeight = getSliceHeight();
|
||||||
bool isFlexLib = (getGauge()->getName() == "FlexLib");
|
bool isFlexLib = (getGauge()->getName() == "FlexLib");
|
||||||
|
|
||||||
|
// TODO: Density densityConf = getSpreadingConf();
|
||||||
|
|
||||||
CRL::Histogram stdCellSizes ( 0.0, 1.0, 2 );
|
CRL::Histogram stdCellSizes ( 0.0, 1.0, 2 );
|
||||||
stdCellSizes.setTitle ( "Width" , 0 );
|
stdCellSizes.setTitle ( "Width" , 0 );
|
||||||
stdCellSizes.setColor ( "green" , 0 );
|
stdCellSizes.setColor ( "green" , 0 );
|
||||||
|
@ -794,18 +785,18 @@ namespace Etesian {
|
||||||
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
|
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
|
||||||
Box instanceAb = instance->getAbutmentBox();
|
Box instanceAb = instance->getAbutmentBox();
|
||||||
string masterName = getString( instance->getMasterCell()->getName() );
|
string masterName = getString( instance->getMasterCell()->getName() );
|
||||||
|
DbU::Unit length = (instanceAb.getHeight()/sliceHeight) * instanceAb.getWidth();
|
||||||
if (af->isRegister(masterName)) {
|
if (af->isRegister(masterName)) {
|
||||||
++registerNb;
|
++registerNb;
|
||||||
registerLength += instanceAb.getWidth();
|
registerLength += length;
|
||||||
}
|
}
|
||||||
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED) {
|
if (instance->getPlacementStatus() == Instance::PlacementStatus::FIXED) {
|
||||||
++fixedNb;
|
++fixedNb;
|
||||||
totalLength -= (instanceAb.getHeight()/sliceHeight) * instanceAb.getWidth();
|
totalLength -= length;
|
||||||
} else if (instance->getPlacementStatus() == Instance::PlacementStatus::PLACED) {
|
} else if (instance->getPlacementStatus() == Instance::PlacementStatus::PLACED) {
|
||||||
cerr << "PLACED " << instance << endl;
|
cerr << "PLACED " << instance << endl;
|
||||||
} else {
|
} else {
|
||||||
usedLength += (instanceAb.getHeight()/sliceHeight) * instanceAb.getWidth();
|
usedLength += length;
|
||||||
//cerr << DbU::getValueString(usedLength) << " " << instance << endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (instancesNb <= fixedNb) {
|
if (instancesNb <= fixedNb) {
|
||||||
|
@ -819,19 +810,6 @@ namespace Etesian {
|
||||||
cmess1 << ::Dots::asPercentage( " - Effective space margin"
|
cmess1 << ::Dots::asPercentage( " - Effective space margin"
|
||||||
, (float)(totalLength-usedLength)/(float)totalLength ) << endl;
|
, (float)(totalLength-usedLength)/(float)totalLength ) << endl;
|
||||||
|
|
||||||
// Coloquinte circuit description data-structures.
|
|
||||||
// One dummy fixed instance at the end
|
|
||||||
|
|
||||||
_circuit = new coloquinte::Circuit( instancesNb+1 );
|
|
||||||
vector<int> cellX( instancesNb+1 );
|
|
||||||
vector<int> cellY( instancesNb+1 );
|
|
||||||
vector<coloquinte::CellOrientation> orient( instancesNb+1 );
|
|
||||||
vector<int> cellWidth( instancesNb+1 );
|
|
||||||
vector<int> cellHeight( instancesNb+1 );
|
|
||||||
vector<bool> cellIsFixed( instancesNb+1 );
|
|
||||||
vector<bool> cellIsObstruction( instancesNb+1 );
|
|
||||||
vector<coloquinte::CellRowPolarity> cellRowPolarity( instancesNb+1, coloquinte::CellRowPolarity::SAME );
|
|
||||||
|
|
||||||
cmess1 << ::Dots::asUInt( " - Number of instances ", instancesNb ) << endl;
|
cmess1 << ::Dots::asUInt( " - Number of instances ", instancesNb ) << endl;
|
||||||
if (instancesNb) {
|
if (instancesNb) {
|
||||||
float ratio = ((float)registerNb / (float)instancesNb) * 100.0;
|
float ratio = ((float)registerNb / (float)instancesNb) * 100.0;
|
||||||
|
@ -847,6 +825,19 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
cout.flush();
|
cout.flush();
|
||||||
|
|
||||||
|
// Coloquinte circuit description data-structures.
|
||||||
|
// One dummy fixed instance at the end
|
||||||
|
|
||||||
|
_circuit = new coloquinte::Circuit( instancesNb+1 );
|
||||||
|
vector<int> cellX( instancesNb+1 );
|
||||||
|
vector<int> cellY( instancesNb+1 );
|
||||||
|
vector<coloquinte::CellOrientation> orient( instancesNb+1 );
|
||||||
|
vector<int> cellWidth( instancesNb+1 );
|
||||||
|
vector<int> cellHeight( instancesNb+1 );
|
||||||
|
vector<bool> cellIsFixed( instancesNb+1 );
|
||||||
|
vector<bool> cellIsObstruction( instancesNb+1 );
|
||||||
|
vector<coloquinte::CellRowPolarity> cellRowPolarity( instancesNb+1, coloquinte::CellRowPolarity::SAME );
|
||||||
|
|
||||||
cmess1 << " - Building RoutingPads (transhierarchical)" << endl;
|
cmess1 << " - Building RoutingPads (transhierarchical)" << endl;
|
||||||
//getCell()->flattenNets( Cell::Flags::BuildRings|Cell::Flags::NoClockFlatten );
|
//getCell()->flattenNets( Cell::Flags::BuildRings|Cell::Flags::NoClockFlatten );
|
||||||
//getCell()->flattenNets( getBlockInstance(), Cell::Flags::NoClockFlatten );
|
//getCell()->flattenNets( getBlockInstance(), Cell::Flags::NoClockFlatten );
|
||||||
|
@ -1018,9 +1009,6 @@ namespace Etesian {
|
||||||
|
|
||||||
cmess1 << " - Converting " << netsNb << " nets" << endl;
|
cmess1 << " - Converting " << netsNb << " nets" << endl;
|
||||||
|
|
||||||
_idsToNets.resize( netsNb );
|
|
||||||
|
|
||||||
unsigned int netId = 0;
|
|
||||||
for ( Net* net : getCell()->getNets() )
|
for ( Net* net : getCell()->getNets() )
|
||||||
{
|
{
|
||||||
const char* excludedType = NULL;
|
const char* excludedType = NULL;
|
||||||
|
@ -1032,9 +1020,6 @@ namespace Etesian {
|
||||||
if (af->isBLOCKAGE(net->getName())) continue;
|
if (af->isBLOCKAGE(net->getName())) continue;
|
||||||
|
|
||||||
dots.dot();
|
dots.dot();
|
||||||
|
|
||||||
_netsToIds.insert( make_pair(net,netId) );
|
|
||||||
_idsToNets[netId] = make_tuple( net, _instsToIds.size(), 0 );
|
|
||||||
|
|
||||||
string topCellInstancePin = getString(getCell()->getName()) + ":C";
|
string topCellInstancePin = getString(getCell()->getName()) + ":C";
|
||||||
vector<int> netCells, pinX, pinY;
|
vector<int> netCells, pinX, pinY;
|
||||||
|
@ -1089,19 +1074,9 @@ namespace Etesian {
|
||||||
pinX.push_back(xpin);
|
pinX.push_back(xpin);
|
||||||
pinY.push_back(ypin);
|
pinY.push_back(ypin);
|
||||||
netCells.push_back((*iid).second);
|
netCells.push_back((*iid).second);
|
||||||
Net* rpNet = NULL;
|
|
||||||
Plug* plug = dynamic_cast<Plug*>( rp->getPlugOccurrence().getEntity() );
|
|
||||||
if (plug) {
|
|
||||||
rpNet = plug->getMasterNet();
|
|
||||||
if (rpNet->getDirection() & Net::Direction::DirOut) {
|
|
||||||
std::get<1>( _idsToNets[netId] ) = (*iid).second;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_circuit->addNet(netCells, pinX, pinY);
|
_circuit->addNet(netCells, pinX, pinY);
|
||||||
|
|
||||||
netId++;
|
|
||||||
}
|
}
|
||||||
dots.finish( Dots::Reset );
|
dots.finish( Dots::Reset );
|
||||||
|
|
||||||
|
@ -1182,7 +1157,7 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EtesianEngine::globalPlace ( unsigned options )
|
void EtesianEngine::globalPlace ()
|
||||||
{
|
{
|
||||||
coloquinte::ColoquinteParameters params(getPlaceEffort());
|
coloquinte::ColoquinteParameters params(getPlaceEffort());
|
||||||
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
|
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
|
||||||
|
@ -1192,7 +1167,7 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EtesianEngine::detailedPlace ( unsigned options )
|
void EtesianEngine::detailedPlace ()
|
||||||
{
|
{
|
||||||
coloquinte::ColoquinteParameters params(getPlaceEffort());
|
coloquinte::ColoquinteParameters params(getPlaceEffort());
|
||||||
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
|
coloquinte::PlacementCallback callback =std::bind(&EtesianEngine::_coloquinteCallback, this, std::placeholders::_1);
|
||||||
|
@ -1235,31 +1210,16 @@ namespace Etesian {
|
||||||
//findYSpin();
|
//findYSpin();
|
||||||
if (not toColoquinte()) return;
|
if (not toColoquinte()) return;
|
||||||
|
|
||||||
GraphicUpdate placementUpdate = getUpdateConf();
|
|
||||||
Density densityConf = getSpreadingConf();
|
|
||||||
|
|
||||||
cmess1 << " o Running Coloquinte." << endl;
|
cmess1 << " o Running Coloquinte." << endl;
|
||||||
startMeasures();
|
startMeasures();
|
||||||
|
|
||||||
unsigned globalOptions=0, detailedOptions=0;
|
|
||||||
|
|
||||||
if (placementUpdate == UpdateAll) {
|
|
||||||
globalOptions |= (UpdateUB | UpdateLB);
|
|
||||||
detailedOptions |= UpdateDetailed;
|
|
||||||
}
|
|
||||||
else if (placementUpdate == LowerBound) {
|
|
||||||
globalOptions |= UpdateLB;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (densityConf == ForceUniform)
|
|
||||||
globalOptions |= ForceUniformDensity;
|
|
||||||
cmess1 << _circuit->report() << std::endl;
|
cmess1 << _circuit->report() << std::endl;
|
||||||
|
|
||||||
cmess1 << " o Global placement." << endl;
|
cmess1 << " o Global placement." << endl;
|
||||||
globalPlace(globalOptions);
|
globalPlace();
|
||||||
|
|
||||||
cmess1 << " o Detailed Placement." << endl;
|
cmess1 << " o Detailed Placement." << endl;
|
||||||
detailedPlace(detailedOptions);
|
detailedPlace();
|
||||||
|
|
||||||
//toHurricane();
|
//toHurricane();
|
||||||
//addFeeds();
|
//addFeeds();
|
||||||
|
|
|
@ -70,7 +70,6 @@ namespace Etesian {
|
||||||
typedef std::tuple<Net*,int32_t,uint32_t> NetInfos;
|
typedef std::tuple<Net*,int32_t,uint32_t> NetInfos;
|
||||||
typedef std::tuple<Instance*, std::vector<RoutingPad*> > InstanceInfos;
|
typedef std::tuple<Instance*, std::vector<RoutingPad*> > InstanceInfos;
|
||||||
typedef std::map<Instance*,size_t,DBo::CompareById> InstancesToIds;
|
typedef std::map<Instance*,size_t,DBo::CompareById> InstancesToIds;
|
||||||
typedef std::map<Net*,size_t,DBo::CompareById> NetsToIds;
|
|
||||||
typedef std::set<std::string> NetNameSet;
|
typedef std::set<std::string> NetNameSet;
|
||||||
public:
|
public:
|
||||||
static const Name& staticGetName ();
|
static const Name& staticGetName ();
|
||||||
|
@ -130,8 +129,8 @@ namespace Etesian {
|
||||||
inline Transformation toBlock ( const Transformation& ) const;
|
inline Transformation toBlock ( const Transformation& ) const;
|
||||||
void setPlaceArea ( const Box& );
|
void setPlaceArea ( const Box& );
|
||||||
size_t toColoquinte ();
|
size_t toColoquinte ();
|
||||||
void globalPlace ( unsigned options=0 );
|
void globalPlace ();
|
||||||
void detailedPlace ( unsigned options=0 );
|
void detailedPlace ();
|
||||||
void place ();
|
void place ();
|
||||||
uint32_t doHFNS ();
|
uint32_t doHFNS ();
|
||||||
inline void useFeed ( Cell* );
|
inline void useFeed ( Cell* );
|
||||||
|
@ -160,12 +159,8 @@ namespace Etesian {
|
||||||
coloquinte::Circuit* _circuit;
|
coloquinte::Circuit* _circuit;
|
||||||
coloquinte::PlacementSolution* _placementLB;
|
coloquinte::PlacementSolution* _placementLB;
|
||||||
coloquinte::PlacementSolution* _placementUB;
|
coloquinte::PlacementSolution* _placementUB;
|
||||||
// TODO
|
|
||||||
// coloquinte::density_restrictions* _densityLimits;
|
|
||||||
NetsToIds _netsToIds;
|
|
||||||
InstancesToIds _instsToIds;
|
InstancesToIds _instsToIds;
|
||||||
std::vector<InstanceInfos> _idsToInsts;
|
std::vector<InstanceInfos> _idsToInsts;
|
||||||
std::vector<NetInfos> _idsToNets;
|
|
||||||
Hurricane::CellViewer* _viewer;
|
Hurricane::CellViewer* _viewer;
|
||||||
Cell* _diodeCell;
|
Cell* _diodeCell;
|
||||||
FeedCells _feedCells;
|
FeedCells _feedCells;
|
||||||
|
|
Loading…
Reference in New Issue