lambdapdk 0.1.55__py3-none-any.whl → 0.2.0rc1__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,162 +1,123 @@
1
- import os
2
- import siliconcompiler
3
- from lambdapdk import register_data_source
4
-
5
-
6
- def _setup_lib(libname, suffix):
7
- lib = siliconcompiler.Library(libname, package='lambdapdk')
8
- register_data_source(lib)
9
-
10
- process = 'asap7'
11
- stackup = '10M'
12
- libtype = '7p5t'
13
- rev = '28'
14
- corners = {'typical': 'TT',
15
- 'fast': 'FF',
16
- 'slow': 'SS'}
17
-
18
- libdir = os.path.join('lambdapdk', process, 'libs', libname)
19
-
20
- # rev
21
- lib.set('package', 'version', rev)
22
-
23
- # todo: remove later
24
- lib.set('option', 'pdk', process)
25
-
26
- # timing
27
- for corner_name, lib_corner in corners.items():
28
- for lib_type in ('AO', 'INVBUF', 'OA', 'SEQ', 'SIMPLE'):
29
- lib.add('output', corner_name, 'nldm',
30
- libdir + f'/nldm/asap7sc7p5t_{lib_type}_{suffix}VT_{lib_corner}_nldm.lib.gz')
31
- # spice
32
- lib.add('output', corner_name, 'spice', libdir + f'/netlist/asap7sc7p5t_28_{suffix}.sp')
33
-
34
- # lef
35
- lib.add('output', stackup, 'lef', libdir + f'/lef/asap7sc7p5t_28_{suffix}.lef')
36
-
37
- # gds
38
- lib.add('output', stackup, 'gds', libdir + f'/gds/asap7sc7p5t_28_{suffix}.gds.gz')
39
-
40
- # cdl
41
- lib.add('output', stackup, 'cdl', libdir + f'/netlist/asap7sc7p5t_28_{suffix}.cdl')
42
-
43
- # lib arch
44
- lib.set('asic', 'libarch', libtype)
45
-
46
- # site name
47
- lib.set('asic', 'site', libtype, 'asap7sc7p5t')
48
-
49
- # tie cells
50
- lib.add('asic', 'cells', 'tie', [f"TIEHIx1_ASAP7_75t_{suffix}",
51
- f"TIELOx1_ASAP7_75t_{suffix}"])
52
-
53
- # filler
54
- lib.add('asic', 'cells', 'filler', [f"FILLER_ASAP7_75t_{suffix}",
55
- f"FILLERxp5_ASAP7_75t_{suffix}"])
56
-
57
- # decap
58
- lib.add('asic', 'cells', 'decap', [f"DECAPx1_ASAP7_75t_{suffix}",
59
- f"DECAPx2_ASAP7_75t_{suffix}",
60
- f"DECAPx4_ASAP7_75t_{suffix}",
61
- f"DECAPx6_ASAP7_75t_{suffix}",
62
- f"DECAPx10_ASAP7_75t_{suffix}"])
63
-
64
- # Stupid small cells
65
- lib.add('asic', 'cells', 'dontuse', ["*x1p*_ASAP7*",
66
- "*xp*_ASAP7*",
67
- "SDF*",
68
- "ICG*"])
69
-
70
- # Tapcell
71
- lib.add('asic', 'cells', 'tap', f"TAPCELL_ASAP7_75t_{suffix}")
72
-
73
- # Endcap
74
- lib.add('asic', 'cells', 'endcap', f"DECAPx1_ASAP7_75t_{suffix}")
75
-
76
- # Yosys techmap
77
- lib.add('option', 'file', 'yosys_techmap', libdir + '/techmap/yosys/cells_latch.v')
78
- lib.add('option', 'file', 'yosys_addermap', libdir + '/techmap/yosys/cells_adders.v')
79
- lib.set('option', 'file', 'yosys_dff_liberty',
80
- libdir + f'/nldm/asap7sc7p5t_SEQ_{suffix}VT_SS_nldm.lib.gz')
81
-
82
- # Defaults for OpenROAD tool variables
83
- lib.set('option', 'var', 'openroad_place_density', '0.60')
84
- lib.set('option', 'var', 'openroad_pad_global_place', '0')
85
- lib.set('option', 'var', 'openroad_pad_detail_place', '0')
86
- lib.set('option', 'var', 'openroad_macro_place_halo', ['5', '5'])
87
- lib.set('option', 'var', 'openroad_macro_place_channel', ['6', '6'])
88
-
89
- lib.set('option', 'var', 'openroad_cts_distance_between_buffers', "60")
90
-
91
- lib.set('option', 'var', 'yosys_abc_clock_multiplier', "1") # convert from ps -> ps
92
-
93
- cap_table = { # BUFx2_ASAP7_75t_
94
- 'R': "2.308fF",
95
- 'L': "2.383fF",
96
- 'SL': "2.464fF"
97
- }
98
- lib.set('option', 'var', 'yosys_abc_constraint_load', cap_table[suffix])
99
- lib.set('option', 'var', 'yosys_driver_cell', f"BUFx2_ASAP7_75t_{suffix}")
100
- lib.set('option', 'var', 'yosys_buffer_cell', f"BUFx2_ASAP7_75t_{suffix}")
101
- lib.set('option', 'var', 'yosys_buffer_input', "A")
102
- lib.set('option', 'var', 'yosys_buffer_output', "Y")
103
- for tool in ('yosys', 'openroad'):
104
- lib.set('option', 'var', f'{tool}_tiehigh_cell', f"TIEHIx1_ASAP7_75t_{suffix}")
105
- lib.set('option', 'var', f'{tool}_tiehigh_port', "H")
106
- lib.set('option', 'var', f'{tool}_tielow_cell', f"TIELOx1_ASAP7_75t_{suffix}")
107
- lib.set('option', 'var', f'{tool}_tielow_port', "L")
108
-
109
- # Openroad APR setup files
110
- lib.set('option', 'file', 'openroad_tracks', libdir + '/apr/openroad/tracks.tcl')
111
- lib.set('option', 'file', 'openroad_tapcells', libdir + '/apr/openroad/tapcells.tcl')
112
- lib.set('option', 'file', 'openroad_pdngen', libdir + '/apr/openroad/pdngen.tcl')
113
- lib.set('option', 'file', 'openroad_global_connect',
114
- libdir + '/apr/openroad/global_connect.tcl')
115
-
116
- # Bambu setup
117
- lib.set('option', 'var', 'bambu_device', 'asap7-WC')
118
- lib.set('option', 'var', 'bambu_clock_multiplier', "0.001") # convert from ps -> ns
119
-
120
- libs = [lib]
121
- std_lambda_lib = siliconcompiler.Library(f'lambdalib_stdlib_{libname}',
122
- package='lambdapdk')
123
- register_data_source(std_lambda_lib)
124
- std_lambda_lib.add('option', 'ydir', libdir + '/lambda/stdlib')
125
- std_lambda_lib.use(lib)
126
- std_lambda_lib.set('asic', 'logiclib', lib.design)
127
- libs.append(std_lambda_lib)
128
- aux_lambda_lib = siliconcompiler.Library(f'lambdalib_auxlib_{libname}',
129
- package='lambdapdk')
130
- register_data_source(aux_lambda_lib)
131
- aux_lambda_lib.add('option', 'ydir', libdir + '/lambda/auxlib')
132
- aux_lambda_lib.use(std_lambda_lib)
133
- aux_lambda_lib.use(lib)
134
- aux_lambda_lib.set('asic', 'logiclib', lib.design)
135
- aux_lambda_lib.set('option', 'library', std_lambda_lib.design)
136
- libs.append(aux_lambda_lib)
137
-
138
- return libs
139
-
140
-
141
- def setup():
142
- '''
143
- ASAP 7 7.5-track standard cell library.
144
- '''
145
- all_libs = {
146
- 'asap7sc7p5t_rvt': 'R',
147
- 'asap7sc7p5t_lvt': 'L',
148
- 'asap7sc7p5t_slvt': 'SL'
149
- }
150
-
151
- libs = []
152
- for libname, suffix in all_libs.items():
153
- libs.extend(_setup_lib(libname, suffix))
1
+ from pathlib import Path
154
2
 
155
- return libs
3
+ from lambdapdk import LambdaLibrary
4
+ from lambdapdk.asap7 import ASAP7PDK
156
5
 
157
6
 
158
- #########################
159
- if __name__ == "__main__":
160
- for lib in setup(siliconcompiler.Chip('<lib>')):
161
- register_data_source(lib)
162
- lib.check_filepaths()
7
+ class _ASAP7SC7p5Base(LambdaLibrary):
8
+ '''
9
+ ASAP 7 7.5-track standard cell library.
10
+ '''
11
+ def __init__(self, vt, suffix):
12
+ super().__init__()
13
+ self.set_name(f"asap7sc7p5t_{vt}")
14
+
15
+ # version
16
+ self.set_version("28")
17
+
18
+ # PDK
19
+ self.add_asic_pdk(ASAP7PDK())
20
+
21
+ # site name
22
+ self.add_asic_site('asap7sc7p5t')
23
+
24
+ # tie cells
25
+ self.add_asic_celllist('tie', [f"TIEHIx1_ASAP7_75t_{suffix}",
26
+ f"TIELOx1_ASAP7_75t_{suffix}"])
27
+
28
+ # filler
29
+ self.add_asic_celllist('filler', [f"FILLER_ASAP7_75t_{suffix}",
30
+ f"FILLERxp5_ASAP7_75t_{suffix}"])
31
+
32
+ # decap
33
+ self.add_asic_celllist('decap', [f"DECAPx1_ASAP7_75t_{suffix}",
34
+ f"DECAPx2_ASAP7_75t_{suffix}",
35
+ f"DECAPx4_ASAP7_75t_{suffix}",
36
+ f"DECAPx6_ASAP7_75t_{suffix}",
37
+ f"DECAPx10_ASAP7_75t_{suffix}"])
38
+
39
+ # Stupid small cells
40
+ self.add_asic_celllist('dontuse', ["*x1p*_ASAP7*",
41
+ "*xp*_ASAP7*",
42
+ "SDF*",
43
+ "ICG*"])
44
+
45
+ # Tapcell
46
+ self.add_asic_celllist('tap', f"TAPCELL_ASAP7_75t_{suffix}")
47
+
48
+ # Endcap
49
+ self.add_asic_celllist('endcap', f"DECAPx1_ASAP7_75t_{suffix}")
50
+
51
+ lib_path = Path("lambdapdk", "asap7", "libs", f"asap7sc7p5t_{vt}")
52
+
53
+ # General filelists
54
+ with self.active_dataroot("lambdapdk"):
55
+ for corner_name, lib_corner in [
56
+ ('typical', 'TT'),
57
+ ('fast', 'FF'),
58
+ ('slow', 'SS')]:
59
+
60
+ for lib_type in ('AO', 'INVBUF', 'OA', 'SEQ', 'SIMPLE'):
61
+ with self.active_fileset(f"models.timing.{corner_name}.nldm.{lib_type}"):
62
+ self.add_file(lib_path / "nldm" /
63
+ f"asap7sc7p5t_{lib_type}_{suffix}VT_{lib_corner}_nldm.lib.gz")
64
+ self.add_asic_libcornerfileset(corner_name, "nldm")
65
+
66
+ with self.active_fileset("models.spice"):
67
+ self.add_file(lib_path / "netlist" / f"asap7sc7p5t_28_{suffix}.sp")
68
+
69
+ with self.active_fileset("models.physical"):
70
+ self.add_file(lib_path / "lef" / f"asap7sc7p5t_28_{suffix}.lef")
71
+ self.add_file(lib_path / "gds" / f"asap7sc7p5t_28_{suffix}.gds.gz")
72
+ self.add_asic_aprfileset()
73
+
74
+ with self.active_fileset("models.lvs"):
75
+ self.add_file(lib_path / "netlist" / f"asap7sc7p5t_28_{suffix}.cdl")
76
+ self.add_asic_aprfileset()
77
+
78
+ # Setup for yosys
79
+ with self.active_dataroot("lambdapdk"):
80
+ self.set_yosys_driver_cell(f"BUFx2_ASAP7_75t_{suffix}")
81
+ self.set_yosys_buffer_cell(f"BUFx2_ASAP7_75t_{suffix}", "A", "Y")
82
+ self.set_yosys_tielow_cell(f"TIELOx1_ASAP7_75t_{suffix}", "L")
83
+ self.set_yosys_tiehigh_cell(f"TIEHIx1_ASAP7_75t_{suffix}", "H")
84
+
85
+ cap_table = { # BUFx2_ASAP7_75t_, fF
86
+ 'R': "2.308",
87
+ 'L': "2.383",
88
+ 'SL': "2.464"
89
+ }
90
+ self.set_yosys_abc(1, cap_table[suffix])
91
+ self.set_yosys_adder_map(lib_path / "techmap" / "yosys" / "cells_adders.v")
92
+ self.add_yosys_tech_map(lib_path / "techmap" / "yosys" / "cells_latch.v")
93
+
94
+ # Setup for openroad
95
+ with self.active_dataroot("lambdapdk"):
96
+ self.set_openroad_placement_density(0.60)
97
+ self.set_openroad_tielow_cell(f"TIELOx1_ASAP7_75t_{suffix}", "L")
98
+ self.set_openroad_tiehigh_cell(f"TIEHIx1_ASAP7_75t_{suffix}", "H")
99
+ self.set_openroad_macro_placement_halo(5, 5)
100
+ self.set_openroad_tracks_file(lib_path / "apr" / "openroad" / "tracks.tcl")
101
+ self.set_openroad_tapcells_file(lib_path / "apr" / "openroad" / "tapcells.tcl")
102
+ self.add_openroad_global_connect_file(lib_path / "apr" / "openroad" /
103
+ "global_connect.tcl")
104
+ self.add_openroad_power_grid_file(lib_path / "apr" / "openroad" / "pdngen.tcl")
105
+
106
+ # Setup for bambu
107
+ self.set_bambu_device_name("asap7-WC")
108
+ self.set_bambu_clock_multiplier(0.001)
109
+
110
+
111
+ class ASAP7SC7p5RVT(_ASAP7SC7p5Base):
112
+ def __init__(self):
113
+ super().__init__("rvt", "R")
114
+
115
+
116
+ class ASAP7SC7p5LVT(_ASAP7SC7p5Base):
117
+ def __init__(self):
118
+ super().__init__("lvt", "L")
119
+
120
+
121
+ class ASAP7SC7p5SLVT(_ASAP7SC7p5Base):
122
+ def __init__(self):
123
+ super().__init__("slvt", "SL")
@@ -1,35 +1,26 @@
1
- import os
2
- import siliconcompiler
3
- from lambdapdk import register_data_source
1
+ from pathlib import Path
4
2
 
3
+ from lambdapdk import LambdaLibrary
4
+ from lambdapdk.asap7 import ASAP7PDK
5
5
 
6
- def setup():
6
+
7
+ class FakeIO7Library(LambdaLibrary):
7
8
  '''
8
9
  ASAP7 Fake I/O library.
9
10
  '''
10
- libdir = "lambdapdk/asap7/libs/fakeio7/"
11
-
12
- lib = siliconcompiler.Library('asap7_fakeio7', package='lambdapdk')
13
- register_data_source(lib)
14
-
15
- # pdk
16
- lib.set('option', 'pdk', 'asap7')
17
- stackup = '10M'
18
-
19
- lib.set('output', stackup, 'lef', os.path.join(libdir, 'lef/fakeio7.lef'))
20
-
21
- lib.set('output', 'blackbox', 'verilog', os.path.join(libdir, 'blackbox', 'model.v'))
11
+ def __init__(self):
12
+ super().__init__()
13
+ self.set_name("fakeio7")
22
14
 
23
- lambda_lib = siliconcompiler.Library('lambdalib_iolib_asap7', package='lambdapdk')
24
- register_data_source(lambda_lib)
25
- lambda_lib.add('option', 'ydir', os.path.join(libdir, 'lambda'))
26
- lambda_lib.use(lib)
27
- lambda_lib.set('asic', 'macrolib', lib.design)
15
+ self.add_asic_pdk(ASAP7PDK())
28
16
 
29
- return [lib, lambda_lib]
17
+ path_base = Path("lambdapdk", "asap7", "libs", "fakeio7")
30
18
 
19
+ with self.active_dataroot("lambdapdk"):
20
+ with self.active_fileset("models.physical"):
21
+ self.add_file(path_base / "lef" / "fakeio7.lef")
22
+ self.add_asic_aprfileset()
31
23
 
32
- #########################
33
- if __name__ == "__main__":
34
- for lib in setup(siliconcompiler.Chip('<lib>')):
35
- lib.write_manifest(f'{lib.top()}.json')
24
+ with self.active_fileset("models.blackbox"):
25
+ self.add_file(path_base / "blackbox" / "model.v")
26
+ self.add_yosys_blackbox_fileset("models.blackbox")
@@ -1,27 +1,22 @@
1
- import os
2
- import siliconcompiler
3
- from lambdapdk import register_data_source
1
+ from pathlib import Path
4
2
 
3
+ from lambdapdk import LambdaLibrary
4
+ from lambdapdk.asap7 import ASAP7PDK
5
5
 
6
- def setup():
6
+
7
+ class FakeKit7Library(LambdaLibrary):
7
8
  '''
8
9
  ASAP7 Fake Chip Collatoral library.
9
10
  '''
10
- libdir = "lambdapdk/asap7/libs/fakekit7/"
11
-
12
- lib = siliconcompiler.Library('asap7_fakekit7', package='lambdapdk')
13
- register_data_source(lib)
14
-
15
- # pdk
16
- lib.set('option', 'pdk', 'asap7')
17
- stackup = '10M'
18
-
19
- lib.set('output', stackup, 'lef', os.path.join(libdir, 'lef/tsv.lef'))
11
+ def __init__(self):
12
+ super().__init__()
13
+ self.set_name("fakekit7")
20
14
 
21
- return lib
15
+ self.add_asic_pdk(ASAP7PDK())
22
16
 
17
+ path_base = Path("lambdapdk", "asap7", "libs", "fakekit7")
23
18
 
24
- #########################
25
- if __name__ == "__main__":
26
- lib = setup(siliconcompiler.Chip('<lib>'))
27
- lib.write_manifest(f'{lib.top()}.json')
19
+ with self.active_dataroot("lambdapdk"):
20
+ with self.active_fileset("models.physical"):
21
+ self.add_file(path_base / "lef" / "tsv.lef")
22
+ self.add_asic_aprfileset()
@@ -1,43 +1,240 @@
1
- from siliconcompiler import Library
2
- from lambdapdk import register_data_source
1
+ from pathlib import Path
3
2
 
3
+ from lambdalib import LambalibTechLibrary
4
+ from lambdapdk import LambdaLibrary, _LambdaPath
5
+ from lambdapdk.asap7 import ASAP7PDK
4
6
 
5
- def setup():
6
- libs = []
7
- stackup = '10M'
8
7
 
9
- for config in ('64x32', '128x32', '256x32', '256x64',
10
- '512x32', '512x64', '512x128',
11
- '1024x32', '1024x64',
12
- '2048x32', '2048x64',
13
- '4096x32', '4096x64',
14
- '8192x32', '8192x64'):
15
- for ramtype in ('dp', 'sp'):
16
- mem_name = f'fakeram7_{ramtype}_{config}'
17
- lib = Library(mem_name, package='lambdapdk')
18
- register_data_source(lib)
19
- path_base = 'lambdapdk/asap7/libs/fakeram7'
20
- lib.add('output', stackup, 'lef', f'{path_base}/lef/{mem_name}.lef')
8
+ class _FakeRAM7Library(LambdaLibrary):
9
+ def __init__(self, config):
10
+ super().__init__()
11
+ self.set_name(f"fakeram7_{config}")
21
12
 
22
- for corner in ('slow', 'fast', 'typical'):
23
- lib.add('output', corner, 'nldm', f'{path_base}/nldm/{mem_name}.lib')
13
+ self.add_asic_pdk(ASAP7PDK())
24
14
 
25
- lib.set('option', 'file', 'openroad_pdngen',
26
- f'{path_base}/apr/openroad/pdngen.tcl')
27
- lib.set('option', 'file', 'openroad_global_connect',
28
- f'{path_base}/apr/openroad/global_connect.tcl')
15
+ path_base = Path("lambdapdk", "asap7", "libs", "fakeram7")
29
16
 
30
- lib.set('option', 'var', 'klayout_allow_missing_cell', mem_name)
17
+ with self.active_dataroot("lambdapdk"):
18
+ with self.active_fileset("models.physical"):
19
+ self.add_file(path_base / "lef" / f"{self.name}.lef")
20
+ self.add_asic_aprfileset()
31
21
 
32
- libs.append(lib)
22
+ with self.active_fileset("models.timing.nldm"):
23
+ self.add_file(path_base / "nldm" / f"{self.name}.lib")
24
+ self.add_asic_libcornerfileset("typical", "nldm")
33
25
 
34
- lambda_lib = Library('lambdalib_fakeram7', package='lambdapdk')
35
- register_data_source(lambda_lib)
36
- lambda_lib.add('option', 'ydir', 'lambdapdk/asap7/libs/fakeram7/lambda')
37
- for lib in libs:
38
- lambda_lib.use(lib)
39
- lambda_lib.add('asic', 'macrolib', lib.design)
26
+ self.add_openroad_power_grid_file(path_base / "apr" / "openroad" / "pdngen.tcl")
27
+ self.add_openroad_global_connect_file(
28
+ path_base / "apr" / "openroad" / "global_connect.tcl")
40
29
 
41
- libs.append(lambda_lib)
30
+ self.add_klayout_allowmissingcell(self.name)
42
31
 
43
- return libs
32
+
33
+ class FakeRAM7_dp_64x32(_FakeRAM7Library):
34
+ def __init__(self):
35
+ super().__init__("dp_64x32")
36
+
37
+
38
+ class FakeRAM7_sp_64x32(_FakeRAM7Library):
39
+ def __init__(self):
40
+ super().__init__("sp_64x32")
41
+
42
+
43
+ class FakeRAM7_dp_128x32(_FakeRAM7Library):
44
+ def __init__(self):
45
+ super().__init__("dp_128x32")
46
+
47
+
48
+ class FakeRAM7_sp_128x32(_FakeRAM7Library):
49
+ def __init__(self):
50
+ super().__init__("sp_128x32")
51
+
52
+
53
+ class FakeRAM7_dp_256x32(_FakeRAM7Library):
54
+ def __init__(self):
55
+ super().__init__("dp_256x32")
56
+
57
+
58
+ class FakeRAM7_sp_256x32(_FakeRAM7Library):
59
+ def __init__(self):
60
+ super().__init__("sp_256x32")
61
+
62
+
63
+ class FakeRAM7_dp_256x64(_FakeRAM7Library):
64
+ def __init__(self):
65
+ super().__init__("dp_256x64")
66
+
67
+
68
+ class FakeRAM7_sp_256x64(_FakeRAM7Library):
69
+ def __init__(self):
70
+ super().__init__("sp_256x64")
71
+
72
+
73
+ class FakeRAM7_dp_512x32(_FakeRAM7Library):
74
+ def __init__(self):
75
+ super().__init__("dp_512x32")
76
+
77
+
78
+ class FakeRAM7_sp_512x32(_FakeRAM7Library):
79
+ def __init__(self):
80
+ super().__init__("sp_512x32")
81
+
82
+
83
+ class FakeRAM7_dp_512x64(_FakeRAM7Library):
84
+ def __init__(self):
85
+ super().__init__("dp_512x64")
86
+
87
+
88
+ class FakeRAM7_sp_512x64(_FakeRAM7Library):
89
+ def __init__(self):
90
+ super().__init__("sp_512x64")
91
+
92
+
93
+ class FakeRAM7_dp_512x128(_FakeRAM7Library):
94
+ def __init__(self):
95
+ super().__init__("dp_512x128")
96
+
97
+
98
+ class FakeRAM7_sp_512x128(_FakeRAM7Library):
99
+ def __init__(self):
100
+ super().__init__("sp_512x128")
101
+
102
+
103
+ class FakeRAM7_dp_1024x32(_FakeRAM7Library):
104
+ def __init__(self):
105
+ super().__init__("dp_1024x32")
106
+
107
+
108
+ class FakeRAM7_sp_1024x32(_FakeRAM7Library):
109
+ def __init__(self):
110
+ super().__init__("sp_1024x32")
111
+
112
+
113
+ class FakeRAM7_dp_1024x64(_FakeRAM7Library):
114
+ def __init__(self):
115
+ super().__init__("dp_1024x64")
116
+
117
+
118
+ class FakeRAM7_sp_1024x64(_FakeRAM7Library):
119
+ def __init__(self):
120
+ super().__init__("sp_1024x64")
121
+
122
+
123
+ class FakeRAM7_dp_2048x32(_FakeRAM7Library):
124
+ def __init__(self):
125
+ super().__init__("dp_2048x32")
126
+
127
+
128
+ class FakeRAM7_sp_2048x32(_FakeRAM7Library):
129
+ def __init__(self):
130
+ super().__init__("sp_2048x32")
131
+
132
+
133
+ class FakeRAM7_dp_2048x64(_FakeRAM7Library):
134
+ def __init__(self):
135
+ super().__init__("dp_2048x64")
136
+
137
+
138
+ class FakeRAM7_sp_2048x64(_FakeRAM7Library):
139
+ def __init__(self):
140
+ super().__init__("sp_2048x64")
141
+
142
+
143
+ class FakeRAM7_dp_4096x32(_FakeRAM7Library):
144
+ def __init__(self):
145
+ super().__init__("dp_4096x32")
146
+
147
+
148
+ class FakeRAM7_sp_4096x32(_FakeRAM7Library):
149
+ def __init__(self):
150
+ super().__init__("sp_4096x32")
151
+
152
+
153
+ class FakeRAM7_dp_4096x64(_FakeRAM7Library):
154
+ def __init__(self):
155
+ super().__init__("dp_4096x64")
156
+
157
+
158
+ class FakeRAM7_sp_4096x64(_FakeRAM7Library):
159
+ def __init__(self):
160
+ super().__init__("sp_4096x64")
161
+
162
+
163
+ class FakeRAM7_dp_8192x32(_FakeRAM7Library):
164
+ def __init__(self):
165
+ super().__init__("dp_8192x32")
166
+
167
+
168
+ class FakeRAM7_sp_8192x32(_FakeRAM7Library):
169
+ def __init__(self):
170
+ super().__init__("sp_8192x32")
171
+
172
+
173
+ class FakeRAM7_dp_8192x64(_FakeRAM7Library):
174
+ def __init__(self):
175
+ super().__init__("dp_8192x64")
176
+
177
+
178
+ class FakeRAM7_sp_8192x64(_FakeRAM7Library):
179
+ def __init__(self):
180
+ super().__init__("sp_8192x64")
181
+
182
+
183
+ class FakeRAM7Lambdalib_SinglePort(LambalibTechLibrary, _LambdaPath):
184
+ def __init__(self):
185
+ super().__init__("la_spram", [
186
+ FakeRAM7_sp_64x32,
187
+ FakeRAM7_sp_128x32,
188
+ FakeRAM7_sp_256x32,
189
+ FakeRAM7_sp_256x64,
190
+ FakeRAM7_sp_512x32,
191
+ FakeRAM7_sp_512x64,
192
+ FakeRAM7_sp_512x128,
193
+ FakeRAM7_sp_1024x32,
194
+ FakeRAM7_sp_1024x64,
195
+ FakeRAM7_sp_2048x32,
196
+ FakeRAM7_sp_2048x64,
197
+ FakeRAM7_sp_4096x32,
198
+ FakeRAM7_sp_4096x64,
199
+ FakeRAM7_sp_8192x32,
200
+ FakeRAM7_sp_8192x64])
201
+ self.set_name("fakeram7_la_spram")
202
+
203
+ # version
204
+ self.set_version("v1")
205
+
206
+ lib_path = Path("lambdapdk", "asap7", "libs", "fakeram7")
207
+
208
+ with self.active_dataroot("lambdapdk"):
209
+ with self.active_fileset("rtl"):
210
+ self.add_file(lib_path / "lambda" / "la_spram.v")
211
+
212
+
213
+ class FakeRAM7Lambdalib_DoublePort(LambalibTechLibrary, _LambdaPath):
214
+ def __init__(self):
215
+ super().__init__("la_dpram", [
216
+ FakeRAM7_dp_64x32,
217
+ FakeRAM7_dp_128x32,
218
+ FakeRAM7_dp_256x32,
219
+ FakeRAM7_dp_256x64,
220
+ FakeRAM7_dp_512x32,
221
+ FakeRAM7_dp_512x64,
222
+ FakeRAM7_dp_512x128,
223
+ FakeRAM7_dp_1024x32,
224
+ FakeRAM7_dp_1024x64,
225
+ FakeRAM7_dp_2048x32,
226
+ FakeRAM7_dp_2048x64,
227
+ FakeRAM7_dp_4096x32,
228
+ FakeRAM7_dp_4096x64,
229
+ FakeRAM7_dp_8192x32,
230
+ FakeRAM7_dp_8192x64])
231
+ self.set_name("fakeram7_la_dpram")
232
+
233
+ # version
234
+ self.set_version("v1")
235
+
236
+ lib_path = Path("lambdapdk", "asap7", "libs", "fakeram7")
237
+
238
+ with self.active_dataroot("lambdapdk"):
239
+ with self.active_fileset("rtl"):
240
+ self.add_file(lib_path / "lambda" / "la_dpram.v")