Better/nicer management of the BigVia in cumulus.

* Change: In cumulus/plugins.block.bigvia.BigVia, center the VIA cut
    matrix. Issue a BIG warning when no one cut could be drawn
    (temporarily disabled until I fix the corona).
This commit is contained in:
Jean-Paul Chaput 2020-11-25 21:52:48 +01:00
parent 867e6cc966
commit 13726d648b
2 changed files with 34 additions and 6 deletions

View File

@ -51,6 +51,18 @@ class BigVia ( object ):
self.plates = {}
self.vias = {}
def __str__ ( self ):
global rg
if rg is None: rg = CRL.AllianceFramework.get().getRoutingGauge()
return '<BigVia {} [{} {}] @({} {}) {} x {}>' \
.format( self.net.getName()
, rg.getRoutingLayer(self.bottomDepth).getName()
, rg.getRoutingLayer(self.topDepth).getName()
, DbU.getValueString(self.x)
, DbU.getValueString(self.y)
, DbU.getValueString(self.width)
, DbU.getValueString(self.height) )
def getNet ( self ): return self.net
def getPlate ( self, metal ):
@ -107,13 +119,23 @@ class BigVia ( object ):
if not cutSpacing:
raise ErrorMessage( 1, 'BigVia._doCutMatrix(): Cut spacing on layer "{}" is zero.' \
.format( cutLayer.getName() ))
topEnclosure = min( viaLayer.getTopEnclosure( Layer.EnclosureH )
topEnclosure = max( viaLayer.getTopEnclosure( Layer.EnclosureH )
, viaLayer.getTopEnclosure( Layer.EnclosureV ))
botEnclosure = min( viaLayer.getBottomEnclosure( Layer.EnclosureH )
botEnclosure = max( viaLayer.getBottomEnclosure( Layer.EnclosureH )
, viaLayer.getBottomEnclosure( Layer.EnclosureV ))
enclosure = max( topEnclosure, botEnclosure )
cutArea = self.plates[ depth ].getBoundingBox()
cutArea.inflate( - enclosure - 2*cutSide )
trace( 550, '\tBigVia: {}\n'.format(self) )
trace( 550, '\t| topEnclosure[{}]: {}\n'.format(depth,DbU.getValueString(topEnclosure)) )
trace( 550, '\t| botEnclosure[{}]: {}\n'.format(depth,DbU.getValueString(botEnclosure)) )
trace( 550, '\t| enclosure [{}]: {}\n'.format(depth,DbU.getValueString(enclosure)) )
cutArea = self.plates[ depth ].getBoundingBox()
cutArea.inflate( - enclosure - cutSide/2 )
xoffset = (cutArea.getWidth () % (cutSide+cutSpacing)) / 2
yoffset = (cutArea.getHeight() % (cutSide+cutSpacing)) / 2
cutArea.translate( xoffset, yoffset )
#if cutArea.isEmpty():
# raise ErrorMessage( 1, 'BigVia._doCutMatrix(): Cannot create at least a single cut in {}.' \
# .format(self))
self.vias[ depth ] = []
y = cutArea.getYMin()
while y <= cutArea.getYMax():

View File

@ -143,8 +143,14 @@ class ChipConf ( BlockConf ):
clockNets.append( net )
self.railsCount = self.cfg.chip.block.rails.count + len(clockNets)
trace( 550, '\tself.railsCount: {}\n'.format(self.railsCount) )
self.minHCorona = self.railsCount*(self.hRailWidth + self.hRailSpace) + self.hRailSpace + self.sliceHeight
self.minVCorona = self.railsCount*(self.vRailWidth + self.vRailSpace) + self.vRailSpace + 10*self.sliceStep
hRailsSize = self.railsCount*(self.hRailWidth + self.hRailSpace) + self.hRailSpace
if hRailsSize % self.sliceHeight:
hRailsSize += self.sliceHeight - (hRailsSize % self.sliceHeight)
self.minHCorona = hRailsSize + self.sliceHeight
vRailsSize = self.railsCount*(self.vRailWidth + self.vRailSpace) + self.vRailSpace
if vRailsSize % self.sliceHeight:
vRailsSize += self.sliceHeight - (vRailsSize % self.sliceHeight)
self.minVCorona = vRailsSize + self.sliceHeight
def chipValidate ( self ):
#self.checkPads()