def _rcheckUnplaced ( self, path, cell ): for instance in cell.getInstances(): if instance.getPlacementStatus() == Instance.PlacementStatus.UNPLACED: self.unplaceds.append( Occurrence(instance,path) ) rpath = Path( path, instance ) self._rcheckUnplaced( rpath, instance.getMasterCell() ) return
def _rpByPlug ( self, plug, net ): if plug in self._plugToRp: rp = self._plugToRp[plug] else: occurrence = Occurrence( plug, Path(net.getCell(),'') ) rp = RoutingPad.create( net, occurrence, RoutingPad.BiggestArea ) self._plugToRp[plug] = rp return rp
def connectLeaf(self): trace(550, '\tConnecting leafs.\n') UpdateSession.open() leafsByBuffer = {} hyperMasterClock = HyperNet.create(Occurrence(self.masterClock)) for plugOccurrence in hyperMasterClock.getLeafPlugOccurrences(): trace(550, '\tAdding leaf <%s>.\n' % plugOccurrence) position = plugOccurrence.getBoundingBox().getCenter() self.addLeaf(position, plugOccurrence) self.childs[0].connectLeafs() sys.stdout.flush() getPlugByName(self.topBuffer, self.bufferIn).setNet(self.masterClock) UpdateSession.close() return
def connectClock ( self ): if not self.useClockTree: print(WarningMessage( "Clock tree generation has been disabled ('chip.clockTree':False)." )) return if not self.cko: print(ErrorMessage( 1, 'Cannot build clock terminal as ck is not known.' )) return blockCk = None for plug in self.path.getTailInstance().getPlugs(): if plug.getNet() == self.cko: blockCk = plug.getMasterNet() if not blockCk: print(ErrorMessage( 1, 'Block <%s> has no net connected to the clock <%s>.' % (self.path.getTailInstance().getName(),self.ck.getName()) )) return htPlugs = [] ffPlugs = [] for plug in blockCk.getPlugs(): if plug.getInstance().getName() == 'ck_htree': htPlugs.append( plug ) else: if plug.getInstance().getMasterCell().isTerminal(): ffPlugs.append( plug ) if len(ffPlugs) > 0: message = 'Clock <%s> of block <%s> is not organized as a H-Tree.' \ % (blockCk.getName(),self.path.getTailInstance().getName()) print(ErrorMessage( 1, message )) return if len(htPlugs) > 1: message = 'Block <%s> has not exactly one H-Tree connecteds to the clock <%s>:' \ % (self.path.getTailInstance().getName(),blockCk.getName()) for plug in htPlugs: message += '\n - %s' % plug print(ErrorMessage( 1, message )) return UpdateSession.open() bufferRp = self.rpAccessByOccurrence( Occurrence(htPlugs[0], self.path), self.cko ) blockAb = self.block.getAbutmentBox() self.path.getTransformation().applyOn( blockAb ) layerGauge = self.routingGauge.getLayerGauge(self.verticalDepth) contact = Contact.create( self.cko , self.routingGauge.getRoutingLayer(self.verticalDepth) , bufferRp.getX() , blockAb.getYMax() , layerGauge.getViaWidth() , layerGauge.getViaWidth() ) segment = self.createVertical( bufferRp, contact, bufferRp.getX() ) self.activePlane = self.planes[ layerGauge.getLayer().getName() ] bb = segment.getBoundingBox( self.activePlane.metal.getBasicLayer() ) self.path.getTransformation().getInvert().applyOn( bb ) self.activePlane.addTerminal( self.cko, Plane.Vertical, bb ) UpdateSession.close() return