Skip to content

Commit 85e242f

Browse files
committed
Add gf180mcu ROM example
1 parent b6a6f12 commit 85e242f

File tree

8 files changed

+48
-5
lines changed

8 files changed

+48
-5
lines changed

compiler/modules/rom_bank.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from openram import OPTS, print_time
1616
from openram.sram_factory import factory
1717
from openram.tech import spice
18-
from openram.tech import drc, layer, parameter
18+
from openram.tech import drc, layer, parameter, lef_rom_interconnect
1919

2020

2121
class rom_bank(design, rom_verilog, lef):
@@ -28,7 +28,7 @@ class rom_bank(design, rom_verilog, lef):
2828

2929
def __init__(self, name, rom_config):
3030
super().__init__(name=name)
31-
lef.__init__(self, ["m1", "m2", "m3", "m4"])
31+
lef.__init__(self, lef_rom_interconnect)
3232
self.rom_config = rom_config
3333
rom_config.set_local_config(self)
3434

compiler/rom.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def save(self):
152152
start_time = datetime.datetime.now()
153153
from shutil import copyfile
154154
copyfile(OPTS.config_file, OPTS.output_path + OPTS.output_name + '.py')
155+
os.makedirs(os.path.dirname(OPTS.output_path + self.rom_data), exist_ok=True)
155156
copyfile(self.rom_data, OPTS.output_path + self.rom_data)
156157
debug.print_raw("Config: Writing to {0}".format(OPTS.output_path + OPTS.output_name + '.py'))
157158
print_time("Config", datetime.datetime.now(), start_time)

docs/source/basic_setup.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,13 @@ OpenRAM library.
147147
148148
OpenRAM currently **does not** support gf180mcu for SRAM generation. However ROM generation for gf180mcu is supported as an experimental feature.
149149
150-
It is not necessary to install the gf180mcu PDK, as all necessary files are already in the git repository under `technology/gf180mcu/`.
150+
To install gf180mcuD, you can run:
151151
152-
If you still want to install the PDK, you can run `make gf180mcu-pdk`.
152+
```
153+
cd $HOME/OpenRAM
154+
make gf180mcu-pdk
155+
```
153156
154157
[SCMOS]: https://www.mosis.com/files/scmos/scmos.pdf
155158
[FreePDK45]: https://www.eda.ncsu.edu/wiki/FreePDK45:Contents
156159
[Sky130]: https://github.com/google/skywater-pdk-libs-sky130_fd_bd_sram.git
157-

macros/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ WORKING_ROM_STAMPS=$(filter-out $(addsuffix .ok, $(BROKEN)), $(ROM_STAMPS))
5050

5151
EXAMPLE_STAMPS=$(filter example%, $(WORKING_SRAM_STAMPS)) $(filter example%, $(WORKING_ROM_STAMPS))
5252
SKY130_STAMPS=$(filter sky130%, $(WORKING_SRAM_STAMPS)) $(filter sky130%, $(WORKING_ROM_STAMPS))
53+
GF180MCU_STAMPS=$(filter gf180mcu%, $(WORKING_SRAM_STAMPS)) $(filter gf180mcu%, $(WORKING_ROM_STAMPS))
5354
FREEPDK45_STAMPS=$(filter freepdk45%, $(WORKING_STAMPS)) $(filter freepdk45%, $(WORKING_ROM_STAMPS))
5455
SCN4M_SUBM_STAMPS=$(filter scn4m_subm%, $(WORKING_STAMPS)) $(filter scn4m_subm%, $(WORKING_ROM_STAMPS))
5556

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# See LICENSE for licensing information.
2+
#
3+
# Copyright (c) 2016-2023 Regents of the University of California and The Board
4+
# of Regents for the Oklahoma Agricultural and Mechanical College
5+
# (acting for and on behalf of Oklahoma State University)
6+
# All rights reserved.
7+
#
8+
9+
word_size = 1
10+
11+
check_lvsdrc = True
12+
13+
rom_data = "rom_configs/example_1kbyte.bin"
14+
data_type = "bin"
15+
16+
output_name = "rom_1kbyte"
17+
output_path = "macro/{output_name}".format(**locals())
18+
19+
import os
20+
exec(open(os.path.join(os.path.dirname(__file__), 'gf180mcu_rom_common.py')).read())
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# See LICENSE for licensing information.
2+
#
3+
# Copyright (c) 2016-2023 Regents of the University of California and The Board
4+
# of Regents for the Oklahoma Agricultural and Mechanical College
5+
# (acting for and on behalf of Oklahoma State University)
6+
# All rights reserved.
7+
#
8+
tech_name = "gf180mcu"
9+
nominal_corner_only = True
10+
11+
route_supplies = "ring"
12+
check_lvsdrc = True
13+
# check_lvsdrc = False
14+

technology/gf180mcu/tech/tech.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
m3_stack = ("m3", "via3", "m4")
9898
m4_stack = ("m4", "via4", "m5")
9999

100+
lef_rom_interconnect = ["m1", "m2", "m3", "m4", "m5"]
100101

101102
layer_indices = {"poly": 0,
102103
"active": 0,
@@ -182,6 +183,8 @@
182183
layer_names["m3"] = "metal3"
183184
layer_names["via3"] = "via3"
184185
layer_names["m4"] = "metal4"
186+
layer_names["via4"] = "via4"
187+
layer_names["m5"] = "metal5"
185188
layer_names["text"] = "text"
186189
layer_names["mem"] = "SramCore"
187190
layer_names["boundary"]= "boundary"

technology/sky130/tech/tech.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@
330330
m3_stack = ("m3", "via3", "m4")
331331
m4_stack = ("m4", "via4", "m5")
332332

333+
lef_rom_interconnect = ["m1", "m2", "m3", "m4"]
334+
333335
layer_indices = {"poly": 0,
334336
"active": 0,
335337
"nwell": 0,

0 commit comments

Comments
 (0)