Buffer cell configuration in ClockTree. More config parameters in Chip.
* New: In ClockTree plugin, select the name of the buffer cell through configuration (parameter: "clockTree.buffer"), and guess the I/O name of this buffer automatically. Put configuration parameters in plugin.conf and not mauka.conf. Bug: strangely triggers a coredump in components collection when used with <vsxlib>. Some debug printing still active until that is solved. * New: In Chip plugin, make the size and numbers of the block rails configuration parameters (in plugin.conf).
This commit is contained in:
parent
51a3236962
commit
ae4d938553
|
@ -8,9 +8,11 @@ import helpers
|
||||||
|
|
||||||
# Parameters for chip plugin.
|
# Parameters for chip plugin.
|
||||||
parametersTable = \
|
parametersTable = \
|
||||||
( ("chip.block.rails.count" ,TypeInt ,4 )
|
( ("chip.block.rails.count" , TypeInt , 5 )
|
||||||
, ("chip.block.rails.hWidth" ,TypeInt ,12 )
|
, ("chip.block.rails.hWidth" , TypeInt , 12 )
|
||||||
, ("chip.block.rails.vWidth" ,TypeInt ,12 )
|
, ("chip.block.rails.vWidth" , TypeInt , 12 )
|
||||||
, ("chip.block.rails.hSpacing" ,TypeInt ,6 )
|
, ("chip.block.rails.hSpacing" , TypeInt , 6 )
|
||||||
, ("chip.block.rails.vSpacing" ,TypeInt ,6 )
|
, ("chip.block.rails.vSpacing" , TypeInt , 6 )
|
||||||
|
, ('clockTree.minimumSide' , TypeInt , 300)
|
||||||
|
, ('clockTree.buffer' , TypeString, 'buf_x2')
|
||||||
)
|
)
|
||||||
|
|
|
@ -11,7 +11,6 @@ parametersTable = \
|
||||||
, ('mauka.plotBins' , TypeBool , True )
|
, ('mauka.plotBins' , TypeBool , True )
|
||||||
, ('mauka.searchRatio' , TypePercentage, 50 )
|
, ('mauka.searchRatio' , TypePercentage, 50 )
|
||||||
, ('mauka.standardAnnealing', TypeBool , True )
|
, ('mauka.standardAnnealing', TypeBool , True )
|
||||||
, ('clockTree.minimumSide' , TypeInt , 300 )
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,11 @@ import helpers
|
||||||
#
|
#
|
||||||
# Parameters for chip plugin.
|
# Parameters for chip plugin.
|
||||||
parametersTable = \
|
parametersTable = \
|
||||||
( ("chip.block.rails.count" ,TypeInt ,4 )
|
( ("chip.block.rails.count" , TypeInt , 5 )
|
||||||
, ("chip.block.rails.hWidth" ,TypeInt ,12 )
|
, ("chip.block.rails.hWidth" , TypeInt , 24 )
|
||||||
, ("chip.block.rails.vWidth" ,TypeInt ,12 )
|
, ("chip.block.rails.vWidth" , TypeInt , 24 )
|
||||||
, ("chip.block.rails.hSpacing" ,TypeInt ,6 )
|
, ("chip.block.rails.hSpacing" , TypeInt , 12 )
|
||||||
, ("chip.block.rails.vSpacing" ,TypeInt ,6 )
|
, ("chip.block.rails.vSpacing" , TypeInt , 12 )
|
||||||
|
, ('clockTree.minimumSide' , TypeInt , 600)
|
||||||
|
, ('clockTree.buffer' , TypeString, 'bf1_x4')
|
||||||
)
|
)
|
||||||
|
|
|
@ -59,6 +59,9 @@ def unicornHook ( **kw ):
|
||||||
|
|
||||||
def ScriptMain ( **kw ):
|
def ScriptMain ( **kw ):
|
||||||
try:
|
try:
|
||||||
|
helpers.staticInitialization( quiet=True )
|
||||||
|
helpers.setTraceLevel( 550 )
|
||||||
|
|
||||||
errorCode = 0
|
errorCode = 0
|
||||||
|
|
||||||
print ' o Cleaning up any previous run.'
|
print ' o Cleaning up any previous run.'
|
||||||
|
|
|
@ -368,20 +368,20 @@ class Corona ( object ):
|
||||||
if not isinstance(block,chip.BlockPower.Block):
|
if not isinstance(block,chip.BlockPower.Block):
|
||||||
raise ErrorMessage( 1, 'Attempt to create a Corona on a non-Block object.' )
|
raise ErrorMessage( 1, 'Attempt to create a Corona on a non-Block object.' )
|
||||||
|
|
||||||
self._block = block
|
self._block = block
|
||||||
self._innerBb = self._block.bb
|
self._innerBb = self._block.bb
|
||||||
self._block.path.getTransformation().applyOn( self._innerBb )
|
self._block.path.getTransformation().applyOn( self._innerBb )
|
||||||
|
|
||||||
self._railsNb = 5
|
self._railsNb = Cfg.getParamInt('chip.block.rails.count').asInt()
|
||||||
self._hRailWidth = DbU.fromLambda( 12.0 )
|
self._hRailWidth = DbU.fromLambda( Cfg.getParamInt('chip.block.rails.hWidth' ).asInt() )
|
||||||
self._vRailWidth = DbU.fromLambda( 12.0 )
|
self._vRailWidth = DbU.fromLambda( Cfg.getParamInt('chip.block.rails.vWidth' ).asInt() )
|
||||||
self._hRailSpace = DbU.fromLambda( 6.0 )
|
self._hRailSpace = DbU.fromLambda( Cfg.getParamInt('chip.block.rails.hSpacing').asInt() )
|
||||||
self._vRailSpace = DbU.fromLambda( 6.0 )
|
self._vRailSpace = DbU.fromLambda( Cfg.getParamInt('chip.block.rails.vSpacing').asInt() )
|
||||||
|
|
||||||
self._southSide = SouthSide( self )
|
self._southSide = SouthSide( self )
|
||||||
self._northSide = NorthSide( self )
|
self._northSide = NorthSide( self )
|
||||||
self._westSide = WestSide ( self )
|
self._westSide = WestSide ( self )
|
||||||
self._eastSide = EastSide ( self )
|
self._eastSide = EastSide ( self )
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
|
@ -36,10 +36,6 @@ from helpers import WarningMessage
|
||||||
import chip.Configuration
|
import chip.Configuration
|
||||||
|
|
||||||
|
|
||||||
helpers.staticInitialization( quiet=True )
|
|
||||||
helpers.trace.level = 550
|
|
||||||
|
|
||||||
|
|
||||||
class Side ( object ):
|
class Side ( object ):
|
||||||
|
|
||||||
def __init__ ( self, block, side, net, metal ):
|
def __init__ ( self, block, side, net, metal ):
|
||||||
|
|
|
@ -62,12 +62,23 @@ def getPlugByNet ( instance, net ):
|
||||||
|
|
||||||
|
|
||||||
def getRpBb ( instance, netName ):
|
def getRpBb ( instance, netName ):
|
||||||
|
print 'getRpBb()'
|
||||||
|
sys.stdout.flush()
|
||||||
bb = Box()
|
bb = Box()
|
||||||
for net in instance.getMasterCell().getNets():
|
for net in instance.getMasterCell().getNets():
|
||||||
|
print net
|
||||||
|
sys.stdout.flush()
|
||||||
if net.isExternal() and net.getName() == netName:
|
if net.isExternal() and net.getName() == netName:
|
||||||
|
print 'all components'
|
||||||
|
for component in net.getComponents():
|
||||||
|
print component
|
||||||
|
print 'external components'
|
||||||
for component in net.getExternalComponents():
|
for component in net.getExternalComponents():
|
||||||
|
print component
|
||||||
|
sys.stdout.flush()
|
||||||
if isinstance(component,Vertical):
|
if isinstance(component,Vertical):
|
||||||
bb = component.getBoundingBox()
|
bb = component.getBoundingBox()
|
||||||
|
print 'End of loop'
|
||||||
instance.getTransformation().applyOn( bb )
|
instance.getTransformation().applyOn( bb )
|
||||||
return bb
|
return bb
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,9 @@ class Side ( object ):
|
||||||
trace( 550, ',+', '\t_createPowerContacts() for %s\n' % net.getName() )
|
trace( 550, ',+', '\t_createPowerContacts() for %s\n' % net.getName() )
|
||||||
|
|
||||||
masterCell = pad.getMasterCell()
|
masterCell = pad.getMasterCell()
|
||||||
if net.isGlobal(): components = masterCell.getNet(net.getName()).getExternalComponents()
|
if net.isGlobal():
|
||||||
|
trace( 550, '\tLooking for global net %s\n' % net.getName() )
|
||||||
|
components = masterCell.getNet(net.getName()).getExternalComponents()
|
||||||
else:
|
else:
|
||||||
for plug in net.getPlugs():
|
for plug in net.getPlugs():
|
||||||
if plug.getInstance() == pad:
|
if plug.getInstance() == pad:
|
||||||
|
|
|
@ -87,16 +87,15 @@ class HTree ( GaugeConfWrapper ):
|
||||||
ht = HTree( conf, cell, clockNet, clockBox )
|
ht = HTree( conf, cell, clockNet, clockBox )
|
||||||
print ' o Creating Clock H-Tree for <%s>.' % cell.getName()
|
print ' o Creating Clock H-Tree for <%s>.' % cell.getName()
|
||||||
ht.build()
|
ht.build()
|
||||||
|
trace( 550, '\tht.build() OK\n' )
|
||||||
ht.place()
|
ht.place()
|
||||||
|
trace( 550, '\tht.place() OK\n' )
|
||||||
#ht.route()
|
#ht.route()
|
||||||
print ' - H-Tree depth: %d' % ht.getTreeDepth()
|
print ' - H-Tree depth: %d' % ht.getTreeDepth()
|
||||||
trace( 550, '\tusedVTracks: %s\n' % str(ht.usedVTracks) )
|
trace( 550, '\tusedVTracks: %s\n' % str(ht.usedVTracks) )
|
||||||
return ht
|
return ht
|
||||||
|
|
||||||
def __init__ ( self, conf, cell, clockNet, area ):
|
def __init__ ( self, conf, cell, clockNet, area ):
|
||||||
print type(conf)
|
|
||||||
print type(conf.gaugeConf)
|
|
||||||
sys.stdout.flush()
|
|
||||||
GaugeConfWrapper.__init__( self, conf.gaugeConf )
|
GaugeConfWrapper.__init__( self, conf.gaugeConf )
|
||||||
|
|
||||||
self.minSide = DbU.fromLambda( Cfg.getParamInt('clockTree.minimumSide').asInt() )
|
self.minSide = DbU.fromLambda( Cfg.getParamInt('clockTree.minimumSide').asInt() )
|
||||||
|
@ -108,7 +107,8 @@ class HTree ( GaugeConfWrapper ):
|
||||||
self.cell = cell
|
self.cell = cell
|
||||||
self.area = area
|
self.area = area
|
||||||
self.childs = []
|
self.childs = []
|
||||||
self.bufferCell = self.framework.getCell( 'buf_x2', CRL.Catalog.State.Logical )
|
#self.bufferCell = self.framework.getCell( 'buf_x2', CRL.Catalog.State.Logical )
|
||||||
|
self._getBufferIo()
|
||||||
self.tieCell = self.framework.getCell( 'tie_x0', CRL.Catalog.State.Views )
|
self.tieCell = self.framework.getCell( 'tie_x0', CRL.Catalog.State.Views )
|
||||||
self.cellGauge = self.framework.getCellGauge()
|
self.cellGauge = self.framework.getCellGauge()
|
||||||
self.topBuffer = Instance.create( self.cell, 'ck_htree', self.bufferCell )
|
self.topBuffer = Instance.create( self.cell, 'ck_htree', self.bufferCell )
|
||||||
|
@ -128,10 +128,23 @@ class HTree ( GaugeConfWrapper ):
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
def _getBufferIo ( self ):
|
||||||
|
self.bufferCell = self.framework.getCell( Cfg.getParamString('clockTree.buffer').asString()
|
||||||
|
, CRL.Catalog.State.Logical )
|
||||||
|
for net in self.bufferCell.getNets():
|
||||||
|
if not net.isExternal(): continue
|
||||||
|
if net.isGlobal(): continue
|
||||||
|
if net.getDirection() & Net.Direction.IN: self.bufferIn = net.getName()
|
||||||
|
elif net.getDirection() & Net.Direction.OUT: self.bufferOut = net.getName()
|
||||||
|
|
||||||
|
trace( 550, '\tbufferIn :<%s>\n' % self.bufferIn )
|
||||||
|
trace( 550, '\tbufferOut:<%s>\n' % self.bufferOut )
|
||||||
|
return
|
||||||
|
|
||||||
def _createChildNet ( self, ibuffer, tag ):
|
def _createChildNet ( self, ibuffer, tag ):
|
||||||
childNet = Net.create( self.cell, tag )
|
childNet = Net.create( self.cell, tag )
|
||||||
childNet.setType( Net.Type.CLOCK )
|
childNet.setType( Net.Type.CLOCK )
|
||||||
getPlugByName(ibuffer, 'q').setNet( childNet )
|
getPlugByName(ibuffer, self.bufferOut).setNet( childNet )
|
||||||
return
|
return
|
||||||
|
|
||||||
def feedCounter ( self ):
|
def feedCounter ( self ):
|
||||||
|
@ -193,7 +206,8 @@ class HTree ( GaugeConfWrapper ):
|
||||||
UpdateSession.open()
|
UpdateSession.open()
|
||||||
center = self.area.getCenter()
|
center = self.area.getCenter()
|
||||||
self.placeInstance( self.topBuffer, center.getX(), center.getY() )
|
self.placeInstance( self.topBuffer, center.getX(), center.getY() )
|
||||||
self.usedVTracks += [ getRpBb(self.topBuffer, 'i').getCenter().getX() ]
|
trace( 550, '\rplace top level\n' )
|
||||||
|
self.usedVTracks += [ getRpBb(self.topBuffer, self.bufferIn).getCenter().getX() ]
|
||||||
self.childs[0].place()
|
self.childs[0].place()
|
||||||
UpdateSession.close()
|
UpdateSession.close()
|
||||||
return
|
return
|
||||||
|
@ -285,8 +299,8 @@ class HTree ( GaugeConfWrapper ):
|
||||||
trace( 550, ',+', '\tBuffer <%s> has %i leafs.\n' % (leafBuffer.getName(),len(leafs)) )
|
trace( 550, ',+', '\tBuffer <%s> has %i leafs.\n' % (leafBuffer.getName(),len(leafs)) )
|
||||||
if len(leafs) == 0: return
|
if len(leafs) == 0: return
|
||||||
|
|
||||||
leafCk = getPlugByName(leafBuffer,'q').getNet()
|
leafCk = getPlugByName(leafBuffer,self.bufferOut).getNet()
|
||||||
bufferRp = self.rpByPlugName( leafBuffer, 'q', leafCk )
|
bufferRp = self.rpByPlugName( leafBuffer, self.bufferOut, leafCk )
|
||||||
|
|
||||||
rsmt = RSMT( leafCk.getName() )
|
rsmt = RSMT( leafCk.getName() )
|
||||||
rsmt.addNode( bufferRp, bufferRp.getX(), self.toYCellGrid(bufferRp.getY()) )
|
rsmt.addNode( bufferRp, bufferRp.getX(), self.toYCellGrid(bufferRp.getY()) )
|
||||||
|
@ -312,7 +326,7 @@ class HTree ( GaugeConfWrapper ):
|
||||||
self.childs[0].connectLeafs()
|
self.childs[0].connectLeafs()
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
getPlugByName( self.topBuffer, 'i' ).setNet( self.masterClock )
|
getPlugByName( self.topBuffer, self.bufferIn ).setNet( self.masterClock )
|
||||||
UpdateSession.close()
|
UpdateSession.close()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
@ -360,11 +374,11 @@ class HTreeNode ( object ):
|
||||||
self.brBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_br_ins', self.topTree.bufferCell )
|
self.brBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_br_ins', self.topTree.bufferCell )
|
||||||
self.tlBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_tl_ins', self.topTree.bufferCell )
|
self.tlBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_tl_ins', self.topTree.bufferCell )
|
||||||
self.trBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_tr_ins', self.topTree.bufferCell )
|
self.trBuffer = Instance.create( self.topTree.cell, 'ck_htree'+self.prefix+'_tr_ins', self.topTree.bufferCell )
|
||||||
self.ckNet = getPlugByName(self.sourceBuffer, 'q').getNet()
|
self.ckNet = getPlugByName(self.sourceBuffer, self.topTree.bufferOut).getNet()
|
||||||
getPlugByName(self.blBuffer, 'i').setNet( self.ckNet )
|
getPlugByName(self.blBuffer, self.topTree.bufferIn).setNet( self.ckNet )
|
||||||
getPlugByName(self.brBuffer, 'i').setNet( self.ckNet )
|
getPlugByName(self.brBuffer, self.topTree.bufferIn).setNet( self.ckNet )
|
||||||
getPlugByName(self.tlBuffer, 'i').setNet( self.ckNet )
|
getPlugByName(self.tlBuffer, self.topTree.bufferIn).setNet( self.ckNet )
|
||||||
getPlugByName(self.trBuffer, 'i').setNet( self.ckNet )
|
getPlugByName(self.trBuffer, self.topTree.bufferIn).setNet( self.ckNet )
|
||||||
|
|
||||||
self.topTree._createChildNet( self.blBuffer, 'ck_htree'+self.prefix+'_bl' )
|
self.topTree._createChildNet( self.blBuffer, 'ck_htree'+self.prefix+'_bl' )
|
||||||
self.topTree._createChildNet( self.brBuffer, 'ck_htree'+self.prefix+'_br' )
|
self.topTree._createChildNet( self.brBuffer, 'ck_htree'+self.prefix+'_br' )
|
||||||
|
@ -446,7 +460,7 @@ class HTreeNode ( object ):
|
||||||
self.trLeafs.append( plugOccurrence )
|
self.trLeafs.append( plugOccurrence )
|
||||||
leafBuffer = self.trBuffer
|
leafBuffer = self.trBuffer
|
||||||
|
|
||||||
leafCk = getPlugByName(leafBuffer,'q').getNet()
|
leafCk = getPlugByName(leafBuffer,self.topTree.bufferOut).getNet()
|
||||||
deepPlug = self.topTree.addDeepPlug( leafCk, plugOccurrence.getPath() )
|
deepPlug = self.topTree.addDeepPlug( leafCk, plugOccurrence.getPath() )
|
||||||
plugOccurrence.getEntity().setNet( deepPlug.getMasterNet() )
|
plugOccurrence.getEntity().setNet( deepPlug.getMasterNet() )
|
||||||
|
|
||||||
|
@ -465,6 +479,7 @@ class HTreeNode ( object ):
|
||||||
return self.trBuffer
|
return self.trBuffer
|
||||||
|
|
||||||
def place ( self ):
|
def place ( self ):
|
||||||
|
trace( 550, '\rplace HTreeNode %s\n' % self.ckNet.getName() )
|
||||||
x = self.area.getXMin() + self.area.getWidth ()/4
|
x = self.area.getXMin() + self.area.getWidth ()/4
|
||||||
y = self.area.getYMin() + self.area.getHeight()/4
|
y = self.area.getYMin() + self.area.getHeight()/4
|
||||||
halfWidth = self.area.getHalfWidth ()
|
halfWidth = self.area.getHalfWidth ()
|
||||||
|
@ -476,8 +491,8 @@ class HTreeNode ( object ):
|
||||||
self.topTree.placeInstance( self.trBuffer, x+halfWidth, y+halfHeight )
|
self.topTree.placeInstance( self.trBuffer, x+halfWidth, y+halfHeight )
|
||||||
|
|
||||||
self.topTree.usedVTracks += \
|
self.topTree.usedVTracks += \
|
||||||
[ self.topTree.rpAccessByPlugName( self.blBuffer, 'i', self.ckNet ).getX()
|
[ self.topTree.rpAccessByPlugName( self.blBuffer, self.topTree.bufferIn, self.ckNet ).getX()
|
||||||
, self.topTree.rpAccessByPlugName( self.brBuffer, 'i', self.ckNet ).getX() ]
|
, self.topTree.rpAccessByPlugName( self.brBuffer, self.topTree.bufferIn, self.ckNet ).getX() ]
|
||||||
|
|
||||||
for child in self.childs: child.place()
|
for child in self.childs: child.place()
|
||||||
return
|
return
|
||||||
|
@ -485,12 +500,12 @@ class HTreeNode ( object ):
|
||||||
def route ( self ):
|
def route ( self ):
|
||||||
if not self.hasLeafs(): return
|
if not self.hasLeafs(): return
|
||||||
|
|
||||||
leftSourceContact = self.topTree.rpAccessByPlugName( self.sourceBuffer, 'q', self.ckNet , HTree.HAccess|HTree.OffsetBottom1 )
|
leftSourceContact = self.topTree.rpAccessByPlugName( self.sourceBuffer, self.topTree.bufferOut, self.ckNet , HTree.HAccess|HTree.OffsetBottom1 )
|
||||||
rightSourceContact = self.topTree.rpAccessByPlugName( self.sourceBuffer, 'q', self.ckNet , HTree.HAccess|HTree.OffsetBottom1 )
|
rightSourceContact = self.topTree.rpAccessByPlugName( self.sourceBuffer, self.topTree.bufferOut, self.ckNet , HTree.HAccess|HTree.OffsetBottom1 )
|
||||||
blContact = self.topTree.rpAccessByPlugName( self.blBuffer , 'i', self.ckNet )
|
blContact = self.topTree.rpAccessByPlugName( self.blBuffer , self.topTree.bufferIn , self.ckNet )
|
||||||
brContact = self.topTree.rpAccessByPlugName( self.brBuffer , 'i', self.ckNet )
|
brContact = self.topTree.rpAccessByPlugName( self.brBuffer , self.topTree.bufferIn , self.ckNet )
|
||||||
tlContact = self.topTree.rpAccessByPlugName( self.tlBuffer , 'i', self.ckNet )
|
tlContact = self.topTree.rpAccessByPlugName( self.tlBuffer , self.topTree.bufferIn , self.ckNet )
|
||||||
trContact = self.topTree.rpAccessByPlugName( self.trBuffer , 'i', self.ckNet )
|
trContact = self.topTree.rpAccessByPlugName( self.trBuffer , self.topTree.bufferIn , self.ckNet )
|
||||||
leftContact = self.topTree.createContact( self.ckNet, blContact.getX(), leftSourceContact.getY() )
|
leftContact = self.topTree.createContact( self.ckNet, blContact.getX(), leftSourceContact.getY() )
|
||||||
rightContact = self.topTree.createContact( self.ckNet, brContact.getX(), rightSourceContact.getY() )
|
rightContact = self.topTree.createContact( self.ckNet, brContact.getX(), rightSourceContact.getY() )
|
||||||
self.topTree.createHorizontal( leftContact , leftSourceContact, leftSourceContact.getY() )
|
self.topTree.createHorizontal( leftContact , leftSourceContact, leftSourceContact.getY() )
|
||||||
|
|
Loading…
Reference in New Issue