22e72f516db1a50f498b436d69413dd8c2dc7f67
3 from __future__
import print_function
6 #import node180.scn6m_deep_09
7 from helpers
import overlay
, l
, u
, n
14 from Hurricane
import DataBase
, Cell
, Instance
, Net
15 from CRL
import AllianceFramework
, RoutingLayerGauge
18 from helpers
.overlay
import CfgCache
19 import symbolic
.cmos45
# do not remove
22 if os
.environ
.has_key('NDA_TOP'):
23 NdaDirectory
= os
.environ
['NDA_TOP']
25 hostname
= socket
.gethostname()
26 if hostname
.startswith('lepka'):
27 NdaDirectory
= '/dsk/l1/jpc/crypted/soc/techno'
28 if not os
.path
.isdir(NdaDirectory
):
29 print ('[ERROR] You forgot to mount the NDA encrypted directory, stupid!')
31 NdaDirectory
= '/users/soft/techno/techno'
32 helpers
.setNdaTopDir( NdaDirectory
)
34 # select one or other of these
36 from NDA
.node45
.freepdk45_c4m
import techno
, FlexLib
, LibreSOCIO
41 import symbolic
.cmos45
46 if os
.environ
.has_key('CELLS_TOP'):
47 cellsTop
= os
.environ
['CELLS_TOP']
49 cellsTop
= '../../../alliance-check-toolkit/cells'
52 af
= AllianceFramework
.get()
55 def createPLLBlackbox ():
57 print( ' o Creating PLL blackboxes for "ls180" design.' )
58 rootlib
= db
.getRootLibrary()
59 lib
= rootlib
.getLibrary( 'pll' )
61 pll
= lib
.getCell( pllName
)
63 raise ErrorMessage( 1, 'settings.createPLLBlackBox(): '
64 'PLL Cell "{}" not found.' \
66 pll
.setAbstractedSupply( True )
67 blackboxName
= 'real_pll'
68 cell
= Cell
.create( lib
, blackboxName
)
69 instance
= Instance
.create( cell
, 'real_pll', pll
)
70 state
= af
.getCatalog().getState( blackboxName
, True )
72 state
.setLogical( True )
73 state
.setInMemory( True )
74 print( ' - {}.'.format(cell
) )
75 for masterNet
in pll
.getNets():
76 if not masterNet
.isExternal():
78 net
= Net
.create( cell
, masterNet
.getName() )
79 net
.setDirection( masterNet
.getDirection() )
80 net
.setType( masterNet
.getType() )
81 net
.setExternal( True )
82 net
.setGlobal( masterNet
.isGlobal() )
83 if masterNet
.isSupply():
85 plug
= instance
.getPlug( masterNet
)
89 with overlay
.CfgCache(priority
=Cfg
.Parameter
.Priority
.UserFile
) as cfg
:
90 cfg
.misc
.catchCore
= False
92 cfg
.misc
.paranoid
= False
94 cfg
.misc
.logMode
= True
95 cfg
.misc
.verboseLevel1
= True
96 cfg
.misc
.verboseLevel2
= True
97 cfg
.etesian
.graphics
= 3
98 cfg
.etesian
.spaceMargin
= 0.05
99 cfg
.etesian
.aspectRatio
= 1.0
100 cfg
.anabatic
.edgeLenght
= 24
101 cfg
.anabatic
.edgeWidth
= 8
102 cfg
.anabatic
.topRoutingLayer
= 'METAL5'
103 cfg
.katana
.eventsLimit
= 4000000
104 cfg
.etesian
.effort
= 2
105 cfg
.etesian
.uniformDensity
= True
106 cfg
.katana
.hTracksReservedLocal
= 7
107 cfg
.katana
.vTracksReservedLocal
= 6
108 Viewer
.Graphics
.setStyle( 'Alliance.Classic [black]' )
109 af
= CRL
.AllianceFramework
.get()
110 env
= af
.getEnvironment()
111 env
.setCLOCK( '^sys_clk$|^ck|^jtag_tck$' )
112 env
.setPOWER( 'vdd' )
113 env
.setGROUND( 'vss' )
114 env
.addSYSTEM_LIBRARY( library
=cellsTop
+'/niolib',
115 mode
=CRL
.Environment
.Prepend
)
116 env
.addSYSTEM_LIBRARY( library
=cellsTop
+'/nsxlib',
117 mode
=CRL
.Environment
.Prepend
)
119 # runs the "fake" pll blackbox create
120 with overlay
.UpdateSession():
123 print( ' o Successfully run "<>/coriolis2/settings.py".' )
124 print( ' - CELLS_TOP = "{}"'.format(cellsTop
) )