Makefile updates - added target for running help - added target for building the pdk with OL docker to avoid having magic installed
diff --git a/Makefile b/Makefile index e180deb..3e6c335 100644 --- a/Makefile +++ b/Makefile
@@ -15,7 +15,7 @@ # SPDX-License-Identifier: Apache-2.0 CARAVEL_ROOT?=$(PWD)/caravel -PRECHECK_ROOT?=${HOME}/precheck +PRECHECK_ROOT?=${HOME}/open_mpw_precheck SIM ?= RTL # Install lite version of caravel, (1): caravel-lite, (0): caravel @@ -56,7 +56,7 @@ TARGET_PATH=$(shell pwd) PDK_PATH=${PDK_ROOT}/sky130A VERIFY_COMMAND="cd ${TARGET_PATH}/verilog/dv/$* && export SIM=${SIM} && make" -$(DV_PATTERNS): verify-% : +$(DV_PATTERNS): verify-% : ./verilog/dv/% 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} \ @@ -145,7 +145,12 @@ $(eval TARGET_PATH := $(shell pwd)) cd $(PRECHECK_ROOT) && \ docker run -v $(PRECHECK_ROOT):/usr/local/bin -v $(TARGET_PATH):$(TARGET_PATH) -v $(PDK_ROOT):$(PDK_ROOT) -v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \ - -u $(shell id -u $(USER)):$(shell id -g $(USER)) efabless/open_mpw_precheck:latest bash -c "python3 open_mpw_prechecker.py --pdk_root $(PDK_ROOT) --target_path $(TARGET_PATH) -c $(CARAVEL_ROOT)" + -u $(shell id -u $(USER)):$(shell id -g $(USER)) efabless/open_mpw_precheck:latest bash -c "python3 open_mpw_prechecker.py --pdk_root $(PDK_ROOT) --target_path $(TARGET_PATH) -rfc -c $(CARAVEL_ROOT) " + +# Install PDK using OL's Docker Image +.PHONY: pdk-nonnative +pdk-nonnative: skywater-pdk skywater-library skywater-timing open_pdks + docker run --rm -v $(PDK_ROOT):$(PDK_ROOT) -v $(pwd):/user_project -v $(CARAVEL_ROOT):$(CARAVEL_ROOT) -e CARAVEL_ROOT=$(CARAVEL_ROOT) -e PDK_ROOT=$(PDK_ROOT) -u $(shell id -u $(USER)):$(shell id -g $(USER)) efabless/openlane:current sh -c "cd $(CARAVEL_ROOT); make build-pdk; make gen-sources" # Clean .PHONY: clean @@ -169,4 +174,9 @@ @if [ ! -d "$(PDK_ROOT)" ]; then \ echo "PDK Root: "$(PDK_ROOT)" doesn't exists, please export the correct path before running make. "; \ exit 1; \ - fi \ No newline at end of file + fi + +.PHONY: help +help: + cd $(CARAVEL_ROOT) && $(MAKE) help + @$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
diff --git a/docs/source/index.rst b/docs/source/index.rst index 6a1f564..6e024e7 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst
@@ -50,6 +50,11 @@ repo also demonstrates the recommended structure for the open-mpw shuttle projects. +Prerequisites +============= + +- Docker + Install Caravel =============== @@ -147,18 +152,14 @@ </p> -Running Full Chip Simulation -============================ +Building the PDK +================ -First, you will need to install the simulation environment, by +You have two options for building the pdk: -.. code:: bash +- Build the pdk natively. - make simenv - -This will pull a docker image with the needed tools installed. - -Then, you will need to build the pdk to obtain the verilog views. +Make sure you have `Magic VLSI Layout Tool <http://opencircuitdesign.com/magic/index.html>`__ installed on your machine before building the pdk. .. code:: bash @@ -171,6 +172,30 @@ make pdk +- Build the pdk using openlane's docker image which has magic installed. + +.. code:: bash + + # set PDK_ROOT to the path you wish to use for the pdk + export PDK_ROOT=<pdk-installation-path> + + # you can optionally specify skywater-pdk and open-pdks commit used + # by setting and exporting SKYWATER_COMMIT and OPEN_PDKS_COMMIT + # if you do not set them, they default to the last verfied commits tested for this project + + make pdk-nonnative + +Running Full Chip Simulation +============================ + +First, you will need to install the simulation environment, by + +.. code:: bash + + make simenv + +This will pull a docker image with the needed tools installed. + Then, run the RTL and GL simulation by .. code:: bash @@ -190,20 +215,7 @@ Hardening the User Project Macro using Openlane =============================================== -First, you will need to install the pdk by - -.. code:: bash - - # set PDK_ROOT to the path you wish to use for the pdk - export PDK_ROOT=<pdk-installation-path> - - # you can optionally specify skywater-pdk and open-pdks commit used - # by setting and exporting SKYWATER_COMMIT and OPEN_PDKS_COMMIT - # if you do not set them, they default to the last verfied commits tested for this project - - make pdk - -Then, you will need to install openlane by +You will need to install openlane by running the following .. code:: bash @@ -248,7 +260,6 @@ make user_project_wrapper - Running Open-MPW Precheck Locally ================================= @@ -264,9 +275,12 @@ Then, you can run the precheck by running +Specify CARAVEL_ROOT before running any of the following, .. code:: bash + # export CARAVEL_ROOT=$(pwd)/caravel + export CARAVEL_ROOT=<path-to-caravel> make run-precheck This will run all the precheck checks on your project and will produce the logs under the ``checks`` directory. @@ -282,7 +296,8 @@ Specify CARAVEL_ROOT before running any of the following, .. code:: bash - + + # export CARAVEL_ROOT=$(pwd)/caravel export CARAVEL_ROOT=<path-to-caravel> Run lvs on spice,