Allow the user to choose the name of the SRAM. Placement fix.
* Change: In cumulus/plugins.sram.sram_256x32, add a new parameter to __init__() so the user can choose the model name of the generated SRAM. * Change: In cumulus/plugins.sram.sram.BaseSRAM.placeInstance(), placement status must be FIXED instead of PLACED so the placer do not "unplace" them. The Cell.updatePlacedFlag() method must also be called once the model if fully built.
This commit is contained in:
parent
11bae679f1
commit
1253eeeef4
|
@ -795,7 +795,7 @@ class BaseSRAM ( object ):
|
|||
transf = Transformation( x, y, orient )
|
||||
self.position.applyOn( transf )
|
||||
inst.setTransformation( transf )
|
||||
inst.setPlacementStatus( Instance.PlacementStatus.PLACED )
|
||||
inst.setPlacementStatus( Instance.PlacementStatus.FIXED )
|
||||
return inst.getAbutmentBox()
|
||||
|
||||
def findFoldColumns ( self ):
|
||||
|
|
|
@ -207,7 +207,7 @@ class SRAM_256x32 ( BaseSRAM ):
|
|||
BIT_GROUP_FMT = 'bit_addr{:04d}_g'
|
||||
MUX_GROUP_FMT = 'bits_{}_g'
|
||||
|
||||
def __init__ ( self, fold ):
|
||||
def __init__ ( self, fold, name=None ):
|
||||
BaseSRAM.__init__( self, fold )
|
||||
if fold == 1:
|
||||
pass
|
||||
|
@ -219,7 +219,9 @@ class SRAM_256x32 ( BaseSRAM ):
|
|||
self.foldTags = [ 'imux_addr0096', 'imux_addr0192', 'imux_addr0160' ]
|
||||
else:
|
||||
raise ErrorMessage( 1, 'SRAM_256x32.__init__(): Unsupported fold {}, valid values are 1, 2, 4.'.format( fold ))
|
||||
self.cell = af.createCell( 'spram_256x32' )
|
||||
if not name:
|
||||
name = 'spram_256x32'
|
||||
self.cell = af.createCell( name )
|
||||
self.mx2Cell = self.confLib.getStdCell( 'mx2_x2' )
|
||||
self.mx3Cell = self.confLib.getStdCell( 'mx3_x2' )
|
||||
self.na2Cell = self.confLib.getStdCell( 'na2_x1' )
|
||||
|
@ -296,6 +298,7 @@ class SRAM_256x32 ( BaseSRAM ):
|
|||
rstCol.setBusNet( 'nq', busDato )
|
||||
omuxRoot.parent.group( rstCol, after=omuxRoot )
|
||||
af.saveCell( self.cell, CRL.Catalog.State.Logical )
|
||||
self.cell.updatePlacedFlag()
|
||||
|
||||
def _buildOutputMux_nao23 ( self ):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue