3 from __future__
import print_function
9 if os
.environ
.has_key('NDA_TOP'):
10 NdaDirectory
= os
.environ
['NDA_TOP']
12 hostname
= socket
.gethostname()
13 if hostname
.startswith('lepka'):
14 NdaDirectory
= '/dsk/l1/jpc/crypted/soc/techno'
15 if not os
.path
.isdir(NdaDirectory
):
16 print( '[ERROR] You forgot to mount the NDA encrypted directory, stupid!' )
18 NdaDirectory
= '/users/soft/techno/techno'
19 helpers
.setNdaTopDir( NdaDirectory
)
22 from Hurricane
import DataBase
, Cell
, Instance
, Net
23 from CRL
import AllianceFramework
24 from helpers
import overlay
, l
, u
, n
25 from NDA
.node180
.tsmc_c018
import techno
, FlexLib
, LibreSOCIO
, LibreSOCMem
, pll
35 af
= AllianceFramework
.get()
38 def createSramBlackbox ():
40 print( ' o Creating SRAM blackboxes for "ls180" design.' )
41 rootlib
= db
.getRootLibrary()
42 lib
= rootlib
.getLibrary( 'LibreSOCMem' )
43 sramName
= 'spblock_512w64b8w'
44 sram
= lib
.getCell( sramName
)
46 raise ErrorMessage( 1, 'settings.createSramBlocks(): SRAM Cell "{}" not found.' \
48 sram
.setAbstractedSupply( True )
49 blackboxeNames
= [ 'spblock512w64b8w_0'
50 , 'spblock512w64b8w_1'
51 , 'spblock512w64b8w_2'
52 , 'spblock512w64b8w_3'
54 for blackboxName
in blackboxeNames
:
55 cell
= Cell
.create( lib
, blackboxName
)
56 instance
= Instance
.create( cell
, 'real_sram', sram
)
57 state
= af
.getCatalog().getState( blackboxName
, True )
59 state
.setLogical( True )
60 state
.setInMemory( True )
61 print( ' - {}.'.format(cell
) )
62 for masterNet
in sram
.getNets():
63 if not masterNet
.isExternal():
65 net
= Net
.create( cell
, masterNet
.getName() )
66 net
.setDirection( masterNet
.getDirection() )
67 net
.setType( masterNet
.getType() )
68 net
.setExternal( True )
69 net
.setGlobal( masterNet
.isGlobal() )
70 if masterNet
.isSupply():
72 plug
= instance
.getPlug( masterNet
)
76 with overlay
.CfgCache(priority
=Cfg
.Parameter
.Priority
.UserFile
) as cfg
:
77 cfg
.misc
.catchCore
= False
78 cfg
.misc
.minTraceLevel
= 12300
79 cfg
.misc
.maxTraceLevel
= 12400
81 cfg
.misc
.paranoid
= False
83 cfg
.misc
.logMode
= True
84 cfg
.misc
.verboseLevel1
= True
85 cfg
.misc
.verboseLevel2
= True
86 cfg
.etesian
.graphics
= 3
87 cfg
.etesian
.spaceMargin
= 0.10
88 cfg
.katana
.eventsLimit
= 4000000
89 env
= af
.getEnvironment()
90 env
.setCLOCK( '^sys_clk$|^ck|^jtag_tck$' )
92 with overlay
.UpdateSession():