From 77a41674bc1587aa508322e20c9e381546a9fd07 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 7 Aug 2020 12:37:26 +0200 Subject: [PATCH] Shift dogleg created from EAST pins (M2) from one P-Pitch left. * Bug: In Anabatic::AutoHorizontal::_slacken(), when creating the target dogleg, if the target was a fixed pin (M2) on the east side, the vertical was put righ on the side, which is *not* an allowed track. The exact east side is not covered by a vertical track (this comes from a policy adpopted for the GCell, to avoid overlapping tracks on the border). So we got an error message when katana tries to bind it to a track. Now shift one perpandicular pitch to the *left* for the EAST pins. --- anabatic/src/AutoHorizontal.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/anabatic/src/AutoHorizontal.cpp b/anabatic/src/AutoHorizontal.cpp index d98fcd9f..1fba55ca 100644 --- a/anabatic/src/AutoHorizontal.cpp +++ b/anabatic/src/AutoHorizontal.cpp @@ -405,7 +405,15 @@ namespace Anabatic { const vector& doglegs = Session::getDoglegs(); if (targetSlackened and (doglegs.size() >= 2)) { - cdebug_log(149,0) << "AutoHorizontal::_slacken(): Target @" << DbU::getValueString(targetPosition) << endl; + GCell* targetGCell = target->getGCell(); + Box constraintBox = target->getConstraintBox(); + cdebug_log(149,0) << "slacken from Target @" << DbU::getValueString(targetPosition) << endl; + + if (targetPosition >= targetGCell->getXMax()) { + cdebug_log(149,0) << "On the rigthmost track, adjust of one P-pitch to the left." << endl; + targetPosition -= getPPitch(); + constraintBox.inflate( getPPitch(), 0, 0, 0 ); + } doglegs[doglegs.size()-2]->setAxis( targetPosition ); success = true; @@ -413,7 +421,7 @@ namespace Anabatic { cdebug_log(149,0) << "Fixing on target terminal contact: " << doglegs[doglegs.size()-2]->getAutoTarget() << endl; //doglegs[doglegs.size()-2]->getAutoTarget()->setFlags( CntFixed ); - doglegs[doglegs.size()-2]->getAutoTarget()->setConstraintBox( target->getConstraintBox() ); + doglegs[doglegs.size()-2]->getAutoTarget()->setConstraintBox( constraintBox ); doglegs[doglegs.size()-2]->getAutoTarget()->setFlags( CntUserNativeConstraints ); } }