lambdapdk 0.1.56__py3-none-any.whl → 0.2.0rc2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,163 +1,209 @@
1
- import siliconcompiler
2
- from lambdapdk import register_data_source
3
-
4
-
5
- def setup():
1
+ from pathlib import Path
2
+
3
+ from lambdapdk import LambdaLibrary
4
+ from lambdapdk.gf180 import GF180_3LM_1TM_6K_7t, \
5
+ GF180_3LM_1TM_6K_9t, \
6
+ GF180_3LM_1TM_9K_7t, \
7
+ GF180_3LM_1TM_9K_9t, \
8
+ GF180_3LM_1TM_11K_7t, \
9
+ GF180_3LM_1TM_11K_9t, \
10
+ GF180_3LM_1TM_30K_7t, \
11
+ GF180_3LM_1TM_30K_9t, \
12
+ GF180_4LM_1TM_6K_7t, \
13
+ GF180_4LM_1TM_6K_9t, \
14
+ GF180_4LM_1TM_9K_7t, \
15
+ GF180_4LM_1TM_9K_9t, \
16
+ GF180_4LM_1TM_11K_7t, \
17
+ GF180_4LM_1TM_11K_9t, \
18
+ GF180_4LM_1TM_30K_7t, \
19
+ GF180_4LM_1TM_30K_9t, \
20
+ GF180_5LM_1TM_9K_7t, \
21
+ GF180_5LM_1TM_9K_9t, \
22
+ GF180_5LM_1TM_11K_7t, \
23
+ GF180_5LM_1TM_11K_9t, \
24
+ GF180_6LM_1TM_9K_7t, \
25
+ GF180_6LM_1TM_9K_9t
26
+
27
+
28
+ class _GF180_MCULibrary(LambdaLibrary):
6
29
  '''
7
- Skywater130 standard cell library.
30
+ GF180 standard cell library.
8
31
  '''
9
-
10
- libs = []
11
- for libtype, sites in (("7t", "GF018hv5v_mcu_sc7"),
12
- ("9t", "GF018hv5v_green_sc9")):
13
- libname = f'gf180mcu_fd_sc_mcu{libtype}5v0'
14
-
15
- libdir = f"lambdapdk/gf180/libs/{libname}/"
16
-
17
- lib = siliconcompiler.Library(libname, package='lambdapdk')
18
- register_data_source(lib)
19
-
20
- # pdk
21
- lib.set('option', 'pdk', 'gf180')
22
-
23
- # footprint/type/sites
24
- lib.set('asic', 'libarch', libtype)
25
- lib.set('asic', 'site', libtype, sites)
26
-
27
- # model files
28
- lib.add('output', 'slow', 'nldm',
29
- libdir + f'/nldm/gf180mcu_fd_sc_mcu{libtype}5v0__ss_125C_4v50.lib.gz')
30
- lib.add('output', 'typical', 'nldm',
31
- libdir + f'/nldm/gf180mcu_fd_sc_mcu{libtype}5v0__tt_025C_5v00.lib.gz')
32
- lib.add('output', 'fast', 'nldm',
33
- libdir + f'/nldm/gf180mcu_fd_sc_mcu{libtype}5v0__ff_n40C_5v50.lib.gz')
34
-
35
- for corner in ('slow', 'typical', 'fast'):
36
- lib.add('output', corner, 'spice',
37
- libdir + f'/spice/gf180mcu_fd_sc_mcu{libtype}5v0.spice')
38
-
39
- for stackup in ("3LM_1TM_6K",
40
- "3LM_1TM_9K",
41
- "3LM_1TM_11K",
42
- "3LM_1TM_30K",
43
- "4LM_1TM_6K",
44
- "4LM_1TM_9K",
45
- "4LM_1TM_11K",
46
- "4LM_1TM_30K",
47
- "5LM_1TM_9K",
48
- "5LM_1TM_11K",
49
- "6LM_1TM_9K"):
50
- lib.add('output', stackup, 'lef', libdir + f'/lef/gf180mcu_fd_sc_mcu{libtype}5v0.lef')
51
- lib.add('output', stackup, 'cdl', libdir + f'/cdl/gf180mcu_fd_sc_mcu{libtype}5v0.cdl')
52
- gds_dir = stackup[0:3]
53
- if gds_dir == "6LM":
54
- gds_dir = "5LM"
55
- lib.add('output', stackup, 'gds',
56
- libdir + f'/gds/{gds_dir}/gf180mcu_fd_sc_mcu{libtype}5v0.gds.gz')
32
+ def __init__(self, libtype, stackup):
33
+ super().__init__()
34
+ self.set_name(f"gf180mcu_fd_sc_mcu{libtype}5v0_{stackup}")
35
+
36
+ if libtype == "7t":
37
+ if stackup == "3LM":
38
+ self.add_asic_pdk(GF180_3LM_1TM_6K_7t(), default=False)
39
+ self.add_asic_pdk(GF180_3LM_1TM_9K_7t(), default=False)
40
+ self.add_asic_pdk(GF180_3LM_1TM_11K_7t(), default=False)
41
+ self.add_asic_pdk(GF180_3LM_1TM_30K_7t(), default=False)
42
+ elif stackup == "4LM":
43
+ self.add_asic_pdk(GF180_4LM_1TM_6K_7t(), default=False)
44
+ self.add_asic_pdk(GF180_4LM_1TM_9K_7t(), default=False)
45
+ self.add_asic_pdk(GF180_4LM_1TM_11K_7t(), default=False)
46
+ self.add_asic_pdk(GF180_4LM_1TM_30K_7t(), default=False)
47
+ elif stackup == "5LM":
48
+ self.add_asic_pdk(GF180_5LM_1TM_9K_7t(), default=False)
49
+ self.add_asic_pdk(GF180_5LM_1TM_11K_7t(), default=False)
50
+ elif stackup == "6LM":
51
+ self.add_asic_pdk(GF180_6LM_1TM_9K_7t())
52
+ else:
53
+ raise ValueError(f"{stackup} is not supported")
54
+
55
+ self.add_asic_site("GF018hv5v_mcu_sc7")
56
+ elif libtype == "9t":
57
+ if stackup == "3LM":
58
+ self.add_asic_pdk(GF180_3LM_1TM_6K_9t(), default=False)
59
+ self.add_asic_pdk(GF180_3LM_1TM_9K_9t(), default=False)
60
+ self.add_asic_pdk(GF180_3LM_1TM_11K_9t(), default=False)
61
+ self.add_asic_pdk(GF180_3LM_1TM_30K_9t(), default=False)
62
+ elif stackup == "4LM":
63
+ self.add_asic_pdk(GF180_4LM_1TM_6K_9t(), default=False)
64
+ self.add_asic_pdk(GF180_4LM_1TM_9K_9t(), default=False)
65
+ self.add_asic_pdk(GF180_4LM_1TM_11K_9t(), default=False)
66
+ self.add_asic_pdk(GF180_4LM_1TM_30K_9t(), default=False)
67
+ elif stackup == "5LM":
68
+ self.add_asic_pdk(GF180_5LM_1TM_9K_9t(), default=False)
69
+ self.add_asic_pdk(GF180_5LM_1TM_11K_9t(), default=False)
70
+ elif stackup == "6LM":
71
+ self.add_asic_pdk(GF180_6LM_1TM_9K_9t())
72
+ else:
73
+ raise ValueError(f"{stackup} is not supported")
74
+
75
+ self.add_asic_site("GF018hv5v_green_sc9")
76
+ else:
77
+ raise ValueError(f"{libtype} is not supported")
78
+
79
+ lib_path = Path("lambdapdk", "gf180", "libs", f"gf180mcu_fd_sc_mcu{libtype}5v0")
80
+
81
+ with self.active_dataroot("lambdapdk"):
82
+ for corner_name, filename in [
83
+ ('slow', f'gf180mcu_fd_sc_mcu{libtype}5v0__ss_125C_4v50.lib.gz'),
84
+ ('typical', f'gf180mcu_fd_sc_mcu{libtype}5v0__tt_025C_5v00.lib.gz'),
85
+ ('fast', f'gf180mcu_fd_sc_mcu{libtype}5v0__ff_n40C_5v50.lib.gz')]:
86
+ with self.active_fileset(f"models.timing.{corner_name}.nldm"):
87
+ self.add_file(lib_path / "nldm" / filename)
88
+ self.add_asic_libcornerfileset(corner_name, "nldm")
89
+
90
+ with self.active_fileset("models.spice"):
91
+ self.add_file(lib_path / "spice" / f"gf180mcu_fd_sc_mcu{libtype}5v0.spice")
92
+
93
+ with self.active_dataroot("lambdapdk"):
94
+ with self.active_fileset("models.physical"):
95
+ self.add_file(lib_path / "lef" / f"gf180mcu_fd_sc_mcu{libtype}5v0.lef")
96
+ gds_dir = stackup[0:3]
97
+ if gds_dir == "6LM":
98
+ gds_dir = "5LM"
99
+ self.add_file(lib_path / "gds" / gds_dir / f"gf180mcu_fd_sc_mcu{libtype}5v0.gds.gz")
100
+ self.add_asic_aprfileset()
101
+
102
+ with self.active_fileset("models.lvs"):
103
+ self.add_file(lib_path / "cdl" / f"gf180mcu_fd_sc_mcu{libtype}5v0.cdl")
104
+ self.add_asic_aprfileset()
57
105
 
58
106
  # antenna cells
59
- lib.add('asic', 'cells', 'antenna', f'gf180mcu_fd_sc_mcu{libtype}5v0__antenna')
107
+ self.add_asic_celllist('antenna', f'gf180mcu_fd_sc_mcu{libtype}5v0__antenna')
60
108
 
61
109
  # clock buffers
62
110
  for size in (1, 2, 3, 4, 8, 12, 16, 20):
63
- lib.add('asic', 'cells', 'clkbuf', f'gf180mcu_fd_sc_mcu{libtype}5v0__clkbuf_{size}')
111
+ self.add_asic_celllist('clkbuf', f'gf180mcu_fd_sc_mcu{libtype}5v0__clkbuf_{size}')
64
112
 
65
113
  # hold cells
66
114
  for variant in ('a', 'b', 'c', 'd'):
67
115
  for size in (1, 2, 4):
68
- lib.add('asic', 'cells', 'hold',
69
- f'gf180mcu_fd_sc_mcu{libtype}5v0__dly{variant}_{size}')
116
+ self.add_asic_celllist(
117
+ 'hold',
118
+ f'gf180mcu_fd_sc_mcu{libtype}5v0__dly{variant}_{size}')
70
119
 
71
120
  # Decoupling
72
121
  for size in (4, 8, 16, 32, 64):
73
- lib.add('asic', 'cells', 'decap', f'gf180mcu_fd_sc_mcu{libtype}5v0__fillcap_{size}')
122
+ self.add_asic_celllist('decap', f'gf180mcu_fd_sc_mcu{libtype}5v0__fillcap_{size}')
74
123
 
75
124
  # filler
76
125
  for size in (1, 2, 4, 8, 16, 32, 64):
77
- lib.add('asic', 'cells', 'filler', f'gf180mcu_fd_sc_mcu{libtype}5v0__fill_{size}')
126
+ self.add_asic_celllist('filler', f'gf180mcu_fd_sc_mcu{libtype}5v0__fill_{size}')
78
127
 
79
128
  # Tapcell
80
- lib.add('asic', 'cells', 'tap', f'gf180mcu_fd_sc_mcu{libtype}5v0__filltie')
129
+ self.add_asic_celllist('tap', f'gf180mcu_fd_sc_mcu{libtype}5v0__filltie')
81
130
 
82
131
  # Endcap
83
- lib.add('asic', 'cells', 'endcap', f'gf180mcu_fd_sc_mcu{libtype}5v0__endcap')
132
+ self.add_asic_celllist('endcap', f'gf180mcu_fd_sc_mcu{libtype}5v0__endcap')
84
133
 
85
134
  # Dont use
86
- lib.add('asic', 'cells', 'dontuse', '*_1')
135
+ self.add_asic_celllist('dontuse', '*_1')
87
136
 
88
137
  # tie cells
89
- lib.add('asic', 'cells', 'tie', [f'gf180mcu_fd_sc_mcu{libtype}5v0__tieh',
90
- f'gf180mcu_fd_sc_mcu{libtype}5v0__tiel'])
91
-
92
- # Defaults for OpenROAD tool variables
93
- lib.set('option', 'var', 'openroad_place_density', '0.50')
94
- lib.set('option', 'var', 'openroad_pad_global_place', '0')
95
- lib.set('option', 'var', 'openroad_pad_detail_place', '0')
96
- lib.set('option', 'var', 'openroad_macro_place_halo', ['15', '15'])
97
- lib.set('option', 'var', 'openroad_macro_place_channel', ['30.16', '30.16'])
98
-
99
- # Yosys techmap
100
- lib.add('option', 'file', 'yosys_techmap', libdir + '/techmap/yosys/cells_latch.v')
101
- lib.add('option', 'file', 'yosys_addermap', libdir + '/techmap/yosys/cells_adders.v')
102
- lib.add('option', 'file', 'yosys_tbufmap', libdir + '/techmap/yosys/cells_tristatebuf.v')
103
-
104
- # Openroad specific files
105
- lib.set('option', 'file', 'openroad_pdngen',
106
- libdir + '/apr/openroad/pdngen.tcl')
107
- lib.set('option', 'file', 'openroad_global_connect',
108
- libdir + '/apr/openroad/global_connect.tcl')
109
- lib.set('option', 'file', 'openroad_tapcells',
110
- libdir + '/apr/openroad/tapcell.tcl')
111
-
112
- lib.set('option', 'var', 'openroad_cts_distance_between_buffers', "100")
113
-
114
- lib.set('option', 'var', 'yosys_abc_clock_multiplier', "1000") # convert from ns -> ps
115
-
116
- cap_table = { # __buf_4
117
- '7t': "0.038pF",
118
- '9t': "0.056pF"
119
- }
120
- lib.set('option', 'var', 'yosys_abc_constraint_load', cap_table[libtype])
121
- lib.set('option', 'var', 'yosys_driver_cell', f"gf180mcu_fd_sc_mcu{libtype}5v0__buf_4")
122
- lib.set('option', 'var', 'yosys_buffer_cell', f"gf180mcu_fd_sc_mcu{libtype}5v0__buf_4")
123
- lib.set('option', 'var', 'yosys_buffer_input', "I")
124
- lib.set('option', 'var', 'yosys_buffer_output', "Z")
125
- for tool in ('yosys', 'openroad'):
126
- lib.set('option', 'var', f'{tool}_tiehigh_cell',
127
- f"gf180mcu_fd_sc_mcu{libtype}5v0__tieh")
128
- lib.set('option', 'var', f'{tool}_tiehigh_port', "Z")
129
- lib.set('option', 'var', f'{tool}_tielow_cell',
130
- f"gf180mcu_fd_sc_mcu{libtype}5v0__tiel")
131
- lib.set('option', 'var', f'{tool}_tielow_port', "ZN")
132
-
133
- # Bambu setup
134
- lib.set('option', 'var', 'bambu_clock_multiplier', "1") # convert from ns -> ns
135
-
136
- libs.append(lib)
137
-
138
- std_lambda_lib = siliconcompiler.Library(f'lambdalib_stdlib_{libname}',
139
- package='lambdapdk')
140
- register_data_source(std_lambda_lib)
141
- std_lambda_lib.add('option', 'ydir', libdir + '/lambda/stdlib')
142
- std_lambda_lib.use(lib)
143
- std_lambda_lib.set('asic', 'logiclib', lib.design)
144
- libs.append(std_lambda_lib)
145
- aux_lambda_lib = siliconcompiler.Library(f'lambdalib_auxlib_{libname}',
146
- package='lambdapdk')
147
- register_data_source(aux_lambda_lib)
148
- aux_lambda_lib.add('option', 'ydir', libdir + '/lambda/auxlib')
149
- aux_lambda_lib.use(std_lambda_lib)
150
- aux_lambda_lib.use(lib)
151
- aux_lambda_lib.set('asic', 'logiclib', lib.design)
152
- aux_lambda_lib.set('option', 'library', std_lambda_lib.design)
153
- libs.append(aux_lambda_lib)
154
-
155
- return libs
156
-
157
-
158
- #########################
159
- if __name__ == "__main__":
160
- libs = setup()
161
- for lib in libs:
162
- lib.write_manifest(f'{lib.top()}.json')
163
- lib.check_filepaths()
138
+ self.add_asic_celllist('tie', [f'gf180mcu_fd_sc_mcu{libtype}5v0__tieh',
139
+ f'gf180mcu_fd_sc_mcu{libtype}5v0__tiel'])
140
+
141
+ # Setup for yosys
142
+ with self.active_dataroot("lambdapdk"):
143
+ cap_table = { # __buf_4
144
+ '7t': 38,
145
+ '9t': 56
146
+ }
147
+ self.set_yosys_driver_cell(f"gf180mcu_fd_sc_mcu{libtype}5v0__buf_4")
148
+ self.set_yosys_buffer_cell(f"gf180mcu_fd_sc_mcu{libtype}5v0__buf_4", "I", "Z")
149
+ self.set_yosys_tielow_cell(f"gf180mcu_fd_sc_mcu{libtype}5v0__tiel", "ZN")
150
+ self.set_yosys_tiehigh_cell(f"gf180mcu_fd_sc_mcu{libtype}5v0__tieh", "Z")
151
+ self.set_yosys_abc(1000, cap_table[libtype])
152
+ self.set_yosys_tristatebuffer_map(
153
+ lib_path / "techmap" / "yosys" / "cells_tristatebuf.v")
154
+ self.set_yosys_adder_map(lib_path / "techmap" / "yosys" / "cells_adders.v")
155
+ self.add_yosys_tech_map(lib_path / "techmap" / "yosys" / "cells_latch.v")
156
+
157
+ # Setup for OpenROAD
158
+ with self.active_dataroot("lambdapdk"):
159
+ self.set_openroad_placement_density(0.50)
160
+ self.set_openroad_tielow_cell(f"gf180mcu_fd_sc_mcu{libtype}5v0__tiel", "ZN")
161
+ self.set_openroad_tiehigh_cell(f"gf180mcu_fd_sc_mcu{libtype}5v0__tieh", "Z")
162
+ self.set_openroad_macro_placement_halo(15, 15)
163
+ self.set_openroad_tapcells_file(lib_path / "apr" / "openroad" / "tapcell.tcl")
164
+ self.add_openroad_global_connect_file(
165
+ lib_path / "apr" / "openroad" / "global_connect.tcl")
166
+ self.add_openroad_power_grid_file(lib_path / "apr" / "openroad" / "pdngen.tcl")
167
+
168
+ # Setup for bambu
169
+ self.set_bambu_clock_multiplier(1)
170
+
171
+
172
+ class GF180_MCU_7T_3LMLibrary(_GF180_MCULibrary):
173
+ def __init__(self):
174
+ super().__init__("7t", "3LM")
175
+
176
+
177
+ class GF180_MCU_7T_4LMLibrary(_GF180_MCULibrary):
178
+ def __init__(self):
179
+ super().__init__("7t", "4LM")
180
+
181
+
182
+ class GF180_MCU_7T_5LMLibrary(_GF180_MCULibrary):
183
+ def __init__(self):
184
+ super().__init__("7t", "5LM")
185
+
186
+
187
+ class GF180_MCU_7T_6LMLibrary(_GF180_MCULibrary):
188
+ def __init__(self):
189
+ super().__init__("7t", "6LM")
190
+
191
+
192
+ class GF180_MCU_9T_3LMLibrary(_GF180_MCULibrary):
193
+ def __init__(self):
194
+ super().__init__("9t", "3LM")
195
+
196
+
197
+ class GF180_MCU_9T_4LMLibrary(_GF180_MCULibrary):
198
+ def __init__(self):
199
+ super().__init__("9t", "4LM")
200
+
201
+
202
+ class GF180_MCU_9T_5LMLibrary(_GF180_MCULibrary):
203
+ def __init__(self):
204
+ super().__init__("9t", "5LM")
205
+
206
+
207
+ class GF180_MCU_9T_6LMLibrary(_GF180_MCULibrary):
208
+ def __init__(self):
209
+ super().__init__("9t", "6LM")
@@ -1,63 +1,121 @@
1
- from siliconcompiler import Chip, Library
2
- from lambdapdk import register_data_source
3
-
4
-
5
- def setup():
6
- libs = []
7
-
8
- for config in ('64x8', '128x8', '256x8', '512x8'):
9
- mem_name = f'gf180mcu_fd_ip_sram__sram{config}m8wm1'
10
- lib = Library(mem_name, package='lambdapdk')
11
- register_data_source(lib)
12
-
13
- path_base = 'lambdapdk/gf180/libs/gf180mcu_fd_ip_sram'
14
-
15
- for stackup in ("3LM_1TM_6K",
16
- "3LM_1TM_9K",
17
- "3LM_1TM_11K",
18
- "3LM_1TM_30K",
19
- "4LM_1TM_6K",
20
- "4LM_1TM_9K",
21
- "4LM_1TM_11K",
22
- "4LM_1TM_30K",
23
- "5LM_1TM_9K",
24
- "5LM_1TM_11K",
25
- "6LM_1TM_9K"):
26
- lib.add('output', stackup, 'lef', f'{path_base}/lef/{mem_name}.lef')
27
- lib.add('output', stackup, 'gds', f'{path_base}/gds/{mem_name}.gds.gz')
28
- lib.add('output', stackup, 'cdl', f'{path_base}/cdl/{mem_name}.cdl')
29
-
30
- lib.add('output', 'slow', 'nldm',
31
- f'{path_base}/nldm/{mem_name}__ss_125C_4v50.lib.gz')
32
- lib.add('output', 'typical', 'nldm',
33
- f'{path_base}/nldm/{mem_name}__tt_025C_5v00.lib.gz')
34
- lib.add('output', 'fast', 'nldm',
35
- f'{path_base}/nldm/{mem_name}__ff_n40C_5v50.lib.gz')
36
-
37
- for corner in ('slow', 'typical', 'fast'):
38
- lib.add('output', corner, 'spice',
39
- f'{path_base}/spice/{mem_name}.spice')
40
-
41
- lib.set('option', 'file', 'openroad_pdngen',
42
- f'{path_base}/apr/openroad/pdngen.tcl')
43
- lib.set('option', 'file', 'openroad_global_connect',
44
- f'{path_base}/apr/openroad/global_connect.tcl')
45
-
46
- libs.append(lib)
47
-
48
- lambda_lib = Library('lambdalib_gf180sram', package='lambdapdk')
49
- register_data_source(lambda_lib)
50
- lambda_lib.add('option', 'ydir', 'lambdapdk/gf180/libs/gf180mcu_fd_ip_sram/lambda')
51
- for lib in libs:
52
- lambda_lib.use(lib)
53
- lambda_lib.add('asic', 'macrolib', lib.design)
54
-
55
- libs.append(lambda_lib)
56
-
57
- return libs
58
-
59
-
60
- #########################
61
- if __name__ == "__main__":
62
- for lib in setup(Chip('<lib>')):
63
- lib.write_manifest(f'{lib.top()}.json')
1
+ from pathlib import Path
2
+
3
+ from lambdalib import LambalibTechLibrary
4
+ from lambdapdk import LambdaLibrary, _LambdaPath
5
+ from lambdapdk.gf180 import GF180_3LM_1TM_6K_7t, \
6
+ GF180_3LM_1TM_6K_9t, \
7
+ GF180_3LM_1TM_9K_7t, \
8
+ GF180_3LM_1TM_9K_9t, \
9
+ GF180_3LM_1TM_11K_7t, \
10
+ GF180_3LM_1TM_11K_9t, \
11
+ GF180_3LM_1TM_30K_7t, \
12
+ GF180_3LM_1TM_30K_9t, \
13
+ GF180_4LM_1TM_6K_7t, \
14
+ GF180_4LM_1TM_6K_9t, \
15
+ GF180_4LM_1TM_9K_7t, \
16
+ GF180_4LM_1TM_9K_9t, \
17
+ GF180_4LM_1TM_11K_7t, \
18
+ GF180_4LM_1TM_11K_9t, \
19
+ GF180_4LM_1TM_30K_7t, \
20
+ GF180_4LM_1TM_30K_9t, \
21
+ GF180_5LM_1TM_9K_7t, \
22
+ GF180_5LM_1TM_9K_9t, \
23
+ GF180_5LM_1TM_11K_7t, \
24
+ GF180_5LM_1TM_11K_9t, \
25
+ GF180_6LM_1TM_9K_7t, \
26
+ GF180_6LM_1TM_9K_9t
27
+
28
+
29
+ class _GF180SRAMLibrary(LambdaLibrary):
30
+ def __init__(self, config):
31
+ super().__init__()
32
+ self.set_name(f"gf180mcu_fd_ip_sram__sram{config}m8wm1")
33
+
34
+ self.add_asic_pdk(GF180_3LM_1TM_6K_7t(), default=False)
35
+ self.add_asic_pdk(GF180_3LM_1TM_6K_9t(), default=False)
36
+ self.add_asic_pdk(GF180_3LM_1TM_9K_7t(), default=False)
37
+ self.add_asic_pdk(GF180_3LM_1TM_9K_9t(), default=False)
38
+ self.add_asic_pdk(GF180_3LM_1TM_11K_7t(), default=False)
39
+ self.add_asic_pdk(GF180_3LM_1TM_11K_9t(), default=False)
40
+ self.add_asic_pdk(GF180_3LM_1TM_30K_7t(), default=False)
41
+ self.add_asic_pdk(GF180_3LM_1TM_30K_9t(), default=False)
42
+ self.add_asic_pdk(GF180_4LM_1TM_6K_7t(), default=False)
43
+ self.add_asic_pdk(GF180_4LM_1TM_6K_9t(), default=False)
44
+ self.add_asic_pdk(GF180_4LM_1TM_9K_7t(), default=False)
45
+ self.add_asic_pdk(GF180_4LM_1TM_9K_9t(), default=False)
46
+ self.add_asic_pdk(GF180_4LM_1TM_11K_7t(), default=False)
47
+ self.add_asic_pdk(GF180_4LM_1TM_11K_9t(), default=False)
48
+ self.add_asic_pdk(GF180_4LM_1TM_30K_7t(), default=False)
49
+ self.add_asic_pdk(GF180_4LM_1TM_30K_9t(), default=False)
50
+ self.add_asic_pdk(GF180_5LM_1TM_9K_7t(), default=False)
51
+ self.add_asic_pdk(GF180_5LM_1TM_9K_9t(), default=False)
52
+ self.add_asic_pdk(GF180_5LM_1TM_11K_7t(), default=False)
53
+ self.add_asic_pdk(GF180_5LM_1TM_11K_9t(), default=False)
54
+ self.add_asic_pdk(GF180_6LM_1TM_9K_7t(), default=False)
55
+ self.add_asic_pdk(GF180_6LM_1TM_9K_9t(), default=False)
56
+
57
+ path_base = Path("lambdapdk", "gf180", "libs", "gf180mcu_fd_ip_sram")
58
+
59
+ with self.active_dataroot("lambdapdk"):
60
+ with self.active_fileset("models.physical"):
61
+ self.add_file(path_base / "lef" / f"{self.name}.lef")
62
+ self.add_file(path_base / "gds" / f"{self.name}.gds.gz")
63
+ self.add_asic_aprfileset()
64
+
65
+ with self.active_fileset("models.lvs"):
66
+ self.add_file(path_base / "cdl" / f"{self.name}.cdl")
67
+ self.add_asic_aprfileset()
68
+
69
+ for corner_name, filename in [
70
+ ('slow', f'{self.name}__ss_125C_4v50.lib.gz'),
71
+ ('typical', f'{self.name}__tt_025C_5v00.lib.gz'),
72
+ ('fast', f'{self.name}__ff_n40C_5v50.lib.gz')]:
73
+ with self.active_fileset(f"models.timing.nldm.{corner_name}"):
74
+ self.add_file(path_base / "nldm" / filename)
75
+ self.add_asic_libcornerfileset(corner_name, "nldm")
76
+
77
+ with self.active_fileset("models.spice"):
78
+ self.add_file(path_base / "spice" / f"{self.name}.spice")
79
+
80
+ self.add_openroad_power_grid_file(path_base / "apr" / "openroad" / "pdngen.tcl")
81
+ self.add_openroad_global_connect_file(
82
+ path_base / "apr" / "openroad" / "global_connect.tcl")
83
+
84
+
85
+ class GF180_SRAM_64x8(_GF180SRAMLibrary):
86
+ def __init__(self):
87
+ super().__init__("64x8")
88
+
89
+
90
+ class GF180_SRAM_128x8(_GF180SRAMLibrary):
91
+ def __init__(self):
92
+ super().__init__("128x8")
93
+
94
+
95
+ class GF180_SRAM_256x8(_GF180SRAMLibrary):
96
+ def __init__(self):
97
+ super().__init__("256x8")
98
+
99
+
100
+ class GF180_SRAM_512x8(_GF180SRAMLibrary):
101
+ def __init__(self):
102
+ super().__init__("512x8")
103
+
104
+
105
+ class GF180Lambdalib_SinglePort(LambalibTechLibrary, _LambdaPath):
106
+ def __init__(self):
107
+ super().__init__("la_spram", [
108
+ GF180_SRAM_64x8,
109
+ GF180_SRAM_128x8,
110
+ GF180_SRAM_256x8,
111
+ GF180_SRAM_512x8])
112
+ self.set_name("gf180_la_spram")
113
+
114
+ # version
115
+ self.set_version("v1")
116
+
117
+ lib_path = Path("lambdapdk", "gf180", "libs", "gf180mcu_fd_ip_sram")
118
+
119
+ with self.active_dataroot("lambdapdk"):
120
+ with self.active_fileset("rtl"):
121
+ self.add_file(lib_path / "lambda" / "la_spram.v")