diff --git a/cumulus/src/plugins/alpha/block/bigvia.py b/cumulus/src/plugins/alpha/block/bigvia.py index 738b92e2..ccba4901 100644 --- a/cumulus/src/plugins/alpha/block/bigvia.py +++ b/cumulus/src/plugins/alpha/block/bigvia.py @@ -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 '' \ + .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(): diff --git a/cumulus/src/plugins/alpha/chip/configuration.py b/cumulus/src/plugins/alpha/chip/configuration.py index 100aa8cd..c1f9551d 100644 --- a/cumulus/src/plugins/alpha/chip/configuration.py +++ b/cumulus/src/plugins/alpha/chip/configuration.py @@ -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()