import symbolic.cmos45 # do not remove
import os
-import LibreSOCMem
+import LibreSOCMem, pll
LibreSOCMem.setup()
+pll.setup()
if os.environ.has_key('CELLS_TOP'):
cellsTop = os.environ['CELLS_TOP']
af = AllianceFramework.get()
+def createPLLBlackbox ():
+ global db, af
+ print( ' o Creating PLL blackboxes for "ls180" design.' )
+ rootlib = db.getRootLibrary()
+ lib = rootlib.getLibrary( 'pll' )
+ pllName = 'pll'
+ pll = lib.getCell( sramName )
+ if not pll:
+ raise ErrorMessage( 1, 'settings.createPLLBlackBox(): '
+ 'PLL Cell "{}" not found.' \
+ .format(sramName) )
+ sram.setAbstractedSupply( True )
+ blackboxName = 'pll'
+ cell = Cell.create( lib, blackboxName )
+ instance = Instance.create( cell, 'pll', pll )
+ state = af.getCatalog().getState( blackboxName, True )
+ state.setCell( cell )
+ state.setLogical( True )
+ state.setInMemory( True )
+ print( ' - {}.'.format(cell) )
+ for masterNet in pll.getNets():
+ if not masterNet.isExternal():
+ continue
+ net = Net.create( cell, masterNet.getName() )
+ net.setDirection( masterNet.getDirection() )
+ net.setType( masterNet.getType() )
+ net.setExternal( True )
+ net.setGlobal( masterNet.isGlobal() )
+ if masterNet.isSupply():
+ continue
+ plug = instance.getPlug( masterNet )
+ plug.setNet( net )
+
def createSramBlackbox ():
global db, af
print( ' o Creating SRAM blackboxes for "ls180" design.' )
# TODO: create a fake one
with overlay.UpdateSession():
createSramBlackbox()
+ createPLLBlackbox()
print( ' o Successfully run "<>/coriolis2/settings.py".' )
print( ' - CELLS_TOP = "{}"'.format(cellsTop) )