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 '
17 'encrypted directory, stupid!')
19 NdaDirectory
= '/users/soft/techno/techno'
20 helpers
.setNdaTopDir( NdaDirectory
)
23 from Hurricane
import DataBase
, Cell
, Instance
, Net
24 from CRL
import AllianceFramework
, RoutingLayerGauge
25 from helpers
import overlay
, l
, u
, n
26 from helpers
import overlay
, l
, u
, n
27 from NDA
.node45
.freepdk45_c4m
import techno
, FlexLib
, LibreSOCIO
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(): '
47 'SRAM Cell "{}" not found.' \
49 sram
.setAbstractedSupply( True )
50 blackboxeNames
= [ 'spblock512w64b8w_0'
51 , 'spblock512w64b8w_1'
52 , 'spblock512w64b8w_2'
53 , 'spblock512w64b8w_3'
55 for blackboxName
in blackboxeNames
:
56 cell
= Cell
.create( lib
, blackboxName
)
57 instance
= Instance
.create( cell
, 'real_sram', sram
)
58 state
= af
.getCatalog().getState( blackboxName
, True )
60 state
.setLogical( True )
61 state
.setInMemory( True )
62 print( ' - {}.'.format(cell
) )
63 for masterNet
in sram
.getNets():
64 if not masterNet
.isExternal():
66 net
= Net
.create( cell
, masterNet
.getName() )
67 net
.setDirection( masterNet
.getDirection() )
68 net
.setType( masterNet
.getType() )
69 net
.setExternal( True )
70 net
.setGlobal( masterNet
.isGlobal() )
71 if masterNet
.isSupply():
73 plug
= instance
.getPlug( masterNet
)
77 with overlay
.CfgCache(priority
=Cfg
.Parameter
.Priority
.UserFile
) as cfg
:
78 cfg
.misc
.catchCore
= False
79 cfg
.misc
.minTraceLevel
= 12300
80 cfg
.misc
.maxTraceLevel
= 12400
82 cfg
.misc
.paranoid
= False
84 cfg
.misc
.logMode
= True
85 cfg
.misc
.verboseLevel1
= True
86 cfg
.misc
.verboseLevel2
= True
87 cfg
.etesian
.graphics
= 3
88 cfg
.etesian
.spaceMargin
= 0.10
89 cfg
.anabatic
.topRoutingLayer
= 'metal6'
90 cfg
.katana
.eventsLimit
= 4000000
91 af
= AllianceFramework
.get()
92 lg5
= af
.getRoutingGauge('FlexLib').getLayerGauge( 5 )
93 lg5
.setType( RoutingLayerGauge
.PowerSupply
)
94 env
= af
.getEnvironment()
95 env
.setCLOCK( '^sys_clk$|^ck|^jtag_tck$' )
97 with overlay
.UpdateSession():