From dbf87493ebe4aad1f850243f846ef07e1896d520 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 3 Oct 2014 16:04:12 +0200 Subject: [PATCH] In Kite, Segments where not rescheduled in some cases of moveUp(). * Bug: In Kite, in TrackSegment::_postDogleg() when called through TrackSegment::moveUp(), if no dogleg are created, that is the segment is "pivoted up" (for example a M3 connected to only M4 that is pivoted to M5), the segment was *not* rescheduled as it ough to be. The end result was a M5 in a M3 track... * Change: In Kite, in Track::checkOverlaps() in case of further problems, also check that TrackSegments and Track are in the same layer. --- kite/src/Track.cpp | 10 +++++++++- kite/src/TrackSegment.cpp | 10 ++++++---- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/kite/src/Track.cpp b/kite/src/Track.cpp index dbad668a..623c76bb 100644 --- a/kite/src/Track.cpp +++ b/kite/src/Track.cpp @@ -644,6 +644,8 @@ namespace Kite { void Track::doReorder () { + ltrace(200) << "Track::doReorder() " << this << endl; + if (not _segmentsValid ) { std::sort ( _segments.begin(), _segments.end(), SegmentCompare() ); for ( size_t i=0 ; i < _segments.size() ; i++ ) { @@ -665,10 +667,16 @@ namespace Kite { size_t j = 0; for ( size_t i=0 ; i<_segments.size()-1 ; i++ ) { + if (not _segments[i]->isBlockage() and (_segments[i]->getLayer() != getLayer()) ) { + cerr << Error( " Track vs. Segment Layer discrepency:\n %s\n %s " + , getString(this).c_str() + , getString(_segments[i]).c_str() ) << endl; + } + if ( _segments[i]->getNet() == _segments[i+1]->getNet() ) { if ( _segments[i]->getSourceU() == _segments[i+1]->getSourceU() ) { if ( _segments[i]->getTargetU() < _segments[i+1]->getTargetU() ) { - cerr << Error(" Invalid sorting length order in %s:\n%s \n%s " + cerr << Error(" Invalid sorting length order in %s:\n %s\n %s " ,getString(this).c_str() ,getString(_segments[i ]).c_str() ,getString(_segments[i+1]).c_str()) << endl; diff --git a/kite/src/TrackSegment.cpp b/kite/src/TrackSegment.cpp index d9f9cd28..ef16eb9a 100644 --- a/kite/src/TrackSegment.cpp +++ b/kite/src/TrackSegment.cpp @@ -765,20 +765,20 @@ namespace Kite { segments[i+0]->getDataNegociate()->resetRipupCount(); //segments[i+0]->getDataNegociate()->resetStateCount(); segments[i+0]->getDataNegociate()->setState( DataNegociate::RipupPerpandiculars ); - doglegLevel = segments[i+0]->getDoglegLevel() + 1; - segments[i+0]->setDoglegLevel( doglegLevel ); + doglegLevel = segments[i+0]->getDoglegLevel(); + segments[i+0]->setDoglegLevel( doglegLevel + (segments[i]->isLocal()?1:0) ); ltrace(200) << "Looking up new perpand: " << doglegs[i+1] << endl; segments.push_back( Session::getNegociateWindow()->createTrackSegment(doglegs[i+1],0) ); segments[i+1]->setFlags( TElemSourceDogleg|TElemTargetDogleg ); - segments[i+1]->setDoglegLevel( doglegLevel ); + segments[i+1]->setDoglegLevel( doglegLevel + 1 ); ltrace(200) << "Looking up new parallel: " << doglegs[i+2] << endl; segments.push_back( Session::getNegociateWindow()->createTrackSegment(doglegs[i+2],0) ); segments[i+2]->setFlags( TElemSourceDogleg ); segments[i+2]->getDataNegociate()->resetStateCount(); segments[i+2]->getDataNegociate()->setState( segments[i+0]->getDataNegociate()->getState() ); - segments[i+2]->setDoglegLevel( doglegLevel ); + segments[i+2]->setDoglegLevel( doglegLevel + (segments[i]->isLocal()?1:0) ); segments[i+0]->getDataNegociate()->setChildSegment( segments[i+2] ); @@ -802,6 +802,8 @@ namespace Kite { ltrace(200) << "[" << (i/3) << ":" << i << "] " << segPart << ": " << segments[i] << endl; } + } else { + reschedule( 1 ); } ltraceout(200);