From 444cc777e53290dc0e319150dfe11bd2e8563b3a Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 17 Apr 2021 13:03:15 +0200 Subject: [PATCH] Fix topological bug in NetBuilderHV::_do_xG_1PinM2(). * Bug: In NetBuilderHV::_do_xG_1PinM2(), when the M2 pin is on the *east* side and there are three globals, we must swap htee1 & htee2. Otherwise, we the SW/NE contacts do not have the right numbers of free segments attach. * New: In AnabaticEngine::cleanupGlobal(), check that no global component is left behind, sure sign that the global to detailed building went wrong. --- anabatic/src/AnabaticEngine.cpp | 11 +++++++++++ anabatic/src/NetBuilderHV.cpp | 3 +++ 2 files changed, 14 insertions(+) diff --git a/anabatic/src/AnabaticEngine.cpp b/anabatic/src/AnabaticEngine.cpp index c0e8088a..3b7c3fb1 100644 --- a/anabatic/src/AnabaticEngine.cpp +++ b/anabatic/src/AnabaticEngine.cpp @@ -1074,6 +1074,17 @@ namespace Anabatic { UpdateSession::open(); for ( GCell* gcell : _gcells ) gcell->cleanupGlobal(); UpdateSession::close(); + + for ( Net* net : getCell()->getNets() ) { + for ( Component* component : net->getComponents() ) { + if (getConfiguration()->isGLayer(component->getLayer())) { + cerr << Error( "AnabaticEngine::cleanupGlobal(): Remaining global routing,\n" + " %s" + , getString(component).c_str() + ) << endl; + } + } + } } diff --git a/anabatic/src/NetBuilderHV.cpp b/anabatic/src/NetBuilderHV.cpp index 43ea958d..5dd8e2a2 100644 --- a/anabatic/src/NetBuilderHV.cpp +++ b/anabatic/src/NetBuilderHV.cpp @@ -863,6 +863,9 @@ namespace Anabatic { AutoContact* htee2 = AutoContactHTee::create( getGCell(), getNet(), Session::getContactLayer(1) ); AutoSegment::create( htee1, htee2, Flags::Horizontal ); + if (pinDir == Pin::AccessDirection::EAST) + std::swap( htee1, htee2 ); + setSouthWestContact( htee1 ); setNorthEastContact( htee2 ); }