Etesian should use the CellGauge slice step when adding the feed cells.

* Bug: In EtesianEngine, it was using the vertical track pitch from the
    routing gauge, but it may differ from the cell pitch. For example in
    "cmos350" the cell step is 10 lambdas while the vertical routing
    pitch may be only 8 lambdas.
      This bug shows because now we try to use the non-PinOnly routing
    gauge for the reference routing gauge.
This commit is contained in:
Jean-Paul Chaput 2019-11-15 12:26:14 +01:00
parent 92edd9ba31
commit ef2635b9f3
5 changed files with 18 additions and 17 deletions

View File

@ -199,7 +199,7 @@ namespace {
if (xtie >= xmax) break; if (xtie >= xmax) break;
if (xtie+feedWidth > xmax) { if (xtie+feedWidth > xmax) {
// Feed is too big, try to find a smaller one. // Feed is too big, try to find a smaller one.
int pitch = (int)((xmax-xtie) / getEtesian()->getVerticalPitch()); int pitch = (int)((xmax-xtie) / getEtesian()->getSliceStep());
for ( ; pitch > 0 ; --pitch ) { for ( ; pitch > 0 ; --pitch ) {
feed = getEtesian()->getFeedCells().getFeed( pitch ); feed = getEtesian()->getFeedCells().getFeed( pitch );
if (feed == NULL) continue; if (feed == NULL) continue;

View File

@ -79,7 +79,7 @@ namespace Etesian {
DbU::Unit BloatNsxlib::getDx ( const Cell* cell, const EtesianEngine* etesian ) const DbU::Unit BloatNsxlib::getDx ( const Cell* cell, const EtesianEngine* etesian ) const
{ {
Box ab ( cell->getAbutmentBox() ); Box ab ( cell->getAbutmentBox() );
DbU::Unit vpitch = etesian->getVerticalPitch();; DbU::Unit vpitch = etesian->getSliceStep();;
int xsize = (ab.getWidth() + vpitch - 1) / vpitch; int xsize = (ab.getWidth() + vpitch - 1) / vpitch;
if (xsize < 6) return vpitch*2; if (xsize < 6) return vpitch*2;
@ -105,7 +105,7 @@ namespace Etesian {
} }
Box ab ( cell->getAbutmentBox() ); Box ab ( cell->getAbutmentBox() );
DbU::Unit vpitch = etesian->getVerticalPitch();; DbU::Unit vpitch = etesian->getSliceStep();;
int xsize = (ab.getWidth() + vpitch - 1) / vpitch; int xsize = (ab.getWidth() + vpitch - 1) / vpitch;
// float termRatio = (float)terminals / (float)(ab.getWidth() / vpitch); // float termRatio = (float)terminals / (float)(ab.getWidth() / vpitch);
@ -138,7 +138,7 @@ namespace Etesian {
} }
Box ab ( cell->getAbutmentBox() ); Box ab ( cell->getAbutmentBox() );
DbU::Unit vpitch = etesian->getVerticalPitch();; DbU::Unit vpitch = etesian->getSliceStep();;
int xsize = (ab.getWidth() + vpitch - 1) / vpitch; int xsize = (ab.getWidth() + vpitch - 1) / vpitch;
// float termRatio = (float)terminals / (float)(ab.getWidth() / vpitch); // float termRatio = (float)terminals / (float)(ab.getWidth() / vpitch);

View File

@ -395,8 +395,8 @@ namespace Etesian {
} }
DbU::Unit abWidth = columns*getSliceHeight(); DbU::Unit abWidth = columns*getSliceHeight();
DbU::Unit adjust = abWidth % getVerticalPitch(); DbU::Unit adjust = abWidth % getSliceStep();
if (adjust) abWidth += getVerticalPitch() - adjust; if (adjust) abWidth += getSliceStep() - adjust;
getCell()->setAbutmentBox( Box( DbU::fromLambda(0) getCell()->setAbutmentBox( Box( DbU::fromLambda(0)
, DbU::fromLambda(0) , DbU::fromLambda(0)
@ -466,7 +466,7 @@ namespace Etesian {
{ {
AllianceFramework* af = AllianceFramework::get(); AllianceFramework* af = AllianceFramework::get();
DbU::Unit hpitch = getHorizontalPitch(); DbU::Unit hpitch = getHorizontalPitch();
DbU::Unit vpitch = getVerticalPitch(); DbU::Unit vpitch = getSliceStep();
cmess1 << " o Converting <" << getCell()->getName() << "> into Coloquinte." << endl; cmess1 << " o Converting <" << getCell()->getName() << "> into Coloquinte." << endl;
cmess1 << ::Dots::asString(" - H-pitch" , DbU::getValueString(hpitch)) << endl; cmess1 << ::Dots::asString(" - H-pitch" , DbU::getValueString(hpitch)) << endl;
@ -774,7 +774,7 @@ namespace Etesian {
* * add placement dentity constraints * * add placement dentity constraints
*/ */
DbU::Unit hpitch = getHorizontalPitch(); DbU::Unit hpitch = getHorizontalPitch();
DbU::Unit vpitch = getVerticalPitch(); DbU::Unit vpitch = getSliceStep();
const float densityThreshold = 0.9; const float densityThreshold = 0.9;
KiteEngine* routingEngine = KiteEngine::get( getCell() ); KiteEngine* routingEngine = KiteEngine::get( getCell() );
@ -969,13 +969,12 @@ namespace Etesian {
GraphicUpdate placementUpdate = getUpdateConf(); GraphicUpdate placementUpdate = getUpdateConf();
Density densityConf = getSpreadingConf(); Density densityConf = getSpreadingConf();
bool routingDriven = getRoutingDriven(); bool routingDriven = getRoutingDriven();
startMeasures();
double sliceHeight = getSliceHeight() / getHorizontalPitch(); double sliceHeight = getSliceHeight() / getHorizontalPitch();
cmess1 << " o Running Coloquinte." << endl; cmess1 << " o Running Coloquinte." << endl;
cmess2 << " - Computing initial placement..." << endl; cmess2 << " - Computing initial placement..." << endl;
cmess2 << right; cmess2 << right;
startMeasures();
preplace(); preplace();
@ -1058,9 +1057,9 @@ namespace Etesian {
stopMeasures(); stopMeasures();
printMeasures(); printMeasures();
cmess1 << ::Dots::asString cmess1 << ::Dots::asString
( " - HPWL", DbU::getValueString( (DbU::Unit)coloquinte::gp::get_HPWL_wirelength(_circuit,_placementUB )*getVerticalPitch() ) ) << endl; ( " - HPWL", DbU::getValueString( (DbU::Unit)coloquinte::gp::get_HPWL_wirelength(_circuit,_placementUB )*getSliceStep() ) ) << endl;
cmess1 << ::Dots::asString cmess1 << ::Dots::asString
( " - RMST", DbU::getValueString( (DbU::Unit)coloquinte::gp::get_RSMT_wirelength(_circuit,_placementUB )*getVerticalPitch() ) ) << endl; ( " - RMST", DbU::getValueString( (DbU::Unit)coloquinte::gp::get_RSMT_wirelength(_circuit,_placementUB )*getSliceStep() ) ) << endl;
_placed = true; _placed = true;
@ -1124,7 +1123,7 @@ namespace Etesian {
for ( Occurrence occurrence : getCell()->getLeafInstanceOccurrences(getBlockInstance()) ) for ( Occurrence occurrence : getCell()->getLeafInstanceOccurrences(getBlockInstance()) )
{ {
DbU::Unit hpitch = getHorizontalPitch(); DbU::Unit hpitch = getHorizontalPitch();
DbU::Unit vpitch = getVerticalPitch(); DbU::Unit vpitch = getSliceStep();
Point instancePosition; Point instancePosition;
Instance* instance = static_cast<Instance*>(occurrence.getEntity()); Instance* instance = static_cast<Instance*>(occurrence.getEntity());
string instanceName = occurrence.getCompactString(); string instanceName = occurrence.getCompactString();

View File

@ -36,10 +36,10 @@ namespace Etesian {
{ {
if ( cell == NULL ) return; if ( cell == NULL ) return;
DbU::Unit pitch = _etesian->getVerticalPitch(); DbU::Unit pitch = _etesian->getSliceStep();
if (cell->getAbutmentBox().getWidth() % pitch != 0) if (cell->getAbutmentBox().getWidth() % pitch != 0)
cerr << Warning( "FeedCells::addFeed(): &lt;%s&gt; has not a width (%s) multiple of pitch (%s)." cerr << Warning( "FeedCells::addFeed(): \"%s\" has not a width (%s) multiple of pitch (%s)."
, getString(cell->getName()).c_str() , getString(cell->getName()).c_str()
, DbU::getValueString(cell->getAbutmentBox().getWidth()).c_str() , DbU::getValueString(cell->getAbutmentBox().getWidth()).c_str()
, DbU::getValueString(pitch).c_str() , DbU::getValueString(pitch).c_str()
@ -48,7 +48,7 @@ namespace Etesian {
int pitchNb = (int)( cell->getAbutmentBox().getWidth() / pitch ); int pitchNb = (int)( cell->getAbutmentBox().getWidth() / pitch );
if (getFeed(pitchNb) != NULL) { if (getFeed(pitchNb) != NULL) {
cerr << Warning( "FeedCells::addFeed(): &lt;%s&gt; duplicate feed for width %d." cerr << Warning( "FeedCells::addFeed(): \"%s\" duplicate feed for width %d."
, getString(cell->getName()).c_str() , getString(cell->getName()).c_str()
, pitchNb , pitchNb
) << endl; ) << endl;

View File

@ -68,6 +68,7 @@ namespace Etesian {
inline DbU::Unit getHorizontalPitch () const; inline DbU::Unit getHorizontalPitch () const;
inline DbU::Unit getVerticalPitch () const; inline DbU::Unit getVerticalPitch () const;
inline DbU::Unit getSliceHeight () const; inline DbU::Unit getSliceHeight () const;
inline DbU::Unit getSliceStep () const;
inline Effort getPlaceEffort () const; inline Effort getPlaceEffort () const;
inline GraphicUpdate getUpdateConf () const; inline GraphicUpdate getUpdateConf () const;
inline Density getSpreadingConf () const; inline Density getSpreadingConf () const;
@ -143,6 +144,7 @@ namespace Etesian {
inline DbU::Unit EtesianEngine::getHorizontalPitch () const { return getGauge()->getHorizontalPitch(); } inline DbU::Unit EtesianEngine::getHorizontalPitch () const { return getGauge()->getHorizontalPitch(); }
inline DbU::Unit EtesianEngine::getVerticalPitch () const { return getGauge()->getVerticalPitch(); } inline DbU::Unit EtesianEngine::getVerticalPitch () const { return getGauge()->getVerticalPitch(); }
inline DbU::Unit EtesianEngine::getSliceHeight () const { return _sliceHeight; } inline DbU::Unit EtesianEngine::getSliceHeight () const { return _sliceHeight; }
inline DbU::Unit EtesianEngine::getSliceStep () const { return getCellGauge()->getSliceStep(); }
inline Effort EtesianEngine::getPlaceEffort () const { return getConfiguration()->getPlaceEffort(); } inline Effort EtesianEngine::getPlaceEffort () const { return getConfiguration()->getPlaceEffort(); }
inline GraphicUpdate EtesianEngine::getUpdateConf () const { return getConfiguration()->getUpdateConf(); } inline GraphicUpdate EtesianEngine::getUpdateConf () const { return getConfiguration()->getUpdateConf(); }
inline Density EtesianEngine::getSpreadingConf () const { return getConfiguration()->getSpreadingConf(); } inline Density EtesianEngine::getSpreadingConf () const { return getConfiguration()->getSpreadingConf(); }