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.
This commit is contained in:
Jean-Paul Chaput 2020-08-07 12:37:26 +02:00
parent 5e85757dea
commit 77a41674bc
1 changed files with 10 additions and 2 deletions

View File

@ -405,7 +405,15 @@ namespace Anabatic {
const vector<AutoSegment*>& 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 );
}
}