Cleanup & error messages in cumulus/plugins/alpha/.
This commit is contained in:
Jean-Paul Chaput 2020-10-25 12:08:48 +01:00
parent 04e9b56102
commit f9cd0e2565
7 changed files with 25 additions and 19 deletions

View File

@ -584,11 +584,11 @@ class Block ( object ):
self.checkIoPins() self.checkIoPins()
self.spares.build() self.spares.build()
if self.conf.useClockTree: self.addClockTrees() if self.conf.useClockTree: self.addClockTrees()
self.addHfnBuffers() if self.conf.useHFNS: self.addHfnBuffers()
if editor: editor.fit() if editor: editor.fit()
#Breakpoint.stop( 0, 'Clock tree(s) done.' ) #Breakpoint.stop( 0, 'Clock tree(s) done.' )
self.place() self.place()
self.findHfnTrees() if self.conf.useHFNS: self.findHfnTrees()
break break
if self.conf.useClockTree: self.splitClocks() if self.conf.useClockTree: self.splitClocks()
if self.conf.isCoreBlock: self.doConnectCore() if self.conf.isCoreBlock: self.doConnectCore()

View File

@ -548,23 +548,26 @@ class ChipConf ( object ):
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# Class : "configuration.BufferInterface". # Class : "configuration.BufferConf".
class BufferInterface ( object ): class BufferConf ( object ):
"""
Store informations on the buffer(s) to use for Net buffering operations
and clock trees.
"""
def __init__ ( self, framework ): def __init__ ( self, framework ):
trace( 550, ',+', '\tBufferInterface.__init__()\n' ) trace( 550, ',+', '\tBufferConf.__init__()\n' )
self.maxSinks = Cfg.getParamInt('spares.maxSinks').asInt() self.maxSinks = Cfg.getParamInt('spares.maxSinks').asInt()
self.masterCell = framework.getCell( Cfg.getParamString('spares.buffer').asString() self.masterCell = framework.getCell( Cfg.getParamString('spares.buffer').asString()
, CRL.Catalog.State.Views ) , CRL.Catalog.State.Views )
if not self.masterCell: if not self.masterCell:
trace( 550, '-' ) trace( 550, '-' )
raise ErrorMessage( 3, [ 'ClockTree: Buffer cell "{}" not found in library,' \ raise ErrorMessage( 3, [ 'BufferConf.__init__(): Buffer cell "{}" not found in library,' \
.format(Cfg.getParamString('spares.buffer').asString()) .format(Cfg.getParamString('spares.buffer').asString())
, ' please check the "spares.buffer" configuration parameter in "plugins.conf".' ] ) , ' please check the "spares.buffer" configuration parameter in "plugins.conf".' ] )
trace( 550, '\t| masterCell :{}\n'.format(self.masterCell) ) trace( 550, '\t| masterCell :{}\n'.format(self.masterCell) )
trace( 550, '\t| maximum sinks:{}\n'.format(self.maxSinks) ) trace( 550, '\t| maximum sinks:{}\n'.format(self.maxSinks) )
self.count = 0 self.count = 0
self.input = None self.input = None
self.output = None self.output = None
@ -573,7 +576,14 @@ class BufferInterface ( object ):
if net.isGlobal(): continue if net.isGlobal(): continue
if net.getDirection() & Net.Direction.IN: self.input = net.getName() if net.getDirection() & Net.Direction.IN: self.input = net.getName()
elif net.getDirection() & Net.Direction.OUT: self.output = net.getName() elif net.getDirection() & Net.Direction.OUT: self.output = net.getName()
if self.input is None:
raise ErrorMessage( 3, [ 'BufferConf.__init__(): Cannot guess the input terminal of "{}",' \
.format(Cfg.getParamString('spares.buffer').asString())
, ' please check that the Nets directions are set.' ] )
if self.output is None:
raise ErrorMessage( 3, [ 'BufferConf.__init__(): Cannot guess the output terminal of "{}",' \
.format(Cfg.getParamString('spares.buffer').asString())
, ' please check that the Nets directions are set.' ] )
trace( 550, '\t| input :"{}"\n'.format(self.input ) ) trace( 550, '\t| input :"{}"\n'.format(self.input ) )
trace( 550, '\t| output :"{}"\n'.format(self.output) ) trace( 550, '\t| output :"{}"\n'.format(self.output) )
trace( 550, '-' ) trace( 550, '-' )
@ -589,11 +599,16 @@ class BufferInterface ( object ):
def height ( self ): return self.masterCell.getAbutmentBox().getHeight() def height ( self ): return self.masterCell.getAbutmentBox().getHeight()
def createBuffer ( self, cell ): def createBuffer ( self, cell ):
"""
Create a new buffer *instance* in Cell. The instance is named "spare_buffer_<Nb>",
where ``<Nb>`` is an ever incrementing counter (self.count).
"""
instance = Instance.create( cell, 'spare_buffer_{}'.format(self.count), self.masterCell ) instance = Instance.create( cell, 'spare_buffer_{}'.format(self.count), self.masterCell )
self.count += 1 self.count += 1
return instance return instance
def resetBufferCount ( self ): def resetBufferCount ( self ):
"""Reset the buffer instance counter (to use only in case of design reset)."""
self.count = 0 self.count = 0
@ -620,7 +635,6 @@ class FeedsConf ( object ):
self.feeds.append( (feedWidth,feedCell) ) self.feeds.append( (feedWidth,feedCell) )
self.feeds.sort( key=itemgetter(0) ) self.feeds.sort( key=itemgetter(0) )
self.feeds.reverse() self.feeds.reverse()
print( self.feeds )
for i in range(len(self.feeds)): for i in range(len(self.feeds)):
trace( 550, '\t[{:>2}] {:>10} {}\n' \ trace( 550, '\t[{:>2}] {:>10} {}\n' \
.format(i,DbU.getValueString(self.feeds[i][0]),self.feeds[i][1]) ) .format(i,DbU.getValueString(self.feeds[i][0]),self.feeds[i][1]) )
@ -827,7 +841,7 @@ class BlockConf ( GaugeConf ):
self.editor = None self.editor = None
self.framework = CRL.AllianceFramework.get() self.framework = CRL.AllianceFramework.get()
self.cfg = CfgCache('',Cfg.Parameter.Priority.Interactive) self.cfg = CfgCache('',Cfg.Parameter.Priority.Interactive)
self.bufferConf = BufferInterface( self.framework ) self.bufferConf = BufferConf( self.framework )
self.feedsConf = FeedsConf( self.framework ) self.feedsConf = FeedsConf( self.framework )
self.chipConf = ChipConf( self ) self.chipConf = ChipConf( self )
self.bColumns = 2 self.bColumns = 2
@ -840,6 +854,7 @@ class BlockConf ( GaugeConf ):
self.fixedHeight = None self.fixedHeight = None
self.deltaAb = [ 0, 0, 0, 0 ] self.deltaAb = [ 0, 0, 0, 0 ]
self.useClockTree = False self.useClockTree = False
self.useHFNS = False
self.useSpares = True self.useSpares = True
self.isBuilt = False self.isBuilt = False
self.ioPins = [] self.ioPins = []

View File

@ -68,8 +68,6 @@ class Chip ( Block ):
def __init__ ( self, conf ): def __init__ ( self, conf ):
super(Chip,self).__init__( conf ) super(Chip,self).__init__( conf )
print( 'Core: {}'.format(self.conf.core) )
print( '| AB: {}'.format(self.conf.core.getAbutmentBox()) )
def validate ( self ): def validate ( self ):
self.conf.validated = True self.conf.validated = True

View File

@ -101,7 +101,6 @@ class ChipConf ( BlockConf ):
def __init__ ( self, cell, ioPins=[], ioPads=[] ): def __init__ ( self, cell, ioPins=[], ioPads=[] ):
trace( 550, ',+', 'ChipConf.__init__(): "{}"'.format(cell.getName()) ) trace( 550, ',+', 'ChipConf.__init__(): "{}"'.format(cell.getName()) )
print( super(ChipConf,self).__init__ )
super(ChipConf,self).__init__( cell, ioPins, ioPads ) super(ChipConf,self).__init__( cell, ioPins, ioPads )
# trace( 550, '\tONE LAMBDA = %s\n' % DbU.getValueString(DbU.fromLambda(1.0)) ) # trace( 550, '\tONE LAMBDA = %s\n' % DbU.getValueString(DbU.fromLambda(1.0)) )
self.validated = True self.validated = True
@ -577,7 +576,6 @@ class ChipConf ( BlockConf ):
return return
def checkChipSize ( self ): def checkChipSize ( self ):
print( 'checkChipSize' )
if self.chipSize[0] % self.sliceStep: if self.chipSize[0] % self.sliceStep:
print( WarningMessage( 'ChipConf.checkChipSize(): Width of "{}" ({})is not on sliceStep ({}), ajusted.' \ print( WarningMessage( 'ChipConf.checkChipSize(): Width of "{}" ({})is not on sliceStep ({}), ajusted.' \
.format( self.chipConf.name .format( self.chipConf.name

View File

@ -488,8 +488,6 @@ class Builder ( object ):
def __init__ ( self, block ): def __init__ ( self, block ):
self.block = block self.block = block
self.innerBb = self.block.bb self.innerBb = self.block.bb
print( 'Builder.__init__(): innerBb: {}'.format(self.innerBb) )
print( self.block.path.getTransformation())
self.block.path.getTransformation().applyOn( self.innerBb ) self.block.path.getTransformation().applyOn( self.innerBb )
self.innerBb.inflate( self.hRailSpace/2, self.vRailSpace/2 ) self.innerBb.inflate( self.hRailSpace/2, self.vRailSpace/2 )
self.southSide = SouthSide( self ) self.southSide = SouthSide( self )

View File

@ -220,7 +220,6 @@ class Builder ( object ):
return return
htPlugs = [] htPlugs = []
for plug in self.conf.coronaCk.getPlugs(): for plug in self.conf.coronaCk.getPlugs():
print( plug )
if plug.getInstance().isTerminalNetlist(): if plug.getInstance().isTerminalNetlist():
htPlugs.append( plug ) htPlugs.append( plug )
if len(htPlugs) != 1: if len(htPlugs) != 1:
@ -228,7 +227,6 @@ class Builder ( object ):
.format( self.conf.coronaCk.getName() .format( self.conf.coronaCk.getName()
, self.conf.icore.getName() , self.conf.icore.getName()
, len(htPlugs)) ] , len(htPlugs)) ]
print( self.conf.icore )
for plug in htPlugs: for plug in htPlugs:
message += [ '\n - {} {}'.format(plug,plug.getInstance()) ] message += [ '\n - {} {}'.format(plug,plug.getInstance()) ]
raise ErrorMessage( 1, message ) raise ErrorMessage( 1, message )

View File

@ -248,7 +248,6 @@ class IoPad ( object ):
@property @property
def pads ( self ): def pads ( self ):
print( self.ioPadConf )
return self.ioPadConf.pads return self.ioPadConf.pads
def __str__ ( self ): def __str__ ( self ):