pdk file are copied /opt/pdk inside the docker
diff --git a/Makefile b/Makefile index 77f6485..f898ec3 100644 --- a/Makefile +++ b/Makefile
@@ -57,12 +57,21 @@ PDK_PATH=${PDK_ROOT}/sky130A VERIFY_COMMAND="cd ${TARGET_PATH}/verilog/dv/$* && export SIM=${SIM} && make" $(DV_PATTERNS): verify-% : ./verilog/dv/% + @if [ ! -d "$(PDK_ROOT)" ]; then \ + docker run -v ${TARGET_PATH}:${TARGET_PATH} \ + -v ${CARAVEL_ROOT}:${CARAVEL_ROOT} \ + -e TARGET_PATH=${TARGET_PATH} \ + -e CARAVEL_ROOT=${CARAVEL_ROOT} \ + -u $(id -u $$USER):$(id -g $$USER) dineshannayya/dv_setup:latest \ + sh -c $(VERIFY_COMMAND); \ + else \ docker run -v ${TARGET_PATH}:${TARGET_PATH} -v ${PDK_PATH}:${PDK_PATH} \ -v ${CARAVEL_ROOT}:${CARAVEL_ROOT} \ -e TARGET_PATH=${TARGET_PATH} -e PDK_PATH=${PDK_PATH} \ -e CARAVEL_ROOT=${CARAVEL_ROOT} \ -u $(id -u $$USER):$(id -g $$USER) dineshannayya/dv_setup:latest \ - sh -c $(VERIFY_COMMAND) + sh -c $(VERIFY_COMMAND); \ + fi # Openlane Makefile Targets BLOCKS = $(shell cd openlane && find * -maxdepth 0 -type d)
diff --git a/README.md b/README.md index 38d9566..1b52b51 100644 --- a/README.md +++ b/README.md
@@ -526,11 +526,12 @@ - Docker (ensure docker daemon is running) -- tested with version 19.03.12, but any recent version should suffice. ## Environment setting + - Note: PDK alreay installed inside the docker, no need to define the PDK_ROOT, This will be point to /opt/pdk path inside the docker + if user define the PDK_ROOT path, then flow will use the user defined PDK PATH ```bash export CARAVEL_ROOT=<Carvel Installed Path> export OPENLANE_ROOT=<OpenLane Installed Path> - export PDK_ROOT=<PDK Installed Path> export IMAGE_NAME=dineshannayya/openlane:rc7 ```
diff --git a/openlane/Makefile b/openlane/Makefile index 99b2d73..a368605 100644 --- a/openlane/Makefile +++ b/openlane/Makefile
@@ -34,13 +34,30 @@ @echo "Please export OPENLANE_ROOT" @exit 1 endif -ifeq ($(PDK_ROOT),) - @echo "Please export PDK_ROOT" - @exit 1 -endif - @echo "###############################################" +#ifeq ($(PDK_ROOT),) +# @echo "Please export PDK_ROOT" +# @exit 1 +#endif + @echo "############ Running Command #####################" @sleep 1 +#if PDK root is not defines, then use the PDK ROOT inside docker /opt/pdk +ifneq ($(PDK_ROOT), 1) + @if [ -f ./$*/interactive.tcl ]; then\ + docker run -it -v $(OPENLANE_ROOT):/openLANE_flow \ + -v $(PWD)/..:/project \ + -u $(shell id -u $(USER)):$(shell id -g $(USER)) \ + $(OPENLANE_IMAGE_NAME) sh -c $(OPENLANE_INTERACTIVE_COMMAND);\ + else\ + docker run -it -v $(OPENLANE_ROOT):/openLANE_flow \ + -v $(PWD)/..:/project \ + -u $(shell id -u $(USER)):$(shell id -g $(USER)) \ + $(OPENLANE_IMAGE_NAME) sh -c $(OPENLANE_BASIC_COMMAND);\ + fi +endif + +#if PDK_ROOT define, then pick the local path +ifeq ($(PDK_ROOT), 1) @if [ -f ./$*/interactive.tcl ]; then\ docker run -it -v $(OPENLANE_ROOT):/openLANE_flow \ -v $(PDK_ROOT):$(PDK_ROOT) \ @@ -55,7 +72,9 @@ -e PDK_ROOT=$(PDK_ROOT) \ -u $(shell id -u $(USER)):$(shell id -g $(USER)) \ $(OPENLANE_IMAGE_NAME) sh -c $(OPENLANE_BASIC_COMMAND);\ - fi + fi +endif + mkdir -p ../signoff/$*/ cp $*/runs/$*/OPENLANE_VERSION ../signoff/$*/ cp $*/runs/$*/PDK_SOURCES ../signoff/$*/