diff --git a/.gitignore b/.gitignore index 162c65e24..46dd1c6fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,16 @@ /.idea/ /precheck_results/ */tmp -*/*/tmp *.hex* *.lst *.vcd *.gtkw /env -/venv -/caravel -/dependencies -/mgmt_core_wrapper -/logs \ No newline at end of file +/venv/ +/venv-cocotb/ +/caravel/ +runs/ +/dependencies/ +/mgmt_core_wrapper/ +/logs +lvs_results/ diff --git a/Makefile b/Makefile index 8bbd1b6f6..64761c3c5 100644 --- a/Makefile +++ b/Makefile @@ -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) @@ -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) @@ -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) && \ @@ -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 @@ -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 diff --git a/lvs/user_project_wrapper/lvs_config.json b/lvs/user_project_wrapper/lvs_config.json index dec3a5589..bd946d78c 100644 --- a/lvs/user_project_wrapper/lvs_config.json +++ b/lvs/user_project_wrapper/lvs_config.json @@ -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": [ "" @@ -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" -} \ No newline at end of file +} diff --git a/openlane/Makefile b/openlane/Makefile index edfdd02af..25646a8bb 100644 --- a/openlane/Makefile +++ b/openlane/Makefile @@ -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) @@ -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\