Fix bad computation of gap in Tracks in some special cases.

* Bug: In Track::repair(), when closing a same net gap, the amount the
    "right" segment duSource must be shifted left was incorrectly
    computed in some instances.
      The previous calculation was assuming that the right edge of the
    gap was at the exact same position than the source extension.
    But when there is a non-preferred direction connected to it, this
    is wrong. Now compute the delta accounting for a difference
    between the right edge of the gap and the source extension.
This commit is contained in:
Jean-Paul Chaput 2021-11-26 18:59:46 +01:00
parent 6a3c9d1d54
commit d8218d0698
1 changed files with 6 additions and 3 deletions

View File

@ -1003,7 +1003,7 @@ namespace Katana {
uint32_t Track::repair () const
{
//if ((getIndex() == 6428) and isVertical()) DebugSession::open( 150, 160 );
if ((getIndex() == 1011) and isHorizontal()) DebugSession::open( 150, 160 );
cdebug_log(159,0) << "Track::repair() " << this << endl;
if (_segments.empty()) {
@ -1084,8 +1084,11 @@ namespace Katana {
if (segment->getSourcePosition() < first->getSourcePosition())
first = segment;
}
spacing += first->getSourceU() - gapsetCurr.sourceU(j+1);
cdebug_log(159,0) << "spacing:" << DbU::getValueString(spacing) << " " << first << endl;
cdebug_log(159,0) << "duSource:" << DbU::getValueString(first->getDuSource()) << endl;
first->setDuSource( first->getDuSource() - spacing - minSpacing/2 );
//first->setDuSource( first->getDuSource() - spacing - minSpacing/2 );
first->setDuSource( first->getDuSource() - spacing );
}
++gaps;
cerr << Warning( " Track::repair(): Closing same net gap in %s near:\n %s"
@ -1119,7 +1122,7 @@ namespace Katana {
if (spacing > 10*getLayerGauge()->getPitch())
fillHole( lastTargetU, getMax() );
//if ((getIndex() == 6428) and isVertical()) DebugSession::close();
if ((getIndex() == 1011) and isHorizontal()) DebugSession::close();
return gaps;
}