Skip to content

Commit 21c2e20

Browse files
authored
Merge pull request #1 from d-m-bailey/2409
Changes for 2409
2 parents 966648a + 5f821dc commit 21c2e20

6 files changed

Lines changed: 60 additions & 34 deletions

File tree

.gitignore

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
/.idea/
22
/precheck_results/
33
*/tmp
4-
*/*/tmp
5-
venv/
6-
caravel/
7-
mgmt_core_wrapper/
8-
dependencies/
4+
*.hex*
5+
*.lst
6+
*.vcd
7+
*.gtkw
8+
/env
9+
/venv/
10+
/venv-cocotb/
11+
/caravel/
12+
runs/
13+
/dependencies/
14+
/mgmt_core_wrapper/
15+
/logs
16+
lvs_results/
917
__pycache__/

Makefile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
MAKEFLAGS+=--warn-undefined-variables
1717

1818
export CARAVEL_ROOT?=$(PWD)/caravel
19+
export UPRJ_ROOT?=$(PWD)
1920
PRECHECK_ROOT?=${HOME}/mpw_precheck
2021
export MCW_ROOT?=$(PWD)/mgmt_core_wrapper
2122
SIM?=RTL
@@ -43,9 +44,9 @@ export ROOTLESS
4344

4445
ifeq ($(PDK),sky130A)
4546
SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c
46-
export OPEN_PDKS_COMMIT?=dd7771c384ed36b91a25e9f8b314355fc26561be
47-
export OPENLANE_TAG?=2023.10.16
48-
MPW_TAG ?= mpw-9i
47+
export OPEN_PDKS_COMMIT?=0fe599b2afb6708d281543108caf8310912f54af
48+
export OPENLANE_TAG?=2024.08.15
49+
MPW_TAG ?= mpw-9k
4950

5051
ifeq ($(CARAVEL_LITE),1)
5152
CARAVEL_NAME := caravel-lite
@@ -61,9 +62,9 @@ endif
6162

6263
ifeq ($(PDK),sky130B)
6364
SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c
64-
export OPEN_PDKS_COMMIT?=dd7771c384ed36b91a25e9f8b314355fc26561be
65-
export OPENLANE_TAG?=2023.10.16
66-
MPW_TAG ?= mpw-9i
65+
export OPEN_PDKS_COMMIT?=0fe599b2afb6708d281543108caf8310912f54af
66+
export OPENLANE_TAG?=2024.08.15
67+
MPW_TAG ?= mpw-9k
6768

6869
ifeq ($(CARAVEL_LITE),1)
6970
CARAVEL_NAME := caravel-lite
@@ -77,9 +78,9 @@ endif
7778

7879
endif
7980

80-
ifeq ($(PDK),gf180mcuC)
81+
ifeq ($(PDK),gf180mcuD)
8182

82-
MPW_TAG ?= gfmpw-0b
83+
MPW_TAG ?= gfmpw-1c
8384
CARAVEL_NAME := caravel
8485
CARAVEL_REPO := https://github.com/efabless/caravel-gf180mcu
8586
CARAVEL_TAG := $(MPW_TAG)
@@ -251,6 +252,7 @@ run-precheck: check-pdk check-precheck
251252
docker run -it -v $(PRECHECK_ROOT):$(PRECHECK_ROOT) \
252253
-v $(INPUT_DIRECTORY):$(INPUT_DIRECTORY) \
253254
-v $(PDK_ROOT):$(PDK_ROOT) \
255+
-v $(HOME)/.ipm:$(HOME)/.ipm \
254256
-e INPUT_DIRECTORY=$(INPUT_DIRECTORY) \
255257
-e PDK_PATH=$(PDK_ROOT)/$(PDK) \
256258
-e PDK_ROOT=$(PDK_ROOT) \
@@ -263,6 +265,7 @@ run-precheck: check-pdk check-precheck
263265
docker run -it -v $(PRECHECK_ROOT):$(PRECHECK_ROOT) \
264266
-v $(INPUT_DIRECTORY):$(INPUT_DIRECTORY) \
265267
-v $(PDK_ROOT):$(PDK_ROOT) \
268+
-v $(HOME)/.ipm:$(HOME)/.ipm \
266269
-e INPUT_DIRECTORY=$(INPUT_DIRECTORY) \
267270
-e PDK_PATH=$(PDK_ROOT)/$(PDK) \
268271
-e PDK_ROOT=$(PDK_ROOT) \
@@ -271,7 +274,6 @@ run-precheck: check-pdk check-precheck
271274
efabless/mpw_precheck:latest bash -c "cd $(PRECHECK_ROOT) ; python3 mpw_precheck.py --input_directory $(INPUT_DIRECTORY) --pdk_path $(PDK_ROOT)/$(PDK)"; \
272275
fi
273276

274-
275277
BLOCKS = $(shell cd lvs && find * -maxdepth 0 -type d)
276278
LVS_BLOCKS = $(foreach block, $(BLOCKS), lvs-$(block))
277279
$(LVS_BLOCKS): lvs-% : ./lvs/%/lvs_config.json check-pdk check-precheck

lvs/openframe_project_wrapper/lvs_config.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
"EXTRACT_ABSTRACT": [
1313
""
1414
],
15+
"EXTRACT_CREATE_SUBCUT": [
16+
""
17+
],
1518
"LVS_FLATTEN": [
1619
"*vccd1_connection*",
1720
"*vssd1_connection*"
@@ -32,4 +35,4 @@
3235
"$UPRJ_ROOT/verilog/gl/$TOP_SOURCE.v"
3336
],
3437
"LAYOUT_FILE": "$UPRJ_ROOT/gds/$TOP_LAYOUT.gds"
35-
}
38+
}

openlane/Makefile

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
#
1414
# SPDX-License-Identifier: Apache-2.0
1515

16+
SHELL := /bin/bash
1617
MAKEFLAGS+=--warn-undefined-variables
1718

1819
export OPENLANE_RUN_TAG = $(shell date '+%y_%m_%d_%H_%M')
19-
OPENLANE_TAG ?= 2023.07.19
20+
OPENLANE_TAG ?= 2024.08.15
2021
OPENLANE_IMAGE_NAME ?= efabless/openlane:$(OPENLANE_TAG)
21-
designs = $(shell find * -maxdepth 0 -type d)
22-
current_design = null
22+
designs=$(shell find * -maxdepth 0 -type d)
2323

2424
ROOTLESS ?= 0
2525
USER_ARGS = -u $$(id -u $$USER):$$(id -g $$USER)
@@ -41,6 +41,7 @@ docker_mounts = \
4141
-v $$(realpath $(PWD)/..):$$(realpath $(PWD)/..) \
4242
-v $(PDK_ROOT):$(PDK_ROOT) \
4343
-v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \
44+
-v $(HOME)/.ipm:$(HOME)/.ipm \
4445
-v $(OPENLANE_ROOT):/openlane
4546

4647
docker_env = \
@@ -66,24 +67,21 @@ list:
6667
@echo $(designs)
6768

6869
.PHONY: $(designs)
69-
$(designs) : % : ./%/config.json
70-
ifneq (,$(wildcard ./$(MAKECMDGOALS)/interactive.tcl))
71-
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
70+
$(designs) : % :
71+
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
7272
rm -rf ./$*/runs/$*
7373
ln -s $$(realpath ./$*/runs/$(OPENLANE_RUN_TAG)) ./$*/runs/$*
74-
$(docker_run) \
75-
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd_interactive)
76-
else
77-
# $(current_design)
78-
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
79-
rm -rf ./$*/runs/$*
80-
ln -s $$(realpath ./$*/runs/$(OPENLANE_RUN_TAG)) ./$*/runs/$*
81-
$(docker_run) \
82-
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd)
83-
endif
74+
if [[ -f ./$@/interactive.tcl ]]; then \
75+
$(docker_run) \
76+
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd_interactive); \
77+
else \
78+
$(docker_run) \
79+
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd); \
80+
fi
8481
@mkdir -p ../signoff/$*/
8582
@cp ./$*/runs/$*/OPENLANE_VERSION ../signoff/$*/
8683
@cp ./$*/runs/$*/PDK_SOURCES ../signoff/$*/
84+
@cp ./$*/runs/$*/reports/*.csv ../signoff/$*/
8785

8886
.PHONY: openlane
8987
openlane: check-openlane-env

openlane/openframe_project_wrapper/CustomApplyDEFTemplate/reader.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
import odb
15+
from openroad import Tech, Design
16+
from typing import ClassVar, Optional
1517

1618
import os
1719
import sys
@@ -22,8 +24,17 @@
2224

2325

2426
class OdbReader(object):
27+
primary_reader: ClassVar[Optional["OdbReader"]] = None
28+
2529
def __init__(self, *args):
26-
self.db = odb.dbDatabase.create()
30+
if primary := OdbReader.primary_reader:
31+
self.db = odb.dbDatabase.create()
32+
self.db.setLogger(primary.design.getLogger())
33+
else:
34+
self.ord_tech = Tech()
35+
self.design = Design(self.ord_tech)
36+
self.db = self.ord_tech.getDB()
37+
2738
if len(args) == 1:
2839
db_in = args[0]
2940
self.db = odb.read_db(self.db, db_in)
@@ -45,6 +56,9 @@ def __init__(self, *args):
4556
self.dbunits = self.block.getDefUnits()
4657
self.instances = self.block.getInsts()
4758

59+
if OdbReader.primary_reader is None:
60+
OdbReader.primary_reader = self
61+
4862
def add_lef(self, new_lef):
4963
odb.read_lef(self.db, new_lef)
5064

@@ -77,6 +91,7 @@ def wrapper(input_db, output, output_def, input_lef, **kwargs):
7791

7892
if output_def is not None:
7993
odb.write_def(reader.block, output_def)
94+
sys.stdout.flush()
8095
odb.write_db(reader.db, output)
8196

8297
wrapper = click.option(

openlane/openframe_project_wrapper/interactive.tcl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package require openlane
22
set script_dir [file dirname [file normalize [info script]]]
33
set save_path "$script_dir/../.."
4-
prep -design $script_dir -tag $::env(OPENLANE_RUN_TAG)
4+
prep -design $script_dir -tag $::env(OPENLANE_RUN_TAG) -ignore_mismatches
55

66
if { $::env(RUN_LINTER) } {
77
run_verilator
@@ -98,4 +98,4 @@ save_final_views
9898
save_final_views -save_path $save_path -tag $::env(OPENLANE_RUN_TAG)
9999
calc_total_runtime
100100
save_state
101-
generate_final_summary_report
101+
generate_final_summary_report

0 commit comments

Comments
 (0)