Skip to content

Commit

Permalink
add spice netlists to libs
Browse files Browse the repository at this point in the history
  • Loading branch information
gadfort committed Feb 20, 2024
1 parent 02d9ada commit 9864e2a
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 41 deletions.
2 changes: 2 additions & 0 deletions lambdapdk/asap7/libs/asap7sc7p5t.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def _setup_lib(chip, libname, suffix):
for corner_name, lib_corner in corners.items():
lib.add('output', corner_name, 'nldm',
libdir + '/nldm/' + libname + '_' + lib_corner + '.lib.gz')
# spice
lib.add('output', corner_name, 'spice', libdir + '/netlist/' + libname + '.sp')

# lef
lib.add('output', stackup, 'lef', libdir + '/lef/' + libname + '.lef')
Expand Down
91 changes: 50 additions & 41 deletions lambdapdk/gf180/libs/gf180io.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,56 @@ def setup(chip):
'''
libdir = "lambdapdk/gf180/libs/gf180mcu_fd_io/"

lib = siliconcompiler.Library(chip, 'gf180mcu_fd_io', package='lambdapdk')
register_data_source(lib)

# pdk
lib.set('option', 'pdk', 'gf180')

lib.set('output', 'slow', 'nldm',
os.path.join(libdir, 'nldm/gf180mcu_fd_io__ss_125C_2v97.lib.gz'))
lib.set('output', 'typical', 'nldm',
os.path.join(libdir, 'nldm/gf180mcu_fd_io__tt_025C_3v30.lib.gz'))
lib.set('output', 'fast', 'nldm',
os.path.join(libdir, 'nldm/gf180mcu_fd_io__ff_125C_3v63.lib.gz'))

for stackup in ("3LM_1TM_6K",
"3LM_1TM_9K",
"3LM_1TM_11K",
"3LM_1TM_30K",
"4LM_1TM_6K",
"4LM_1TM_9K",
"4LM_1TM_11K",
"4LM_1TM_30K",
"5LM_1TM_9K",
"5LM_1TM_11K"):
stackup_start = stackup[0:3]
lib.set('output', stackup, 'lef',
os.path.join(libdir, f'lef/{stackup_start}/gf180mcu_fd_io.lef'))
lib.set('output', stackup, 'cdl', os.path.join(libdir, 'cdl/gf180mcu_fd_io.cdl'))

# Need both GDS files: ef relies on fd one
lib.add('output', stackup, 'gds',
os.path.join(libdir, f'gds/{stackup_start}/gf180mcu_fd_io.gds.gz'))

lib.set('asic', 'cells', 'filler', ['gf180mcu_fd_io__fill1',
'gf180mcu_fd_io__fill5',
'gf180mcu_fd_io__fill10',
'gf180mcu_fd_io__fillnc'])

lib.set('option', 'ydir', os.path.join(libdir, 'lambda'))
lib.set('option', 'idir', os.path.join(libdir, 'lambda'))

return lib
libs = []
for substack in ("3LM", "4LM", "5LM"):
lib = siliconcompiler.Library(chip, f'gf180mcu_fd_io_{substack}', package='lambdapdk')
register_data_source(lib)

# pdk
lib.set('option', 'pdk', 'gf180')

lib.set('output', 'slow', 'nldm',
os.path.join(libdir, 'nldm/gf180mcu_fd_io__ss_125C_2v97.lib.gz'))
lib.set('output', 'typical', 'nldm',
os.path.join(libdir, 'nldm/gf180mcu_fd_io__tt_025C_3v30.lib.gz'))
lib.set('output', 'fast', 'nldm',
os.path.join(libdir, 'nldm/gf180mcu_fd_io__ff_125C_3v63.lib.gz'))

for corner in ('slow', 'typical', 'fast'):
lib.set('output', corner, 'spice',
os.path.join(libdir, f'spice/{substack}/gf180mcu_fd_io.spice'))

for stackup in ("3LM_1TM_6K",
"3LM_1TM_9K",
"3LM_1TM_11K",
"3LM_1TM_30K",
"4LM_1TM_6K",
"4LM_1TM_9K",
"4LM_1TM_11K",
"4LM_1TM_30K",
"5LM_1TM_9K",
"5LM_1TM_11K"):
stackup_start = stackup[0:3]
if substack != stackup_start:
continue
lib.set('output', stackup, 'lef',
os.path.join(libdir, f'lef/{stackup_start}/gf180mcu_fd_io.lef'))
lib.set('output', stackup, 'cdl', os.path.join(libdir, 'cdl/gf180mcu_fd_io.cdl'))

lib.add('output', stackup, 'gds',
os.path.join(libdir, f'gds/{stackup_start}/gf180mcu_fd_io.gds.gz'))

lib.set('asic', 'cells', 'filler', ['gf180mcu_fd_io__fill1',
'gf180mcu_fd_io__fill5',
'gf180mcu_fd_io__fill10',
'gf180mcu_fd_io__fillnc'])

lib.set('option', 'ydir', os.path.join(libdir, 'lambda'))
lib.set('option', 'idir', os.path.join(libdir, 'lambda'))

libs.append(lib)

return libs


#########################
Expand Down
4 changes: 4 additions & 0 deletions lambdapdk/gf180/libs/gf180mcu.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def setup(chip):
lib.add('output', 'fast', 'nldm',
libdir + f'/nldm/gf180mcu_fd_sc_mcu{libtype}5v0__ff_n40C_5v50.lib.gz')

for corner in ('slow', 'typical', 'fast'):
lib.add('output', corner, 'spice',
libdir + f'/spice/gf180mcu_fd_sc_mcu{libtype}5v0.spice')

for stackup in ("3LM_1TM_6K",
"3LM_1TM_9K",
"3LM_1TM_11K",
Expand Down
4 changes: 4 additions & 0 deletions lambdapdk/gf180/libs/gf180sram.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def setup(chip):
lib.add('output', 'fast', 'nldm',
f'{path_base}/nldm/{mem_name}__ff_n40C_5v50.lib.gz')

for corner in ('slow', 'typical', 'fast'):
lib.add('output', corner, 'spice',
f'{path_base}/spice/{mem_name}.spice')

lib.set('option', 'file', 'openroad_pdngen', f'{path_base}/pdngen.tcl')

lib.set('option', 'ydir', f'{path_base}/lambda')
Expand Down
1 change: 1 addition & 0 deletions lambdapdk/sky130/libs/sky130sram.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def setup(chip):
for corner in ('slow', 'fast', 'typical'):
lib.add('output', corner, 'nldm',
f'{path_base}/{mem_name}/nldm/{mem_name}_TT_1p8V_25C.lib')
lib.add('output', corner, 'spice', f'{path_base}/{mem_name}/spice/{mem_name}.sp')

lib.set('option', 'file', 'openroad_pdngen', f'{path_base}/pdngen.tcl')

Expand Down

0 comments on commit 9864e2a

Please sign in to comment.