From 3f182f1cee7dc1c9f0739f3246c0e81aa45d56f9 Mon Sep 17 00:00:00 2001 From: Gabriel Gouvine Date: Mon, 20 Apr 2015 16:50:30 +0200 Subject: [PATCH] Basic routing-driven placement --- etesian/CMakeLists.txt | 3 +-- etesian/src/CMakeLists.txt | 1 + etesian/src/EtesianEngine.cpp | 32 +++++++++++++++++++++++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index 6c2bdff8..32fa4753 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -16,14 +16,13 @@ set_lib_link_mode() setup_boost(program_options python regex) - find_package(LibXml2 REQUIRED) find_package(PythonLibs REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) - find_package(LEFDEF REQUIRED) find_package(HURRICANE REQUIRED) find_package(KATABATIC REQUIRED) find_package(CORIOLIS REQUIRED) + find_package(KITE REQUIRED) find_package(COLOQUINTE REQUIRED) find_package(Libexecinfo REQUIRED) diff --git a/etesian/src/CMakeLists.txt b/etesian/src/CMakeLists.txt index 77162099..6b1dfaef 100644 --- a/etesian/src/CMakeLists.txt +++ b/etesian/src/CMakeLists.txt @@ -36,6 +36,7 @@ ${HURRICANE_PYTHON_LIBRARIES} ${HURRICANE_GRAPHICAL_LIBRARIES} ${HURRICANE_LIBRARIES} + ${KITE_LIBRARIES} ${CONFIGURATION_LIBRARY} ${BOOKSHELF_LIBRARY} ${CIF_LIBRARY} diff --git a/etesian/src/EtesianEngine.cpp b/etesian/src/EtesianEngine.cpp index 5b97136d..dfbd1659 100644 --- a/etesian/src/EtesianEngine.cpp +++ b/etesian/src/EtesianEngine.cpp @@ -41,6 +41,7 @@ #include "hurricane/viewer/CellWidget.h" #include "katabatic/GCellGrid.h" #include "katabatic/KatabaticEngine.h" +#include "kite/KiteEngine.h" #include "crlcore/Utilities.h" #include "crlcore/Measures.h" #include "crlcore/AllianceFramework.h" @@ -630,6 +631,7 @@ namespace Etesian { void EtesianEngine::feedRoutingBack(){ using namespace Katabatic; + using namespace Kite; /* * If routing information is present, use it to * * artificially expand the areas given to coloquinte @@ -638,7 +640,7 @@ namespace Etesian { DbU::Unit pitch = getPitch(); const float densityThreshold = 0.9; - KatabaticEngine* routingEngine = KatabaticEngine::get( getCell() ); + KiteEngine* routingEngine = KiteEngine::get( getCell() ); if(routingEngine == NULL) throw Error("No routing information was found when performing routing-driven placement\n"); @@ -794,6 +796,7 @@ namespace Etesian { _progressReport1(" Final Legalize ." ); } } + _placementLB = _placementUB; // In case we run other passes _updatePlacement( _placementUB ); } @@ -869,6 +872,33 @@ namespace Etesian { cmess1 << " o Detailed Placement." << endl; detailedPlace(detailedIterations, detailedEffort, detailedOptions); + using namespace Kite; + KiteEngine* kiteE = KiteEngine::create(_cell); + kiteE->runGlobalRouter(0); + kiteE->loadGlobalRouting(Katabatic::EngineLoadGrByNet); + kiteE->balanceGlobalDensity(); + kiteE->layerAssign(Katabatic::EngineNoNetLayerAssign); + kiteE->runNegociate(); + feedRoutingBack(); + kiteE->destroy(); + + UpdateSession::open(); + forEach(Net*, inet, _cell->getNets()){ + if(NetRoutingExtension::isManualGlobalRoute(*inet)) + continue; + std::vector pointers; + forEach(Component*, icom, (*inet)->getComponents()){ + Contact * contact = dynamic_cast(*icom); + if(contact){ + pointers.push_back(contact); + } + } + for(Contact* contact : pointers) + contact->destroy(); + } + UpdateSession::close(); + detailedPlace(detailedIterations, detailedEffort, detailedOptions); + cmess2 << " o Adding feed cells." << endl; addFeeds();