From e12e45e4951d0026481083102f31e1ef29275c27 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 26 May 2017 13:32:30 +0200 Subject: [PATCH] Rename SymmetricStage into PairSymmetrics, plus small cleanup. --- anabatic/src/LoadGlobalRouting.cpp | 1 - crlcore/etc/common/display.conf | 2 +- documentation/UsersGuide/CMakeLists.txt | 2 +- katana/src/Constants.cpp | 2 +- katana/src/GraphicKatanaEngine.cpp | 6 +++-- katana/src/KatanaEngine.cpp | 10 +++++-- katana/src/NegociateWindow.cpp | 36 ++++++++++++------------- katana/src/PyKatanaFlags.cpp | 2 +- katana/src/SymmetricRoute.cpp | 2 +- katana/src/katana/Constants.h | 2 +- katana/src/katana/KatanaEngine.h | 2 +- 11 files changed, 37 insertions(+), 30 deletions(-) diff --git a/anabatic/src/LoadGlobalRouting.cpp b/anabatic/src/LoadGlobalRouting.cpp index f73d92ee..f3762ff4 100644 --- a/anabatic/src/LoadGlobalRouting.cpp +++ b/anabatic/src/LoadGlobalRouting.cpp @@ -3413,7 +3413,6 @@ namespace Anabatic { if (NetRoutingExtension::isAutomaticGlobalRoute(net)) { DebugSession::open( net, 144, 150 ); AutoSegment::setAnalogMode( NetRoutingExtension::isAnalog(net) ); - cerr << net << " AnalogMode:" << NetRoutingExtension::get(net) << endl; _loadNetGlobalRouting( net ); Session::revalidate(); DebugSession::close(); diff --git a/crlcore/etc/common/display.conf b/crlcore/etc/common/display.conf index 24bf85fe..2f319819 100644 --- a/crlcore/etc/common/display.conf +++ b/crlcore/etc/common/display.conf @@ -192,7 +192,7 @@ stylesTable = \ , (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 }) , (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 }) , (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4, 'threshold':0.02*scale }) - , (Drawing, 'Anabatic::GCell', { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':4, 'threshold':0.10*scale }) + , (Drawing, 'Anabatic::GCell', { 'color':'255,255,190', 'pattern':'0000000000000000', 'border':2, 'threshold':0.10*scale }) ) # ---------------------------------------------------------------------- diff --git a/documentation/UsersGuide/CMakeLists.txt b/documentation/UsersGuide/CMakeLists.txt index 73573c91..870a0f14 100644 --- a/documentation/UsersGuide/CMakeLists.txt +++ b/documentation/UsersGuide/CMakeLists.txt @@ -17,7 +17,7 @@ && latex UsersGuide && dvipdfm UsersGuide ) - add_dependencies ( doc_HTML socstyle.tex UsersGuide_LaTeX.rst UsersGuide.rst ) + add_dependencies ( doc_LaTeX socstyle.tex UsersGuide_LaTeX.rst UsersGuide.rst ) install ( DIRECTORY images/ DESTINATION ${htmlInstallDir}/images diff --git a/katana/src/Constants.cpp b/katana/src/Constants.cpp index f968d204..a946de42 100644 --- a/katana/src/Constants.cpp +++ b/katana/src/Constants.cpp @@ -32,7 +32,7 @@ namespace Katana { const Hurricane::BaseFlags Flags::LoadingStage = (1 << 28); const Hurricane::BaseFlags Flags::SlowMotion = (1 << 29); const Hurricane::BaseFlags Flags::PreRoutedStage = (1 << 30); - const Hurricane::BaseFlags Flags::SymmetricStage = (1 << 31); + const Hurricane::BaseFlags Flags::PairSymmetrics = (1 << 31); } // Anabatic namespace. diff --git a/katana/src/GraphicKatanaEngine.cpp b/katana/src/GraphicKatanaEngine.cpp index c3284830..7dff815d 100644 --- a/katana/src/GraphicKatanaEngine.cpp +++ b/katana/src/GraphicKatanaEngine.cpp @@ -256,7 +256,7 @@ namespace Katana { void GraphicKatanaEngine::_runNegociate () { KatanaEngine* katana = getForFramework( NoFlags ); - katana->runNegociate(); + katana->runNegociate( Flags::PairSymmetrics ); } @@ -277,7 +277,7 @@ namespace Katana { katana->loadGlobalRouting( Anabatic::EngineLoadGrByNet ); // Now done through Horus. //katana->runTest(); - katana->runNegociate( Flags::SymmetricStage ); + katana->runNegociate( Flags::PairSymmetrics ); //katana->runNegociate(); } } @@ -387,11 +387,13 @@ namespace Katana { , "Save routed design (temporary hack)" , std::bind(&GraphicKatanaEngine::_save,this) ); +#if NO_NEED_OF_IT_NOW _viewer->addToMenu( "placeAndRoute.katana.stepByStep.runTest" , "Katana - Run &Test" , "Run Test Program (symmetric routing of gmChamla)" , std::bind(&GraphicKatanaEngine::_runTest,this) ); +#endif } diff --git a/katana/src/KatanaEngine.cpp b/katana/src/KatanaEngine.cpp index 1bf2ed0e..a752861f 100644 --- a/katana/src/KatanaEngine.cpp +++ b/katana/src/KatanaEngine.cpp @@ -468,6 +468,7 @@ namespace Katana { void KatanaEngine::runTest () { +#if PUT_HERE_WHATEVER_YOU_WANT_TO_TEST if (getCell()->getName() != "gmchamla") throw Error( "KatanaEngine::runTest() Work only on \"gmchamla\" (loaded:\"%s\")." , getString(getCell()->getName()).c_str() @@ -482,6 +483,7 @@ namespace Katana { setSymmetricPair( getCell(), "ampp_4" , "ampn_4" ); setSymmetricPair( getCell(), "ampp_2" , "ampn_2" ); setSymmetricPair( getCell(), "ampp_1" , "ampn_1" ); +#endif } void KatanaEngine::printCompletion () const @@ -674,9 +676,13 @@ namespace Katana { _routingPlanes[depth]->destroy(); } _routingPlanes.clear(); + + while ( not _symmetrics.empty() ) { + auto element = _symmetrics.begin(); - //for ( auto symmetric : _symmetrics ) delete symmetric.second; - _symmetrics.clear(); + if (element->first == element->second->getNet()) delete element->second; + _symmetrics.erase( element->first ); + } Session::close(); } diff --git a/katana/src/NegociateWindow.cpp b/katana/src/NegociateWindow.cpp index a779854c..20d4b396 100644 --- a/katana/src/NegociateWindow.cpp +++ b/katana/src/NegociateWindow.cpp @@ -443,22 +443,6 @@ namespace Katana { while ( not _eventQueue.empty() and not isInterrupted() ) { RoutingEvent* event = _eventQueue.pop(); - if (tty::enabled()) { - cmess2 << " " << tty::cr; - cmess2.flush (); - } else { - cmess2 << " getEventLevel() << ":" << event->getPriority() << "> " - << event->getSegment() - << endl; - cmess2.flush(); - } - if (ofprofile.is_open()) { size_t depth = _katana->getConfiguration()->getLayerDepth( event->getSegment()->getLayer() ); if (depth < 6) { @@ -477,6 +461,22 @@ namespace Katana { event->process( _eventQueue, _eventHistory, _eventLoop ); count++; + if (tty::enabled()) { + cmess2 << " " << tty::cr; + cmess2.flush (); + } else { + cmess2 << " getEventLevel() << ":" << event->getPriority() << "> " + << event->getSegment() + << endl; + cmess2.flush(); + } + //if (count and not (count % 500)) { // _pack( count, false ); //} @@ -574,8 +574,8 @@ namespace Katana { Session::getKatanaEngine()->_check( overlaps, "after _createRouting(GCell*)" ); #endif - if (flags & Flags::SymmetricStage) { - _katana->runSymmetricRouter(); + if (flags & Flags::PairSymmetrics) { + _katana->pairSymmetrics(); Session::revalidate(); } diff --git a/katana/src/PyKatanaFlags.cpp b/katana/src/PyKatanaFlags.cpp index 658472da..ce291ab1 100644 --- a/katana/src/PyKatanaFlags.cpp +++ b/katana/src/PyKatanaFlags.cpp @@ -95,7 +95,7 @@ extern "C" { LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::NoFlags ,"NoFlags" ); LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::SlowMotion ,"SlowMotion" ); LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::PreRoutedStage,"PreRoutedStage"); - LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::SymmetricStage,"SymmetricStage"); + LoadObjectConstant(PyTypeKatanaFlags.tp_dict,(uint64_t)Katana::Flags::PairSymmetrics,"PairSymmetrics"); } diff --git a/katana/src/SymmetricRoute.cpp b/katana/src/SymmetricRoute.cpp index 1818b58c..aa7afd2f 100644 --- a/katana/src/SymmetricRoute.cpp +++ b/katana/src/SymmetricRoute.cpp @@ -392,7 +392,7 @@ namespace Katana { using namespace std; - void KatanaEngine::runSymmetricRouter () + void KatanaEngine::pairSymmetrics () { for ( Net* net : getCell()->getNets() ) { if (not NetRoutingExtension::isSymmetric(net)) continue; diff --git a/katana/src/katana/Constants.h b/katana/src/katana/Constants.h index 016699aa..c326dbcd 100644 --- a/katana/src/katana/Constants.h +++ b/katana/src/katana/Constants.h @@ -37,7 +37,7 @@ namespace Katana { static const Hurricane::BaseFlags LoadingStage; static const Hurricane::BaseFlags SlowMotion; static const Hurricane::BaseFlags PreRoutedStage; - static const Hurricane::BaseFlags SymmetricStage; + static const Hurricane::BaseFlags PairSymmetrics; public: inline Flags ( uint64_t ); inline Flags ( const Super& ); diff --git a/katana/src/katana/KatanaEngine.h b/katana/src/katana/KatanaEngine.h index 9ae57127..97f97dff 100644 --- a/katana/src/katana/KatanaEngine.h +++ b/katana/src/katana/KatanaEngine.h @@ -114,9 +114,9 @@ namespace Katana { void setFixedPreRouted (); void digitalInit (); void analogInit (); + void pairSymmetrics (); void runNegociate ( Flags flags=Flags::NoFlags ); void runGlobalRouter (); - void runSymmetricRouter (); void runTest (); virtual void finalizeLayout (); void _runKatanaInit ();