diff --git a/anabatic/src/NetBuilder.cpp b/anabatic/src/NetBuilder.cpp index 7d53cc08..e62357f4 100644 --- a/anabatic/src/NetBuilder.cpp +++ b/anabatic/src/NetBuilder.cpp @@ -649,8 +649,12 @@ namespace Anabatic { case Conn_1G_2M1_1PinM2: _do_1G_xM1_1PinM2(); break; case Conn_2G_1M1_1PinM2: case Conn_2G_2M1_1PinM2: _do_2G_xM1_1PinM2(); break; - case Conn_2G_1M1_1PinM3: _do_2G_1M1_1PinM3(); break; - case Conn_3G_1M1_1PinM3: _do_3G_1M1_1PinM3(); break; + case Conn_2G_1M1_1PinM3: + case Conn_2G_2M1_1PinM3: + case Conn_2G_3M1_1PinM3: _do_2G_xM1_1PinM3(); break; + case Conn_3G_1M1_1PinM3: + case Conn_3G_2M1_1PinM3: + case Conn_3G_3M1_1PinM3: _do_3G_xM1_1PinM3(); break; case Conn_1G_1M1_1M2: _do_xG_1M1_1M2 (); break; case Conn_1G_1M1_1M3: _do_1G_xM1 (); break; case Conn_2G_1M1_1M2: _do_xG_1M1_1M2 (); break; @@ -1117,16 +1121,16 @@ namespace Anabatic { } - bool NetBuilder::_do_2G_1M1_1PinM3 () + bool NetBuilder::_do_2G_xM1_1PinM3 () { - throw Error ( "%s::_do_2G_1M1_1PinM3() method *not* reimplemented from base class.", getTypeName().c_str() ); + throw Error ( "%s::_do_2G_xM1_1PinM3() method *not* reimplemented from base class.", getTypeName().c_str() ); return false; } - bool NetBuilder::_do_3G_1M1_1PinM3 () + bool NetBuilder::_do_3G_xM1_1PinM3 () { - throw Error ( "%s::_do_3G_1M1_1PinM3() method *not* reimplemented from base class.", getTypeName().c_str() ); + throw Error ( "%s::_do_3G_xM1_1PinM3() method *not* reimplemented from base class.", getTypeName().c_str() ); return false; } diff --git a/anabatic/src/NetBuilderHV.cpp b/anabatic/src/NetBuilderHV.cpp index f8f9583e..54a3285d 100644 --- a/anabatic/src/NetBuilderHV.cpp +++ b/anabatic/src/NetBuilderHV.cpp @@ -906,23 +906,71 @@ namespace Anabatic { } - bool NetBuilderHV::_do_3G_1M1_1PinM3 () + bool NetBuilderHV::_do_2G_xM1_1PinM3 () { - cdebug_log(145,1) << getTypeName() << "::_do_3G_1M1_1PinM3() [Managed Configuration - Optimized] " << getTopology() << endl; + cdebug_log(145,1) << getTypeName() << "::_do_2G_xM1_1PinM3() [Managed Configuration - Optimized] " << getTopology() << endl; - RoutingPad* rpM1 = NULL; RoutingPad* pinM3 = NULL; AutoContact* pinContact = NULL; AutoContact* dummy = NULL; + sortRpByX( getRoutingPads(), NoFlags ); // increasing X. + + vector rpsM1; for ( RoutingPad* rp : getRoutingPads() ) { if (dynamic_cast(rp->getOccurrence().getEntity())) pinM3 = rp; - else rpM1 = rp; + else rpsM1.push_back( rp ); + } + + for ( size_t i=1 ; i rpsM1; + for ( RoutingPad* rp : getRoutingPads() ) { + if (dynamic_cast(rp->getOccurrence().getEntity())) pinM3 = rp; + else rpsM1.push_back( rp ); + } + + for ( size_t i=1 ; i(rp->getOccurrence().getEntity())) pinM3 = rp; - else rpM1 = rp; - } - - doRp_AutoContacts( getGCell(), pinM3, pinContact, dummy, NoFlags ); - - AutoContact* m1contact = doRp_Access( getGCell(), rpM1, HAccess ); - - AutoContact* vtee1 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) ); - AutoSegment::create( m1contact , vtee1, Flags::Horizontal ); - AutoSegment::create( pinContact, vtee1, Flags::Vertical ); - - AutoContact* vtee2 = AutoContactVTee::create( getGCell(), getNet(), Session::getContactLayer(1) ); - AutoSegment::create( vtee1, vtee2, Flags::Vertical ); - - setBothCornerContacts( vtee2 ); - - cdebug_tabw(145,-1); - return true; - } - - bool NetBuilderHV::_do_1G_xM1_1PinM2 () { cdebug_log(145,1) << getTypeName() << "::_do_1G_xM1_1PinM2() [Managed Configuration - Optimized] " << getTopology() << endl; @@ -1004,6 +1020,12 @@ namespace Anabatic { if (dynamic_cast(rp->getOccurrence().getEntity())) pinM2 = rp; else rpsM1.push_back( rp ); } + + for ( size_t i=1 ; i