Bug in KatanaEngine::annotateGlobalGraph(), bad edge capacity computation.
* Bug: In KatanaEngine::annotateGlobalGraph(), overlapping blockages or fixed segments where taken into account as separate ones. This was making the edge capacity reservation too high. Creating false zero-capacity edges at some points. Didn't show up until now because we did not have overlaps.
This commit is contained in:
parent
7a7a3b9f1b
commit
e0bae89a81
|
@ -462,12 +462,18 @@ namespace Katana {
|
||||||
if (rp->getLayerGauge()->getType() == Constant::PinOnly) continue;
|
if (rp->getLayerGauge()->getType() == Constant::PinOnly) continue;
|
||||||
if (rp->getLayerGauge()->getDepth() > getConfiguration()->getAllowedDepth()) continue;
|
if (rp->getLayerGauge()->getDepth() > getConfiguration()->getAllowedDepth()) continue;
|
||||||
|
|
||||||
size_t tracksSize = rp->getTracksSize();
|
int elementCapacity = 1;
|
||||||
|
size_t tracksSize = rp->getTracksSize();
|
||||||
for ( size_t itrack=0 ; itrack<tracksSize ; ++itrack ) {
|
for ( size_t itrack=0 ; itrack<tracksSize ; ++itrack ) {
|
||||||
Track* track = rp->getTrackByIndex( itrack );
|
Track* track = rp->getTrackByIndex( itrack );
|
||||||
|
DbU::Unit axis = track->getAxis();
|
||||||
|
Flags side = (track->getDirection() == Flags::Vertical) ? Flags::NorthSide
|
||||||
|
: Flags::EastSide;
|
||||||
|
Point source;
|
||||||
|
Point target;
|
||||||
cdebug_log(159,0) << "Capacity from: " << track << endl;
|
cdebug_log(159,0) << "Capacity from: " << track << endl;
|
||||||
|
|
||||||
|
Interval uspan;
|
||||||
for ( size_t ielement=0 ; ielement<track->getSize() ; ++ielement ) {
|
for ( size_t ielement=0 ; ielement<track->getSize() ; ++ielement ) {
|
||||||
TrackElement* element = track->getSegment( ielement );
|
TrackElement* element = track->getSegment( ielement );
|
||||||
|
|
||||||
|
@ -482,23 +488,55 @@ namespace Katana {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Segment* segment = element->getSegment();
|
cdebug_log(159,0) << "Capacity from: " << element << ":" << elementCapacity << endl;
|
||||||
Flags side = Flags::EastSide;
|
Segment* segment = element->getSegment();
|
||||||
DbU::Unit axis = track->getAxis();
|
Interval segmentUSpan;
|
||||||
Point source = segment->getSourcePosition();
|
|
||||||
Point target = segment->getTargetPosition();
|
source = segment->getSourcePosition();
|
||||||
|
target = segment->getTargetPosition();
|
||||||
if (track->getDirection() == Flags::Vertical) {
|
if (track->getDirection() == Flags::Vertical)
|
||||||
side = Flags::NorthSide;
|
segmentUSpan = Interval( source.getY(), target.getY() );
|
||||||
source.setX( axis );
|
else
|
||||||
target.setX( axis );
|
segmentUSpan = Interval( source.getX(), target.getX() );
|
||||||
|
|
||||||
|
if (uspan.isEmpty()) {
|
||||||
|
uspan = segmentUSpan;
|
||||||
|
continue;
|
||||||
} else {
|
} else {
|
||||||
source.setY( axis );
|
if (uspan.contains(segmentUSpan)) continue;
|
||||||
target.setY( axis );
|
if (uspan.intersect(segmentUSpan)) {
|
||||||
|
uspan.merge( segmentUSpan );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int elementCapacity = 1;
|
if (track->getDirection() == Flags::Vertical) {
|
||||||
cdebug_log(159,0) << "Capacity from: " << element << ":" << elementCapacity << endl;
|
source = Point( axis, uspan.getVMin() );
|
||||||
|
target = Point( axis, uspan.getVMax() );
|
||||||
|
} else {
|
||||||
|
source = Point( uspan.getVMin(), axis );
|
||||||
|
target = Point( uspan.getVMax(), axis );
|
||||||
|
}
|
||||||
|
|
||||||
|
GCellsUnder gcells = getGCellsUnder( source, target );
|
||||||
|
if (not gcells->empty()) {
|
||||||
|
for ( size_t i=0 ; i<gcells->size()-1 ; ++i ) {
|
||||||
|
Edge* edge = gcells->gcellAt(i)->getEdgeAt( side, axis );
|
||||||
|
edge->reserveCapacity( elementCapacity );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uspan = segmentUSpan;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (not uspan.isEmpty()) {
|
||||||
|
if (track->getDirection() == Flags::Vertical) {
|
||||||
|
source = Point( axis, uspan.getVMin() );
|
||||||
|
target = Point( axis, uspan.getVMax() );
|
||||||
|
} else {
|
||||||
|
source = Point( uspan.getVMin(), axis );
|
||||||
|
target = Point( uspan.getVMax(), axis );
|
||||||
|
}
|
||||||
|
|
||||||
GCellsUnder gcells = getGCellsUnder( source, target );
|
GCellsUnder gcells = getGCellsUnder( source, target );
|
||||||
if (not gcells->empty()) {
|
if (not gcells->empty()) {
|
||||||
|
|
Loading…
Reference in New Issue