Bug corrections in Katabatic & Kite, bad bound index computation.

* In Katabatic, in GCellConfiguration, added support to 3G_2M2 (generic).
* In Katabatic, in GCellGrid, in getUSide() we were not using the correct
    contant set (Constant namespace instead of Kb...) so the size returned
    was always X. It doesn't show if the chip is square...
* In Kite, in Track::getBeginIndex(), if the position requested was enclosed
    in same net segments, we were going one index too far in the "previous"
    direction.
* In Kite, in Track::getOverlapBounds() we where going one index too far
    in the "next" direction while computing the "end" index.
This commit is contained in:
Jean-Paul Chaput 2016-04-13 18:42:55 +02:00
parent 506ccbd589
commit 798d1edb34
5 changed files with 19 additions and 10 deletions

View File

@ -140,8 +140,10 @@ namespace Katabatic {
Interval side;
switch ( direction ) {
default:
case Constant::Horizontal: side = Interval(_boundingBox.getXMin(),_boundingBox.getXMax()); break;
case Constant::Vertical: side = Interval(_boundingBox.getYMin(),_boundingBox.getYMax()); break;
cerr << Error( "GCellGrid::getUSide(): Unknown direction flag \"%i\""
, direction ) << endl;
case KbHorizontal: side = Interval(_boundingBox.getXMin(),_boundingBox.getXMax()); break;
case KbVertical: side = Interval(_boundingBox.getYMin(),_boundingBox.getYMax()); break;
}
return side;
}

View File

@ -715,6 +715,7 @@ namespace {
, Conn_3G_3M1 = CONNEXITY_VALUE( 3, 3, 0, 0, 0 , 0 )
, Conn_3G_4M1 = CONNEXITY_VALUE( 3, 4, 0, 0, 0 , 0 )
, Conn_3G_1M2 = CONNEXITY_VALUE( 3, 0, 1, 0, 0 , 0 )
, Conn_3G_2M2 = CONNEXITY_VALUE( 3, 0, 2, 0, 0 , 0 )
, Conn_3G_1M3 = CONNEXITY_VALUE( 3, 0, 0, 1, 0 , 0 )
, Conn_3G_2M3 = CONNEXITY_VALUE( 3, 0, 0, 2, 0 , 0 )
, Conn_3G_3M3 = CONNEXITY_VALUE( 3, 0, 0, 3, 0 , 0 )
@ -967,7 +968,8 @@ namespace {
case Conn_2G_2M2:
case Conn_2G_3M2:
case Conn_2G_4M2:
case Conn_3G_1M2: _do_xG_xM2(); break;
case Conn_3G_1M2:
case Conn_3G_2M2: _do_xG_xM2(); break;
case Conn_2G_1M3:
case Conn_2G_2M3:
case Conn_2G_3M3:

View File

@ -234,14 +234,17 @@ namespace Kite {
// I guess this has been written for the case of overlapping segments from the same
// net, we find the first one of the overlapped sets. But what if they are not overlapping
// but still from the same net?
if (begin < _segments.size())
for ( ; (begin > 0) and (_segments[begin-1]->getNet() == _segments[begin]->getNet()) ; --begin );
size_t sameNetDelta = 0;
if (begin < _segments.size()) {
for ( ; (begin > 0) and (_segments[begin-1]->getNet() == _segments[begin]->getNet())
; --begin, ++sameNetDelta );
}
state = 0;
if ( (begin == 0) and (position < _segments[0]->getSourceU()) ) {
state = BeforeFirstElement;
} else {
if (begin) begin -= 1;
if (begin and not sameNetDelta) begin -= 1;
size_t usedBegin = begin;
Interval usedInterval = getOccupiedInterval( usedBegin );
@ -272,9 +275,11 @@ namespace Kite {
getOccupiedInterval( begin );
getBeginIndex( interval.getVMax(), end, iState );
while ( end < _segments.size() ) {
if (_segments[end++]->getSourceU() >= interval.getVMax()) break;
for ( ; end < _segments.size() ; ++end ) {
if (_segments[end]->getSourceU() >= interval.getVMax()) break;
}
ltrace(190) << "Track::getOverlapBounds(): begin:" << begin << " end:" << end << endl;
}

View File

@ -8,7 +8,7 @@
// | K i t e - D e t a i l e d R o u t e r |
// | |
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
// | C++ Module : "./TrackFixedSegment.cpp" |
// +-----------------------------------------------------------------+

View File

@ -8,7 +8,7 @@
// | K i t e - D e t a i l e d R o u t e r |
// | |
// | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
// | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== |
// | C++ Header : "./kite/Track.h" |
// +-----------------------------------------------------------------+