Rewrite EtesianEngine for new coloquinte
This commit is contained in:
parent
393204ba0d
commit
4f1ce6cfcb
|
@ -859,11 +859,11 @@ namespace Etesian {
|
||||||
Box overlapAb = topAb.getIntersection( instance->getAbutmentBox() );
|
Box overlapAb = topAb.getIntersection( instance->getAbutmentBox() );
|
||||||
if (not overlapAb.isEmpty()) {
|
if (not overlapAb.isEmpty()) {
|
||||||
// Upper rounded
|
// Upper rounded
|
||||||
int xsize = (overlapAb.getWidth () + vpitch - 1) / vpitch;
|
int xsize = (overlapAb.getWidth () + hpitch - 1) / hpitch;
|
||||||
int ysize = (overlapAb.getHeight() + hpitch - 1) / hpitch;
|
int ysize = (overlapAb.getHeight() + vpitch - 1) / vpitch;
|
||||||
// Lower rounded
|
// Lower rounded
|
||||||
int xpos = overlapAb.getXMin() / vpitch;
|
int xpos = overlapAb.getXMin() / hpitch;
|
||||||
int ypos = overlapAb.getYMin() / hpitch;
|
int ypos = overlapAb.getYMin() / vpitch;
|
||||||
|
|
||||||
cellX[instanceId] = xpos;
|
cellX[instanceId] = xpos;
|
||||||
cellY[instanceId] = ypos;
|
cellY[instanceId] = ypos;
|
||||||
|
@ -910,20 +910,20 @@ namespace Etesian {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stdCellSizes.addSample( (float)(masterCell->getAbutmentBox().getWidth() / vpitch), 0 );
|
stdCellSizes.addSample( (float)(masterCell->getAbutmentBox().getWidth() / hpitch), 0 );
|
||||||
Box instanceAb = _bloatCells.getAb( occurrence );
|
Box instanceAb = _bloatCells.getAb( occurrence );
|
||||||
stdCellSizes.addSample( (float)(instanceAb.getWidth() / vpitch), 1 );
|
stdCellSizes.addSample( (float)(instanceAb.getWidth() / hpitch), 1 );
|
||||||
|
|
||||||
Transformation instanceTransf = instance->getTransformation();
|
Transformation instanceTransf = instance->getTransformation();
|
||||||
occurrence.getPath().getTransformation().applyOn( instanceTransf );
|
occurrence.getPath().getTransformation().applyOn( instanceTransf );
|
||||||
instanceTransf.applyOn( instanceAb );
|
instanceTransf.applyOn( instanceAb );
|
||||||
|
|
||||||
// Upper rounded
|
// Upper rounded
|
||||||
int xsize = (instanceAb.getWidth () + vpitch - 1) / vpitch;
|
int xsize = (instanceAb.getWidth () + hpitch - 1) / hpitch;
|
||||||
int ysize = (instanceAb.getHeight() + hpitch - 1) / hpitch;
|
int ysize = (instanceAb.getHeight() + vpitch - 1) / vpitch;
|
||||||
// Lower rounded
|
// Lower rounded
|
||||||
int xpos = instanceAb.getXMin() / vpitch;
|
int xpos = instanceAb.getXMin() / hpitch;
|
||||||
int ypos = instanceAb.getYMin() / hpitch;
|
int ypos = instanceAb.getYMin() / vpitch;
|
||||||
|
|
||||||
//if (xsize < 6) xsize += 2;
|
//if (xsize < 6) xsize += 2;
|
||||||
|
|
||||||
|
@ -1005,6 +1005,12 @@ namespace Etesian {
|
||||||
|
|
||||||
++netsNb;
|
++netsNb;
|
||||||
}
|
}
|
||||||
|
_circuit->setCellX(cellX);
|
||||||
|
_circuit->setCellY(cellY);
|
||||||
|
_circuit->setCellWidth(cellWidth);
|
||||||
|
_circuit->setCellHeight(cellHeight);
|
||||||
|
_circuit->setCellIsFixed(cellIsFixed);
|
||||||
|
_circuit->setCellIsObstruction(cellIsObstruction);
|
||||||
|
|
||||||
cmess1 << " - Converting " << netsNb << " nets" << endl;
|
cmess1 << " - Converting " << netsNb << " nets" << endl;
|
||||||
|
|
||||||
|
@ -1035,8 +1041,8 @@ namespace Etesian {
|
||||||
if (pin) {
|
if (pin) {
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
Point pt = rp->getCenter();
|
Point pt = rp->getCenter();
|
||||||
int xpin = pt.getX() / vpitch;
|
int xpin = pt.getX() / hpitch;
|
||||||
int ypin = pt.getY() / hpitch;
|
int ypin = pt.getY() / vpitch;
|
||||||
// Dummy last instance
|
// Dummy last instance
|
||||||
pinX.push_back(xpin);
|
pinX.push_back(xpin);
|
||||||
pinY.push_back(ypin);
|
pinY.push_back(ypin);
|
||||||
|
@ -1067,8 +1073,8 @@ namespace Etesian {
|
||||||
string insName = extractInstanceName( rp );
|
string insName = extractInstanceName( rp );
|
||||||
Point offset = extractRpOffset ( rp );
|
Point offset = extractRpOffset ( rp );
|
||||||
|
|
||||||
int xpin = offset.getX() / vpitch;
|
int xpin = offset.getX() / hpitch;
|
||||||
int ypin = offset.getY() / hpitch;
|
int ypin = offset.getY() / vpitch;
|
||||||
|
|
||||||
auto iid = _instsToIds.find( instance );
|
auto iid = _instsToIds.find( instance );
|
||||||
if (iid == _instsToIds.end()) {
|
if (iid == _instsToIds.end()) {
|
||||||
|
@ -1101,13 +1107,13 @@ namespace Etesian {
|
||||||
cmess2 << stdCellSizes.toString(1) << endl;
|
cmess2 << stdCellSizes.toString(1) << endl;
|
||||||
|
|
||||||
//_densityLimits = new coloquinte::density_restrictions ();
|
//_densityLimits = new coloquinte::density_restrictions ();
|
||||||
_surface = new coloquinte::Rectangle( (int)(topAb.getXMin() / vpitch)
|
_surface = new coloquinte::Rectangle( (int)(topAb.getXMin() / hpitch)
|
||||||
, (int)(topAb.getXMax() / vpitch)
|
, (int)(topAb.getXMax() / hpitch)
|
||||||
, (int)(topAb.getYMin() / hpitch)
|
, (int)(topAb.getYMin() / vpitch)
|
||||||
, (int)(topAb.getYMax() / hpitch)
|
, (int)(topAb.getYMax() / vpitch)
|
||||||
);
|
);
|
||||||
|
_circuit->setupRows(*_surface, (getSliceHeight() + vpitch - 1) / vpitch);
|
||||||
_circuit->check();
|
_circuit->check();
|
||||||
// TODO: define the rows
|
|
||||||
_placementLB = new coloquinte::PlacementSolution ();
|
_placementLB = new coloquinte::PlacementSolution ();
|
||||||
_placementUB = new coloquinte::PlacementSolution ( *_placementLB );
|
_placementUB = new coloquinte::PlacementSolution ( *_placementLB );
|
||||||
|
|
||||||
|
@ -1255,6 +1261,7 @@ namespace Etesian {
|
||||||
Density densityConf = getSpreadingConf();
|
Density densityConf = getSpreadingConf();
|
||||||
|
|
||||||
cmess1 << " o Running Coloquinte." << endl;
|
cmess1 << " o Running Coloquinte." << endl;
|
||||||
|
startMeasures();
|
||||||
|
|
||||||
unsigned globalOptions=0, detailedOptions=0;
|
unsigned globalOptions=0, detailedOptions=0;
|
||||||
|
|
||||||
|
@ -1268,6 +1275,7 @@ namespace Etesian {
|
||||||
|
|
||||||
if (densityConf == ForceUniform)
|
if (densityConf == ForceUniform)
|
||||||
globalOptions |= ForceUniformDensity;
|
globalOptions |= ForceUniformDensity;
|
||||||
|
cmess1 << _circuit->report() << std::endl;
|
||||||
|
|
||||||
cmess1 << " o Global placement." << endl;
|
cmess1 << " o Global placement." << endl;
|
||||||
globalPlace(globalOptions);
|
globalPlace(globalOptions);
|
||||||
|
|
Loading…
Reference in New Issue