From d0af41efeda198b239e3029be524bda665b4c0df Mon Sep 17 00:00:00 2001 From: Donn Date: Wed, 31 May 2023 10:40:02 +0300 Subject: [PATCH] Add `.gitignore` entries for generated files + enable rootless operation --- .gitignore | 6 ++++++ Makefile | 16 ++++++++++++---- openlane/Makefile | 8 +++++++- signoff/caravel/openlane-signoff/.gitignore | 1 + 4 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 signoff/caravel/openlane-signoff/.gitignore diff --git a/.gitignore b/.gitignore index 04edfb0db..162c65e24 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,9 @@ *.lst *.vcd *.gtkw +/env +/venv +/caravel +/dependencies +/mgmt_core_wrapper +/logs \ No newline at end of file diff --git a/Makefile b/Makefile index 482da156b..db3c9751d 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,13 @@ export PDK?=sky130A #export PDK?=gf180mcuC export PDKPATH?=$(PDK_ROOT)/$(PDK) +ROOTLESS ?= 0 +USER_ARGS = -u $$(id -u $$USER):$$(id -g $$USER) +ifeq ($(ROOTLESS), 1) + USER_ARGS = +endif +export ROOTLESS ifeq ($(PDK),sky130A) SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c @@ -115,7 +121,9 @@ TARGET_PATH=$(shell pwd) verify_command="source ~/.bashrc && cd ${TARGET_PATH}/verilog/dv/$* && export SIM=${SIM} && make" dv_base_dependencies=simenv docker_run_verify=\ - docker run -v ${TARGET_PATH}:${TARGET_PATH} -v ${PDK_ROOT}:${PDK_ROOT} \ + docker run \ + $(USER_ARGS) \ + -v ${TARGET_PATH}:${TARGET_PATH} -v ${PDK_ROOT}:${PDK_ROOT} \ -v ${CARAVEL_ROOT}:${CARAVEL_ROOT} \ -v ${MCW_ROOT}:${MCW_ROOT} \ -e TARGET_PATH=${TARGET_PATH} -e PDK_ROOT=${PDK_ROOT} \ @@ -127,7 +135,7 @@ docker_run_verify=\ -e CORE_VERILOG_PATH=$(TARGET_PATH)/mgmt_core_wrapper/verilog \ -e CARAVEL_VERILOG_PATH=$(TARGET_PATH)/caravel/verilog \ -e MCW_ROOT=$(MCW_ROOT) \ - -u $$(id -u $$USER):$$(id -g $$USER) efabless/dv:latest \ + efabless/dv:latest \ sh -c $(verify_command) .PHONY: harden @@ -289,7 +297,7 @@ setup-timing-scripts: $(TIMING_ROOT) create-spef-mapping: ./verilog/gl/user_project_wrapper.v docker run \ --rm \ - -u $$(id -u $$USER):$$(id -g $$USER) \ + $(USER_ARGS) \ -v $(PDK_ROOT):$(PDK_ROOT) \ -v $(CUP_ROOT):$(CUP_ROOT) \ -v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \ @@ -309,7 +317,7 @@ create-spef-mapping: ./verilog/gl/user_project_wrapper.v extract-parasitics: ./verilog/gl/user_project_wrapper.v docker run \ --rm \ - -u $$(id -u $$USER):$$(id -g $$USER) \ + $(USER_ARGS) \ -v $(PDK_ROOT):$(PDK_ROOT) \ -v $(CUP_ROOT):$(CUP_ROOT) \ -v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \ diff --git a/openlane/Makefile b/openlane/Makefile index bb24e78b4..d75e2acac 100644 --- a/openlane/Makefile +++ b/openlane/Makefile @@ -21,6 +21,12 @@ OPENLANE_IMAGE_NAME ?= efabless/openlane:$(OPENLANE_TAG) designs = $(shell find * -maxdepth 0 -type d) current_design = null +ROOTLESS ?= 0 +USER_ARGS = -u $$(id -u $$USER):$$(id -g $$USER) +ifeq ($(ROOTLESS), 1) + USER_ARGS = +endif + openlane_cmd = \ "flow.tcl \ -design $$(realpath ./$*) \ @@ -52,9 +58,9 @@ endif docker_startup_mode = $(shell test -t 0 && echo "-it" || echo "--rm" ) docker_run = \ docker run $(docker_startup_mode) \ + $(USER_ARGS) \ $(docker_mounts) \ $(docker_env) \ - -u $(shell id -u $(USER)):$(shell id -g $(USER)) list: @echo $(designs) diff --git a/signoff/caravel/openlane-signoff/.gitignore b/signoff/caravel/openlane-signoff/.gitignore new file mode 100644 index 000000000..c0afd84fe --- /dev/null +++ b/signoff/caravel/openlane-signoff/.gitignore @@ -0,0 +1 @@ +/timing \ No newline at end of file