Fix various bugs in the RoutingPad stack creation/positionning.
* Bug: In Cumulus/plugins.block.configuration.GaugeConf.rpAcces(), start building the stack of contacts + short segments straps from the layer of the RoutingPad and *not* from the first layer of the RoutinhGauge. * Bug: In Cumulus/plugins.block.configuration.GaugeConf.setStackPosition(), Only align in the RoutingLayer gauge direction of the top layer of the stack. For example, METAL2(H) will be y aligned or METAL3(V) will be x aligned. * Bug: In Cumulus/plugins.chip.powerplane.Builder._connectClock(), forgot to call expandMinArea() on the pinRp contact stack.
This commit is contained in:
parent
b9c6b5dd80
commit
5311050438
|
@ -280,12 +280,12 @@ class GaugeConf ( object ):
|
||||||
return segment
|
return segment
|
||||||
|
|
||||||
def rpAccess ( self, rp, flags ):
|
def rpAccess ( self, rp, flags ):
|
||||||
trace( 550, ',+', '\t_rpAccess() %s\n' % str(rp) )
|
trace( 550, ',+', '\tGaugeConf.rpAccess() {}\n'.format(rp) )
|
||||||
|
startDepth = self.routingGauge.getLayerDepth( rp.getOccurrence().getEntity().getLayer() )
|
||||||
|
trace( 550, '\tlayer:{} startDepth:{}\n'.format(rp.getOccurrence().getEntity().getLayer(),startDepth) )
|
||||||
if self._rpToAccess.has_key(rp):
|
if self._rpToAccess.has_key(rp):
|
||||||
trace( 550, '-' )
|
trace( 550, '-' )
|
||||||
return self._rpToAccess[rp]
|
return self._rpToAccess[rp]
|
||||||
|
|
||||||
if flags & GaugeConf.DeepDepth:
|
if flags & GaugeConf.DeepDepth:
|
||||||
hdepth = self.horizontalDeepDepth
|
hdepth = self.horizontalDeepDepth
|
||||||
vdepth = self.verticalDeepDepth
|
vdepth = self.verticalDeepDepth
|
||||||
|
@ -308,30 +308,37 @@ class GaugeConf ( object ):
|
||||||
yoffset = 0
|
yoffset = 0
|
||||||
if flags & GaugeConf.OffsetBottom1: yoffset = 1
|
if flags & GaugeConf.OffsetBottom1: yoffset = 1
|
||||||
if flags & GaugeConf.OffsetTop1: yoffset = -1
|
if flags & GaugeConf.OffsetTop1: yoffset = -1
|
||||||
|
if startDepth == 0:
|
||||||
contact1 = Contact.create( rp, self._routingGauge.getContactLayer(0), 0, 0 )
|
contact1 = Contact.create( rp, self._routingGauge.getContactLayer(0), 0, 0 )
|
||||||
midSliceY = contact1.getY() - (contact1.getY() % self._cellGauge.getSliceHeight()) \
|
|
||||||
+ self._cellGauge.getSliceHeight() / 2
|
|
||||||
ytrack = self.getTrack( contact1.getY(), self.horizontalDeepDepth, yoffset )
|
ytrack = self.getTrack( contact1.getY(), self.horizontalDeepDepth, yoffset )
|
||||||
dy = ytrack - contact1.getY()
|
dy = ytrack - contact1.getY()
|
||||||
contact1.setDy( dy )
|
contact1.setDy( dy )
|
||||||
|
else:
|
||||||
|
contact1 = Contact.create( rp, self._routingGauge.getContactLayer(startDepth), 0, 0 )
|
||||||
|
ytrack = self.getTrack( contact1.getY(), startDepth, 0 )
|
||||||
|
dy = ytrack - contact1.getY()
|
||||||
|
startDepth += 1
|
||||||
trace( 550, contact1 )
|
trace( 550, contact1 )
|
||||||
|
|
||||||
if flags & GaugeConf.HAccess: stopDepth = hdepth
|
if flags & GaugeConf.HAccess: stopDepth = hdepth
|
||||||
else: stopDepth = vdepth
|
else: stopDepth = vdepth
|
||||||
trace( 550, '\tstopDepth:%d\n' % stopDepth )
|
trace( 550, '\tstopDepth:%d\n' % stopDepth )
|
||||||
|
|
||||||
for depth in range(1,stopDepth):
|
for depth in range(startDepth,stopDepth):
|
||||||
rg = self._routingGauge.getLayerGauge(depth)
|
rg = self.routingGauge.getLayerGauge(depth)
|
||||||
xoffset = 0
|
xoffset = 0
|
||||||
if flags & GaugeConf.OffsetRight1 and depth == 1:
|
if flags & GaugeConf.OffsetRight1 and depth == 1:
|
||||||
xoffset = 1
|
xoffset = 1
|
||||||
if rg.getDirection() == RoutingLayerGauge.Horizontal:
|
if rg.getDirection() == RoutingLayerGauge.Horizontal:
|
||||||
xtrack = self.getTrack( contact1.getX(), depth+1, xoffset )
|
xtrack = self.getTrack( contact1.getX(), depth+1, xoffset )
|
||||||
ytrack = self.getTrack( contact1.getY(), depth , 0 )
|
ytrack = self.getTrack( contact1.getY(), depth , 0 )
|
||||||
|
trace( 550, '\tHorizontal depth={} xtrack={} ytrack={}\n' \
|
||||||
|
.format(depth,DbU.getValueString(xtrack),DbU.getValueString(ytrack)) )
|
||||||
else:
|
else:
|
||||||
xtrack = self.getTrack( contact1.getX(), depth , xoffset )
|
xtrack = self.getTrack( contact1.getX(), depth , xoffset )
|
||||||
ytrack = self.getTrack( contact1.getY(), depth+1, 0 )
|
ytrack = self.getTrack( contact1.getY(), depth+1, 0 )
|
||||||
|
trace( 550, '\tVertical depth={} xtrack={} ytrack={}\n' \
|
||||||
|
.format(depth,DbU.getValueString(xtrack),DbU.getValueString(ytrack)) )
|
||||||
contact2 = Contact.create( rp.getNet()
|
contact2 = Contact.create( rp.getNet()
|
||||||
, self._routingGauge.getContactLayer(depth)
|
, self._routingGauge.getContactLayer(depth)
|
||||||
, xtrack
|
, xtrack
|
||||||
|
@ -400,6 +407,16 @@ class GaugeConf ( object ):
|
||||||
return self.rpAccess( self.rpByPlugName(instance,plugName,net), flags )
|
return self.rpAccess( self.rpByPlugName(instance,plugName,net), flags )
|
||||||
|
|
||||||
def setStackPosition ( self, topContact, x, y ):
|
def setStackPosition ( self, topContact, x, y ):
|
||||||
|
trace( 550, '\tGaugeConf.setStackPosition() @({},{}) for {}\n' \
|
||||||
|
.format(DbU.getValueString(x),DbU.getValueString(y),topContact) )
|
||||||
|
lg = self.routingGauge.getLayerGauge( topContact.getLayer().getTop() )
|
||||||
|
if lg:
|
||||||
|
if lg.getDirection() == RoutingLayerGauge.Horizontal:
|
||||||
|
topContact.setY( y )
|
||||||
|
else:
|
||||||
|
topContact.setX( x )
|
||||||
|
else:
|
||||||
|
trace( 550, '\tNo LayerGauge for top layer\n' )
|
||||||
topContact.setX( x )
|
topContact.setX( x )
|
||||||
topContact.setY( y )
|
topContact.setY( y )
|
||||||
|
|
||||||
|
@ -414,13 +431,17 @@ class GaugeConf ( object ):
|
||||||
message.append( '| {}'.format(component) )
|
message.append( '| {}'.format(component) )
|
||||||
raise ErrorMessage( 1, message )
|
raise ErrorMessage( 1, message )
|
||||||
|
|
||||||
if count == 1:
|
#if count == 1:
|
||||||
if isinstance(segment,Horizontal):
|
# if isinstance(segment,Horizontal):
|
||||||
segment.setY( y )
|
# trace( 550, '\tAdjust horizontal slave @{} {}\n' \
|
||||||
segment.getOppositeAnchor( topContact ).setY( y )
|
# .format(DbU.getValueString(y),segment) )
|
||||||
elif isinstance(segment,Vertical):
|
# segment.setY( y )
|
||||||
segment.setX( x )
|
# segment.getOppositeAnchor( topContact ).setY( y )
|
||||||
segment.getOppositeAnchor( topContact ).setX( x )
|
# elif isinstance(segment,Vertical):
|
||||||
|
# trace( 550, '\tAdjust vertical slave @{} {}\n' \
|
||||||
|
# .format(DbU.getValueString(x),segment) )
|
||||||
|
# segment.setX( x )
|
||||||
|
# segment.getOppositeAnchor( topContact ).setX( x )
|
||||||
self.expandMinArea( topContact )
|
self.expandMinArea( topContact )
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -440,6 +461,7 @@ class GaugeConf ( object ):
|
||||||
contacts.append( component.getTarget() )
|
contacts.append( component.getTarget() )
|
||||||
i += 1
|
i += 1
|
||||||
for segment in segments:
|
for segment in segments:
|
||||||
|
trace( 550, '\tGaugeConf.expandMinArea() on {}\n'.format(segment) )
|
||||||
layer = segment.getLayer()
|
layer = segment.getLayer()
|
||||||
wireWidth = segment.getWidth()
|
wireWidth = segment.getWidth()
|
||||||
depth = self._routingGauge.getLayerDepth( layer )
|
depth = self._routingGauge.getLayerDepth( layer )
|
||||||
|
|
|
@ -250,6 +250,7 @@ class Builder ( object ):
|
||||||
bb = segment.getBoundingBox( layer )
|
bb = segment.getBoundingBox( layer )
|
||||||
self.activePlane.addTerminal( ck, Plane.Vertical, bb )
|
self.activePlane.addTerminal( ck, Plane.Vertical, bb )
|
||||||
trace( 550, '\tAdded terminal of {} to vertical plane @{}\n'.format(ck,bb) )
|
trace( 550, '\tAdded terminal of {} to vertical plane @{}\n'.format(ck,bb) )
|
||||||
|
#Breakpoint.stop( 99, '_connectClock() on {} done.'.format(ck) )
|
||||||
|
|
||||||
def connectClocks ( self ):
|
def connectClocks ( self ):
|
||||||
if not self.conf.useClockTree:
|
if not self.conf.useClockTree:
|
||||||
|
|
|
@ -488,7 +488,9 @@ class Builder ( object ):
|
||||||
coronaAb = self.conf.cellPnR.getAbutmentBox()
|
coronaAb = self.conf.cellPnR.getAbutmentBox()
|
||||||
bufferRp = self.conf.rpAccessByOccurrence( Occurrence(htPlugs[0], Path()), ck, 0 )
|
bufferRp = self.conf.rpAccessByOccurrence( Occurrence(htPlugs[0], Path()), ck, 0 )
|
||||||
pinRp = self.conf.rpAccessByOccurrence( Occurrence(coronaPin , Path()), ck, 0 )
|
pinRp = self.conf.rpAccessByOccurrence( Occurrence(coronaPin , Path()), ck, 0 )
|
||||||
|
trace( 550, '\tpinRp={}\n'.format(pinRp) )
|
||||||
self.conf.expandMinArea( bufferRp )
|
self.conf.expandMinArea( bufferRp )
|
||||||
|
self.conf.expandMinArea( pinRp )
|
||||||
if coronaPin.getAccessDirection() == Pin.Direction.NORTH:
|
if coronaPin.getAccessDirection() == Pin.Direction.NORTH:
|
||||||
isVertical = True
|
isVertical = True
|
||||||
axis = coronaAb.getYMax()
|
axis = coronaAb.getYMax()
|
||||||
|
@ -514,6 +516,8 @@ class Builder ( object ):
|
||||||
self.conf.createVertical ( bufferRp, contact1, xaxisRp , 0 )
|
self.conf.createVertical ( bufferRp, contact1, xaxisRp , 0 )
|
||||||
self.conf.createHorizontal( contact1, contact2, yaxis , 0 )
|
self.conf.createHorizontal( contact1, contact2, yaxis , 0 )
|
||||||
self.conf.createVertical ( contact2, pinRp , xaxisPin, 0 )
|
self.conf.createVertical ( contact2, pinRp , xaxisPin, 0 )
|
||||||
|
trace( 550, '\tcontact1={}\n'.format(contact1) )
|
||||||
|
trace( 550, '\tcontact2={}\n'.format(contact2) )
|
||||||
else:
|
else:
|
||||||
pitch = self.conf.hRoutingGauge.getPitch()
|
pitch = self.conf.hRoutingGauge.getPitch()
|
||||||
xaxis = axis + pitch * trackNb
|
xaxis = axis + pitch * trackNb
|
||||||
|
|
Loading…
Reference in New Issue