Skip to content

Commit

Permalink
Merge pull request #271 from efabless/qol
Browse files Browse the repository at this point in the history
Add `.gitignore` entries for generated files + enable rootless operation
  • Loading branch information
jeffdi authored Jul 26, 2023
2 parents b17af5e + 277b7d7 commit 5634b01
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@
*.lst
*.vcd
*.gtkw
/env
/venv
/caravel
/dependencies
/mgmt_core_wrapper
/logs
18 changes: 12 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ 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 OPENLANE_ROOT?=$(PWD)/dependencies/openlane_src
export PDK_ROOT?=$(PWD)/dependencies/pdks

export DISABLE_LVS?=0


export ROOTLESS

ifeq ($(PDK),sky130A)
SKYWATER_COMMIT=f70d8ca46961ff92719d8870a18a076370b85f6c
Expand Down Expand Up @@ -120,7 +124,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} \
Expand All @@ -132,7 +138,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
Expand Down Expand Up @@ -339,7 +345,7 @@ cocotb-verify-gl:
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) \
Expand All @@ -359,7 +365,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) \
Expand Down
8 changes: 7 additions & 1 deletion openlane/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./$*) \
Expand Down Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions signoff/caravel/openlane-signoff/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/timing

0 comments on commit 5634b01

Please sign in to comment.