From 747bdbbd2d0c24858dfdff4e8a4f0d0b31d257fd Mon Sep 17 00:00:00 2001 From: Mohamed Gaber Date: Thu, 19 Oct 2023 17:34:52 +0300 Subject: [PATCH] Makefile Improvements + Banner Update (#2018) + Added a new target to the Makefile, `make m`, which mounts the directory at the same path in the container as it is in the host ~ Changed Makefile to mount an empty folder where `install` is so there's less confusion ~ Updated banner per @shalan's recommendation - Remove `make veryclean` which users may not use consciously and end up nuking their designs --- Makefile | 28 +- docs/_static/ol2_banner.svg | 1249 +---------------------------------- 2 files changed, 56 insertions(+), 1221 deletions(-) diff --git a/Makefile b/Makefile index 3ed69d46..1c8799cb 100644 --- a/Makefile +++ b/Makefile @@ -86,12 +86,22 @@ export STD_CELL_LIBRARY ?= sky130_fd_sc_hd PDK_OPTS += -e STD_CELL_LIBRARY=$(STD_CELL_LIBRARY) endif -# ./designs is mounted over ./install so env.tcl is not found inside the Docker -# container if the user had previously installed it. -ENV_START = docker run --rm\ +_FAKE_VARIABLE_TO_FORCE_MKDIR := $(shell mkdir -p ./empty) + +ENV_MOUNT = \ -v $(OPENLANE_DIR):/openlane\ - -v $(OPENLANE_DIR)/designs:/openlane/install\ + -v $(PWD)/empty:/openlane/install + +ifeq ($(MAKECMDGOALS), m) +ENV_MOUNT = \ + -v $(OPENLANE_DIR):$(OPENLANE_DIR)\ + -v $(PWD)/empty:$(OPENLANE_DIR)/install\ + -w $(OPENLANE_DIR) +endif + +ENV_START := docker run --rm\ -v $(HOME):$(HOME)\ + $(ENV_MOUNT)\ $(PDK_OPTS)\ $(STD_CELL_OPTS)\ $(DOCKER_OPTIONS) @@ -117,6 +127,11 @@ pull-openlane: get-openlane: @$(MAKE) pull-openlane || $(MAKE) openlane +.PHONY: m +m: + cd $(OPENLANE_DIR) && \ + $(ENV_START) -ti $(OPENLANE_IMAGE_NAME)-$(DOCKER_ARCH) + .PHONY: mount mount: cd $(OPENLANE_DIR) && \ @@ -197,10 +212,7 @@ quick_run: cd $(OPENLANE_DIR) && \ $(ENV_COMMAND) sh -c "./flow.tcl -design $(QUICK_RUN_DESIGN)" -.PHONY: veryclean clean_runs clean_results -veryclean: - @git clean -fdX - +.PHONY: clean_runs clean_results clean_runs: @rm -rf ./designs/*/runs ./designs/ci/*/runs ./_build/it_tc_logs && echo "Runs cleaned successfully." || echo "Failed to delete runs." @rm -rf ./tests/*/runs && echo "Test runs cleaned successfully." || echo "Failed to delete test runs." diff --git a/docs/_static/ol2_banner.svg b/docs/_static/ol2_banner.svg index b6dd8ce2..2ab3ce2a 100644 --- a/docs/_static/ol2_banner.svg +++ b/docs/_static/ol2_banner.svg @@ -2,9 +2,9 @@ Feeling adventurous? Take a sneak peek at thenext generation of OpenLane, rebuilt from the groundup for customizability.Feeling adventurous?Take a sneak peek at the next generation ofOpenLane, rebuilt from the ground up forcustomizability. + x="38.196682" + y="5.2173305">Introducing: OpenLane 2!