From ef2635b9f3af87c221f571bb6e71b55ba2da0b2f Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 15 Nov 2019 12:26:14 +0100 Subject: [PATCH] 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. --- etesian/src/AddFeeds.cpp | 2 +- etesian/src/BloatCells.cpp | 6 +++--- etesian/src/EtesianEngine.cpp | 19 +++++++++---------- etesian/src/FeedCells.cpp | 6 +++--- etesian/src/etesian/EtesianEngine.h | 2 ++ 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/etesian/src/AddFeeds.cpp b/etesian/src/AddFeeds.cpp index ab6f7f9f..e031d260 100644 --- a/etesian/src/AddFeeds.cpp +++ b/etesian/src/AddFeeds.cpp @@ -199,7 +199,7 @@ namespace { if (xtie >= xmax) break; if (xtie+feedWidth > xmax) { // 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 ) { feed = getEtesian()->getFeedCells().getFeed( pitch ); if (feed == NULL) continue; diff --git a/etesian/src/BloatCells.cpp b/etesian/src/BloatCells.cpp index 3229b33e..651d8944 100644 --- a/etesian/src/BloatCells.cpp +++ b/etesian/src/BloatCells.cpp @@ -79,7 +79,7 @@ namespace Etesian { DbU::Unit BloatNsxlib::getDx ( const Cell* cell, const EtesianEngine* etesian ) const { Box ab ( cell->getAbutmentBox() ); - DbU::Unit vpitch = etesian->getVerticalPitch();; + DbU::Unit vpitch = etesian->getSliceStep();; int xsize = (ab.getWidth() + vpitch - 1) / vpitch; if (xsize < 6) return vpitch*2; @@ -105,7 +105,7 @@ namespace Etesian { } Box ab ( cell->getAbutmentBox() ); - DbU::Unit vpitch = etesian->getVerticalPitch();; + DbU::Unit vpitch = etesian->getSliceStep();; int xsize = (ab.getWidth() + vpitch - 1) / vpitch; // float termRatio = (float)terminals / (float)(ab.getWidth() / vpitch); @@ -138,7 +138,7 @@ namespace Etesian { } Box ab ( cell->getAbutmentBox() ); - DbU::Unit vpitch = etesian->getVerticalPitch();; + DbU::Unit vpitch = etesian->getSliceStep();; int xsize = (ab.getWidth() + vpitch - 1) / vpitch; // float termRatio = (float)terminals / (float)(ab.getWidth() / vpitch); diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index 3abb9b33..0deb8901 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -395,8 +395,8 @@ namespace Etesian { } DbU::Unit abWidth = columns*getSliceHeight(); - DbU::Unit adjust = abWidth % getVerticalPitch(); - if (adjust) abWidth += getVerticalPitch() - adjust; + DbU::Unit adjust = abWidth % getSliceStep(); + if (adjust) abWidth += getSliceStep() - adjust; getCell()->setAbutmentBox( Box( DbU::fromLambda(0) , DbU::fromLambda(0) @@ -466,7 +466,7 @@ namespace Etesian { { AllianceFramework* af = AllianceFramework::get(); DbU::Unit hpitch = getHorizontalPitch(); - DbU::Unit vpitch = getVerticalPitch(); + DbU::Unit vpitch = getSliceStep(); cmess1 << " o Converting <" << getCell()->getName() << "> into Coloquinte." << endl; cmess1 << ::Dots::asString(" - H-pitch" , DbU::getValueString(hpitch)) << endl; @@ -774,7 +774,7 @@ namespace Etesian { * * add placement dentity constraints */ DbU::Unit hpitch = getHorizontalPitch(); - DbU::Unit vpitch = getVerticalPitch(); + DbU::Unit vpitch = getSliceStep(); const float densityThreshold = 0.9; KiteEngine* routingEngine = KiteEngine::get( getCell() ); @@ -969,13 +969,12 @@ namespace Etesian { GraphicUpdate placementUpdate = getUpdateConf(); Density densityConf = getSpreadingConf(); bool routingDriven = getRoutingDriven(); - - startMeasures(); - double sliceHeight = getSliceHeight() / getHorizontalPitch(); + double sliceHeight = getSliceHeight() / getHorizontalPitch(); cmess1 << " o Running Coloquinte." << endl; cmess2 << " - Computing initial placement..." << endl; cmess2 << right; + startMeasures(); preplace(); @@ -1058,9 +1057,9 @@ namespace Etesian { stopMeasures(); printMeasures(); 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 - ( " - 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; @@ -1124,7 +1123,7 @@ namespace Etesian { for ( Occurrence occurrence : getCell()->getLeafInstanceOccurrences(getBlockInstance()) ) { DbU::Unit hpitch = getHorizontalPitch(); - DbU::Unit vpitch = getVerticalPitch(); + DbU::Unit vpitch = getSliceStep(); Point instancePosition; Instance* instance = static_cast(occurrence.getEntity()); string instanceName = occurrence.getCompactString(); diff --git a/etesian/src/FeedCells.cpp b/etesian/src/FeedCells.cpp index 228a886f..d4554d74 100644 --- a/etesian/src/FeedCells.cpp +++ b/etesian/src/FeedCells.cpp @@ -36,10 +36,10 @@ namespace Etesian { { if ( cell == NULL ) return; - DbU::Unit pitch = _etesian->getVerticalPitch(); + DbU::Unit pitch = _etesian->getSliceStep(); if (cell->getAbutmentBox().getWidth() % pitch != 0) - cerr << Warning( "FeedCells::addFeed(): <%s> 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() , DbU::getValueString(cell->getAbutmentBox().getWidth()).c_str() , DbU::getValueString(pitch).c_str() @@ -48,7 +48,7 @@ namespace Etesian { int pitchNb = (int)( cell->getAbutmentBox().getWidth() / pitch ); if (getFeed(pitchNb) != NULL) { - cerr << Warning( "FeedCells::addFeed(): <%s> duplicate feed for width %d." + cerr << Warning( "FeedCells::addFeed(): \"%s\" duplicate feed for width %d." , getString(cell->getName()).c_str() , pitchNb ) << endl; diff --git a/etesian/src/etesian/EtesianEngine.h b/etesian/src/etesian/EtesianEngine.h index 78fc9ebe..4f3e72b9 100644 --- a/etesian/src/etesian/EtesianEngine.h +++ b/etesian/src/etesian/EtesianEngine.h @@ -68,6 +68,7 @@ namespace Etesian { inline DbU::Unit getHorizontalPitch () const; inline DbU::Unit getVerticalPitch () const; inline DbU::Unit getSliceHeight () const; + inline DbU::Unit getSliceStep () const; inline Effort getPlaceEffort () const; inline GraphicUpdate getUpdateConf () const; inline Density getSpreadingConf () const; @@ -143,6 +144,7 @@ namespace Etesian { inline DbU::Unit EtesianEngine::getHorizontalPitch () const { return getGauge()->getHorizontalPitch(); } inline DbU::Unit EtesianEngine::getVerticalPitch () const { return getGauge()->getVerticalPitch(); } 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 GraphicUpdate EtesianEngine::getUpdateConf () const { return getConfiguration()->getUpdateConf(); } inline Density EtesianEngine::getSpreadingConf () const { return getConfiguration()->getSpreadingConf(); }