diff --git a/cumulus/src/tools/px2mpx.py b/cumulus/src/tools/px2mpx.py index ed90f33b..47ac4dd2 100755 --- a/cumulus/src/tools/px2mpx.py +++ b/cumulus/src/tools/px2mpx.py @@ -121,6 +121,8 @@ def px2mpx ( editor, pxCell ): raise ErrorMessage( 3, 'px2mpx.px2mpx(): Mandatory pxCell argument is None.' ) mpxCell = None + print '\nProcessing', pxCell + UpdateSession.open() try: if pxCell.getName() != 'padreal': @@ -178,8 +180,9 @@ def px2mpx ( editor, pxCell ): ) elif isinstance(component,Horizontal): dL, dW, mW = getDeltas( layer ) - dLLeft = dL - dLRight = dL + dLLeft = dL + dLRight = dL + skipComponent = False bb = component.getBoundingBox() if component.getSourceX() > component.getTargetX(): component.invert() @@ -198,12 +201,16 @@ def px2mpx ( editor, pxCell ): print ' Shrink right.' dLRight = dL - DbU.fromLambda( 1.5 ) + if layer.getName()[-1] == '4' and state == AllSpan: + print ' Skipping component.' + skipComponent = True + width = mW if component.getWidth() > mW: width = component.getWidth()*2 + dW #print DbU.toLambda(bb.getWidth()), DbU.toLambda( dLLeft-dLRight) - if bb.getWidth()*2 > abs(dLLeft+dLRight): + if bb.getWidth()*2 > abs(dLLeft+dLRight) and not skipComponent: dupComponent = Horizontal.create( mpxNet , layer , component.getY ()*2 @@ -212,11 +219,14 @@ def px2mpx ( editor, pxCell ): , component.getDxTarget()*2 + dLRight ) else: - print ' Horizontal component too small, not converted' + print ' Horizontal component too small *or* skipped, not converted' elif isinstance(component,Vertical): dL, dW, mW = getDeltas( component.getLayer() ) - dX = 0 + dLTop = dL + dLBottom = dL + dX = 0 + skipComponent = False if component.getSourceY() > component.getTargetY(): component.invert() if isinstance(layer,RegularLayer): @@ -237,7 +247,14 @@ def px2mpx ( editor, pxCell ): dX = 0 dW += DbU.fromLambda( -4.0 ) - if dW < component.getWidth(): + if layer.getName()[-1] == '5': + if state == AllSpan: + print ' Skipping component.' + skipComponent = True + else: + dLTop = DbU.fromLambda(120.0) - component.getDyTarget()*2 + + if dW < component.getWidth() and not skipComponent: width = mW if component.getWidth() > mW: width = component.getWidth()*2 + dW @@ -246,11 +263,11 @@ def px2mpx ( editor, pxCell ): , layer , component.getX ()*2 + dX , width - , component.getDySource()*2 - dL - , component.getDyTarget()*2 + dL + , component.getDySource()*2 - dLBottom + , component.getDyTarget()*2 + dLTop ) else: - print ' Vertical component too small, not converted' + print ' Vertical component too small *or* skipped, not converted' else: print '[WARNING] Unchanged component:', component diff --git a/katabatic/src/AutoContactTurn.cpp b/katabatic/src/AutoContactTurn.cpp index 35f1fbb8..369beacb 100644 --- a/katabatic/src/AutoContactTurn.cpp +++ b/katabatic/src/AutoContactTurn.cpp @@ -136,7 +136,8 @@ namespace Katabatic { } _vertical1 = static_cast(segment); } - unsetFlags( CntInvalidatedCache ); + + if (_horizontal1 and _vertical1) unsetFlags( CntInvalidatedCache ); } diff --git a/katabatic/src/AutoSegment.cpp b/katabatic/src/AutoSegment.cpp index fa85c54a..fd0f0d7c 100644 --- a/katabatic/src/AutoSegment.cpp +++ b/katabatic/src/AutoSegment.cpp @@ -534,16 +534,9 @@ namespace Katabatic { DbU::Unit AutoSegment::getPPitch () const { - DbU::Unit topPPitch = getPitch(); - DbU::Unit bottomPPitch = topPPitch; - unsigned int depth = getDepth(); - - if (depth < Session::getDepth()) { - topPPitch = Session::getPitch( depth + ((_flags & SegSpinTop) ? 1 : 0) ); - } - if (depth > 0) { - bottomPPitch = Session::getPitch( depth - ((_flags & SegSpinBottom) ? 1 : 0) ); - } + unsigned int depth = getDepth(); + DbU::Unit topPPitch = Session::getPitch( depth + ( ((_flags & SegSpinTop) and (depth+1 < Session::getDepth())) ? 1 : 0) ); + DbU::Unit bottomPPitch = Session::getPitch( depth - ( ((_flags & SegSpinBottom) and (depth > 0))? 1 : 0) ); return std::max( topPPitch, bottomPPitch ); } diff --git a/kite/src/SegmentFsm.cpp b/kite/src/SegmentFsm.cpp index df061ac8..2573da50 100644 --- a/kite/src/SegmentFsm.cpp +++ b/kite/src/SegmentFsm.cpp @@ -787,10 +787,10 @@ namespace Kite { } otherNet = other->getNet(); otherOverlap = other->getCanonicalInterval(); - otherIsGlobal = other->isGlobal() or other->isBlockage(); + otherIsGlobal = other->isGlobal() or other->isBlockage() or other->isFixed(); } else { otherOverlap.merge(other->getCanonicalInterval()); - otherIsGlobal = otherIsGlobal or other->isGlobal() or other->isBlockage(); + otherIsGlobal = otherIsGlobal or other->isGlobal() or other->isBlockage() or other->isFixed(); } } if (not otherOverlap.isEmpty()) {