Skip to content
Open
14 changes: 8 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
/.idea/
/precheck_results/
*/tmp
*/*/tmp
*.hex*
*.lst
*.vcd
*.gtkw
/env
/venv
/caravel
/dependencies
/mgmt_core_wrapper
/logs
/venv/
/venv-cocotb/
/caravel/
runs/
/dependencies/
/mgmt_core_wrapper/
/logs
lvs_results/
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ export ROOTLESS

ifeq ($(PDK),sky130A)
SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c
export OPEN_PDKS_COMMIT_LVS?=6d4d11780c40b20ee63cc98e645307a9bf2b2ab8
export OPEN_PDKS_COMMIT?=78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc
export OPENLANE_TAG?=2023.07.19-1
export OPEN_PDKS_COMMIT?=0fe599b2afb6708d281543108caf8310912f54af
export OPENLANE_TAG?=2023.07.19-2
MPW_TAG ?= mpw-9k

ifeq ($(CARAVEL_LITE),1)
Expand All @@ -63,9 +62,8 @@ endif

ifeq ($(PDK),sky130B)
SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c
export OPEN_PDKS_COMMIT_LVS?=6d4d11780c40b20ee63cc98e645307a9bf2b2ab8
export OPEN_PDKS_COMMIT?=78b7bc32ddb4b6f14f76883c2e2dc5b5de9d1cbc
export OPENLANE_TAG?=2023.07.19-1
export OPEN_PDKS_COMMIT?=0fe599b2afb6708d281543108caf8310912f54af
export OPENLANE_TAG?=2023.07.19-2
MPW_TAG ?= mpw-9k

ifeq ($(CARAVEL_LITE),1)
Expand Down Expand Up @@ -247,7 +245,7 @@ precheck:
@docker pull efabless/mpw_precheck:latest

.PHONY: run-precheck
run-precheck: check-pdk check-precheck enable-lvs-pdk
run-precheck: check-pdk check-precheck
@if [ "$$DISABLE_LVS" = "1" ]; then\
$(eval INPUT_DIRECTORY := $(shell pwd)) \
cd $(PRECHECK_ROOT) && \
Expand Down Expand Up @@ -276,10 +274,6 @@ run-precheck: check-pdk check-precheck enable-lvs-pdk
efabless/mpw_precheck:latest bash -c "cd $(PRECHECK_ROOT) ; python3 mpw_precheck.py --input_directory $(INPUT_DIRECTORY) --pdk_path $(PDK_ROOT)/$(PDK)"; \
fi

.PHONY: enable-lvs-pdk
enable-lvs-pdk:
$(UPRJ_ROOT)/venv/bin/volare enable $(OPEN_PDKS_COMMIT_LVS)

BLOCKS = $(shell cd lvs && find * -maxdepth 0 -type d)
LVS_BLOCKS = $(foreach block, $(BLOCKS), lvs-$(block))
$(LVS_BLOCKS): lvs-% : ./lvs/%/lvs_config.json check-pdk check-precheck
Expand Down Expand Up @@ -349,7 +343,7 @@ install-caravel-cocotb:

.PHONY: setup-cocotb-env
setup-cocotb-env:
@(python3 $(PROJECT_ROOT)/verilog/dv/setup-cocotb.py $(CARAVEL_ROOT) $(MCW_ROOT) $(PDK_ROOT) $(PDK) $(PROJECT_ROOT))
@(./venv-cocotb/bin/$(PYTHON_BIN) $(PROJECT_ROOT)/verilog/dv/setup-cocotb.py $(CARAVEL_ROOT) $(MCW_ROOT) $(PDK_ROOT) $(PDK) $(PROJECT_ROOT))

.PHONY: setup-cocotb
setup-cocotb: install-caravel-cocotb setup-cocotb-env simenv-cocotb
Expand Down
16 changes: 10 additions & 6 deletions lvs/user_project_wrapper/lvs_config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"STD_CELL_LIBRARY": "sky130_fd_sc_hd",
"INCLUDE_CONFIGS": [
"$LVS_ROOT/tech/$PDK/lvs_config.base.json"
],
"TOP_SOURCE": "user_project_wrapper",
"TOP_LAYOUT": "$TOP_SOURCE",
"EXTRACT_FLATGLOB": [
""
],
"EXTRACT_ABSTRACT": [
"*__fill_*",
"*__fakediode_*",
"*__tapvpwrvgnd_*"
""
],
"EXTRACT_CREATE_SUBCUT": [
""
],
"LVS_FLATTEN": [
""
Expand All @@ -19,12 +24,11 @@
""
],
"LVS_SPICE_FILES": [
"$PDK_ROOT/$PDK/libs.ref/sky130_fd_sc_hd/spice/sky130_ef_sc_hd__decap_12.spice",
"$PDK_ROOT/$PDK/libs.ref/sky130_fd_sc_hd/spice/sky130_fd_sc_hd.spice"
""
],
"LVS_VERILOG_FILES": [
"$UPRJ_ROOT/verilog/gl/user_proj_example.v",
"$UPRJ_ROOT/verilog/gl/$TOP_SOURCE.v"
],
"LAYOUT_FILE": "$UPRJ_ROOT/gds/$TOP_LAYOUT.gds"
}
}
30 changes: 12 additions & 18 deletions openlane/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
#
# SPDX-License-Identifier: Apache-2.0

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

export OPENLANE_RUN_TAG = $(shell date '+%y_%m_%d_%H_%M')
OPENLANE_TAG ?= 2023.07.19-1
OPENLANE_TAG ?= 2023.07.19-2
OPENLANE_IMAGE_NAME ?= efabless/openlane:$(OPENLANE_TAG)
designs = $(shell find * -maxdepth 0 -type d)
current_design = null
designs=$(shell find * -maxdepth 0 -type d)

ROOTLESS ?= 0
USER_ARGS = -u $$(id -u $$USER):$$(id -g $$USER)
Expand Down Expand Up @@ -67,28 +67,22 @@ list:
@echo $(designs)

.PHONY: $(designs)
$(designs) : export current_design=$@
$(designs) : % : ./%/config.json enable-openlane-pdk
ifneq (,$(wildcard ./$(current_design)/interactive.tcl))
$(docker_run) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd_interactive)
else
# $(current_design)
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
$(designs) : % :
mkdir -p ./$*/runs/$(OPENLANE_RUN_TAG)
rm -rf ./$*/runs/$*
ln -s $$(realpath ./$*/runs/$(OPENLANE_RUN_TAG)) ./$*/runs/$*
$(docker_run) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd)
endif
if [[ -f ./$@/interactive.tcl ]]; then \
$(docker_run) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd_interactive); \
else \
$(docker_run) \
$(OPENLANE_IMAGE_NAME) sh -c $(openlane_cmd); \
fi
@mkdir -p ../signoff/$*/
@cp ./$*/runs/$*/OPENLANE_VERSION ../signoff/$*/
@cp ./$*/runs/$*/PDK_SOURCES ../signoff/$*/
@cp ./$*/runs/$*/reports/*.csv ../signoff/$*/

.PHONY: enable-openlane-pdk
enable-openlane-pdk:
$(UPRJ_ROOT)/venv/bin/volare enable $(OPEN_PDKS_COMMIT)

.PHONY: openlane
openlane: check-openlane-env
if [ -d "$(OPENLANE_ROOT)" ]; then\
Expand Down