Skip to content

Commit

Permalink
Manage layer change for south terminals of a macro.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpc-lip6 committed Jan 16, 2024
1 parent af654fe commit eda39f4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
2 changes: 1 addition & 1 deletion cumulus/src/plugins/block/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def placeMacro ( self, ipath, transf ):
with UpdateSession():
instance = self.rgetCoreInstance( ipath )
macro = Macro.wrap( instance.getMasterCell()
, self.conf.routingGauge.getName(), 3, 2 )
, self.conf.routingGauge.getName(), 3, 3 )
instanceAb = instance.getMasterCell().getAbutmentBox()
coreTransf = self.conf.icore.getTransformation()
if self.conf.isCoreBlock:
Expand Down
51 changes: 38 additions & 13 deletions cumulus/src/plugins/macro/macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__ ( self, macroCell, gaugeName, hMargin, vMargin ):
that are half free and half occluded by the block itself may
cause (stupid) deadlock to appear.
"""
trace( 550, '\tMacro.__init__() {}\n'.format(macroCell) )
trace( 550, '+,', '\tMacro.__init__() {}\n'.format(macroCell) )
self.cell = macroCell
Macro.LUT[ self.cell ] = self

Expand Down Expand Up @@ -222,6 +222,7 @@ def __init__ ( self, macroCell, gaugeName, hMargin, vMargin ):

with UpdateSession():
for component in westPins:
trace( 550, '\twestPin {}\n'.format( component ))
NetExternalComponents.setInternal( component )
pitch = self.rg.getPitch( component.getLayer() )
ppitch = self.getPPitch( component.getLayer() )
Expand Down Expand Up @@ -315,6 +316,7 @@ def __init__ ( self, macroCell, gaugeName, hMargin, vMargin ):
)
NetExternalComponents.setExternal( horizontal )
for component in eastPins:
trace( 550, '\teastPin {}\n'.format( component ))
layer = component.getLayer()
if layer.getMask() != gaugeMetal2.getLayer().getMask():
useBigVia = True
Expand Down Expand Up @@ -361,13 +363,23 @@ def __init__ ( self, macroCell, gaugeName, hMargin, vMargin ):
)
NetExternalComponents.setExternal( horizontal )
for component in southPins:
trace( 550, '\tsouthPin {}\n'.format( component ))
NetExternalComponents.setInternal( component )
pitch = self.rg.getPitch( component.getLayer() )
innerRg = self.rg.getLayerGauge( component.getLayer() )
outerRg = innerRg
vDepth = innerRg.getDepth()
if innerRg.isHorizontal():
#if vDepth+1 < self.rg.getAllowedDepth(): vDepth += 1
#else: vDepth -= 1
outerRg = self.rg.getLayerGauge( vDepth + 1 )
if outerRg.getLayer().getMask() != innerRg.getLayer().getMask():
useBigVia = True
pitch = self.rg.getPitch( outerRg.getLayer() )
ppitch = self.getPPitch( component.getLayer() )
wwidth = self.getWireWidth( component.getLayer() )
wwidth = self.getWireWidth( outerRg.getLayer() )
bb = component.getBoundingBox()
xAxis = bb.getXCenter()
xOngrid = self.getNearestTrackAxis( component.getLayer(), xAxis )
xOngrid = self.getNearestTrackAxis( outerRg.getLayer(), xAxis )
yMax = bb.getYMin()
yMin = yMax - vMargin*ppitch
width = bb.getWidth()
Expand All @@ -380,29 +392,41 @@ def __init__ ( self, macroCell, gaugeName, hMargin, vMargin ):
else:
ppXAxis += width//2
ppXOngrid -= wwidth//2
horizontal = Horizontal.create( component.getNet()
, component.getLayer()
, bb.getYMin()
, width
, ppXAxis
, ppXOngrid
)
if useBigVia:
bvia = BigVia( component.getNet()
, innerRg.getDepth()
, xOngrid
, bb.getYMin() + wwidth
, wwidth
, 3*wwidth
, flags=BigVia.AllowAllExpand )
bvia.mergeDepth( outerRg.getDepth() )
bvia.doLayout()
else:
horizontal = Horizontal.create( component.getNet()
, component.getLayer()
, bb.getYMin()
, width
, ppXAxis
, ppXOngrid
)
vertical = Vertical.create( component.getNet()
, component.getLayer()
, outerRg.getLayer()
, xOngrid
, wwidth
, yMin
, yMax
)
vertical = Vertical.create( component.getNet()
, component.getLayer()
, outerRg.getLayer()
, xOngrid
, wwidth
, yMin
, yMax - ppitch
)
NetExternalComponents.setExternal( vertical )
for component in northPins:
trace( 550, '\tnorthPin {}\n'.format( component ))
layer = component.getLayer()
if layer.getMask() != gaugeMetal3.getLayer().getMask():
useBigVia = True
Expand Down Expand Up @@ -460,3 +484,4 @@ def __init__ ( self, macroCell, gaugeName, hMargin, vMargin ):
)
NetExternalComponents.setExternal( vertical )
self.cell.setAbutmentBox( self.outerAb )
trace( 550, '-' )

0 comments on commit eda39f4

Please sign in to comment.