mirror of https://github.com/efabless/caravel.git
- change litex tag to mpw-5c
- warn before deleting when rerunning these targets: install_mcw openlane pdk - clone litex with depth=1 and single branch - simplified pdk targets by removing these targets: skywater-timing build-pdk skywater-library - add clean-pdk and clean-openlane - add make prerequisites in pdk (not sure if that's needed) - run openlane docker non interactive - export OPENLANE_IMAGE_NAME when running openlane docker - add check-openlane-env target Squashed commit of the following: commitb7904e08ae
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 13:32:36 2022 -0800 typo commit8507bcf1ee
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 11:51:42 2022 -0800 undo tag for testing commit12114e08d2
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 11:50:41 2022 -0800 typo commit1a15d4646a
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 11:47:26 2022 -0800 fix folder not found check commitaddf24a8b6
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 11:03:31 2022 -0800 remove export path and ls that were for testing commit91a305f365
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 10:57:39 2022 -0800 typo commit00c249db5c
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 10:50:28 2022 -0800 - use tag for MCW_BRANCH - non phony install_mcw - clone with depth 1 commitba14b7a6aa
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 10:39:59 2022 -0800 the return of non phony commitf5657bbabf
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 05:04:51 2022 -0800 revert commit ids of openpdks, magic and openlane (we are going to set them in caravel_user_project) commit0fc8c4dacd
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 24 04:46:37 2022 -0800 gen-source for sky130B commitc875a7b058
Merge:801b3dc
ff403f5
Author: kareem <kareem.farid@efabless.com> Date: Wed Feb 23 14:16:25 2022 -0800 Merge remote-tracking branch 'upstream/main' into makefile commit801b3dc28d
Author: kareem <kareem.farid@efabless.com> Date: Wed Feb 23 14:15:25 2022 -0800 also update openlane, magic, openpdks commit id commit47091c6fba
Author: kareem <kareem.farid@efabless.com> Date: Tue Feb 22 13:35:07 2022 -0800 more changes commit67a49b0aa2
Author: kareem <kareem.farid@efabless.com> Date: Thu Feb 17 11:56:56 2022 -0800 WIP actual usage of make targets
This commit is contained in:
parent
ff403f5d9b
commit
0f04a43f58
115
Makefile
115
Makefile
|
@ -51,7 +51,7 @@ MCW_LITE?=1
|
||||||
ifeq ($(MCW),LITEX_VEXRISCV)
|
ifeq ($(MCW),LITEX_VEXRISCV)
|
||||||
MCW_NAME := mcw-litex-vexriscv
|
MCW_NAME := mcw-litex-vexriscv
|
||||||
MCW_REPO := https://github.com/efabless/caravel_mgmt_soc_litex
|
MCW_REPO := https://github.com/efabless/caravel_mgmt_soc_litex
|
||||||
MCW_BRANCH := main
|
MCW_BRANCH := mpw-5b
|
||||||
else
|
else
|
||||||
MCW_NAME := mcw-pico
|
MCW_NAME := mcw-pico
|
||||||
MCW_REPO := https://github.com/efabless/caravel_pico
|
MCW_REPO := https://github.com/efabless/caravel_pico
|
||||||
|
@ -1165,6 +1165,10 @@ update_caravel:
|
||||||
# Install Mgmt Core Wrapper
|
# Install Mgmt Core Wrapper
|
||||||
.PHONY: install_mcw
|
.PHONY: install_mcw
|
||||||
install_mcw:
|
install_mcw:
|
||||||
|
if [ -d "$(MCW_ROOT)" ]; then \
|
||||||
|
echo "Deleting exisiting $(MCW_ROOT)" && \
|
||||||
|
rm -rf $(MCW_ROOT) && sleep 2;\
|
||||||
|
fi
|
||||||
ifeq ($(SUBMODULE),1)
|
ifeq ($(SUBMODULE),1)
|
||||||
@echo "Installing $(MCW_NAME) as a submodule.."
|
@echo "Installing $(MCW_NAME) as a submodule.."
|
||||||
# Convert MCW_ROOT to relative path because .gitmodules doesn't accept '/'
|
# Convert MCW_ROOT to relative path because .gitmodules doesn't accept '/'
|
||||||
|
@ -1175,10 +1179,10 @@ ifeq ($(SUBMODULE),1)
|
||||||
$(MAKE) simlink
|
$(MAKE) simlink
|
||||||
else
|
else
|
||||||
@echo "Installing $(MCW_NAME).."
|
@echo "Installing $(MCW_NAME).."
|
||||||
@git clone $(MCW_REPO) $(MCW_ROOT)
|
@git clone $(MCW_REPO) $(MCW_ROOT) --branch=$(MCW_BRANCH) --depth=1
|
||||||
@cd $(MCW_ROOT); git checkout $(MCW_BRANCH)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Update Mgmt Core Wrapper
|
# Update Mgmt Core Wrapper
|
||||||
.PHONY: update_mcw
|
.PHONY: update_mcw
|
||||||
update_mcw: check-mcw
|
update_mcw: check-mcw
|
||||||
|
@ -1210,26 +1214,65 @@ endif
|
||||||
###########################################################################
|
###########################################################################
|
||||||
pdk-with-sram: pdk
|
pdk-with-sram: pdk
|
||||||
.PHONY: pdk
|
.PHONY: pdk
|
||||||
pdk: skywater-pdk skywater-library skywater-timing open_pdks build-pdk gen-sources
|
pdk: check-env skywater-pdk open-pdks sky130 gen-sources
|
||||||
|
|
||||||
$(PDK_ROOT)/skywater-pdk:
|
.PHONY: clean-pdk
|
||||||
git clone https://github.com/google/skywater-pdk.git $(PDK_ROOT)/skywater-pdk
|
clean-pdk:
|
||||||
|
rm -rf $(PDK_ROOT)
|
||||||
|
|
||||||
.PHONY: skywater-pdk
|
.PHONY: skywater-pdk
|
||||||
skywater-pdk: check-env $(PDK_ROOT)/skywater-pdk
|
skywater-pdk:
|
||||||
|
if [ -d "$(PDK_ROOT)/skywater-pdk" ]; then\
|
||||||
|
echo "Deleting exisiting $(PDK_ROOT)/skywater-pdk" && \
|
||||||
|
rm -rf $(PDK_ROOT)/skywater-pdk && sleep 2;\
|
||||||
|
fi
|
||||||
|
git clone https://github.com/google/skywater-pdk.git $(PDK_ROOT)/skywater-pdk
|
||||||
cd $(PDK_ROOT)/skywater-pdk && \
|
cd $(PDK_ROOT)/skywater-pdk && \
|
||||||
git checkout main && git pull && \
|
git checkout main && git pull && \
|
||||||
git checkout -qf $(SKYWATER_COMMIT)
|
git checkout -qf $(SKYWATER_COMMIT) && \
|
||||||
|
|
||||||
.PHONY: skywater-library
|
|
||||||
skywater-library: check-env $(PDK_ROOT)/skywater-pdk
|
|
||||||
cd $(PDK_ROOT)/skywater-pdk && \
|
|
||||||
git submodule update --init libraries/$(STD_CELL_LIBRARY)/latest && \
|
git submodule update --init libraries/$(STD_CELL_LIBRARY)/latest && \
|
||||||
git submodule update --init libraries/$(IO_LIBRARY)/latest && \
|
git submodule update --init libraries/$(IO_LIBRARY)/latest && \
|
||||||
git submodule update --init libraries/$(SPECIAL_VOLTAGE_LIBRARY)/latest && \
|
git submodule update --init libraries/$(SPECIAL_VOLTAGE_LIBRARY)/latest && \
|
||||||
git submodule update --init libraries/$(PRIMITIVES_LIBRARY)/latest
|
git submodule update --init libraries/$(PRIMITIVES_LIBRARY)/latest && \
|
||||||
|
$(MAKE) timing
|
||||||
|
|
||||||
gen-sources: $(PDK_ROOT)/sky130A
|
### OPEN_PDKS
|
||||||
|
.PHONY: open-pdks
|
||||||
|
open-pdks:
|
||||||
|
if [ -d "$(PDK_ROOT)/open_pdks" ]; then \
|
||||||
|
echo "Deleting exisiting $(PDK_ROOT)/open_pdks" && \
|
||||||
|
rm -rf $(PDK_ROOT)/open_pdks && sleep 2; \
|
||||||
|
fi
|
||||||
|
git clone git://opencircuitdesign.com/open_pdks $(PDK_ROOT)/open_pdks
|
||||||
|
cd $(PDK_ROOT)/open_pdks && \
|
||||||
|
git checkout master && git pull && \
|
||||||
|
git checkout -qf $(OPEN_PDKS_COMMIT)
|
||||||
|
|
||||||
|
.PHONY: sky130
|
||||||
|
sky130:
|
||||||
|
if [ -d "$(PDK_ROOT)/sky130A" ]; then \
|
||||||
|
echo "Deleting exisiting $(PDK_ROOT)/sky130A" && \
|
||||||
|
rm -rf $(PDK_ROOT)/sky130A && sleep 2;\
|
||||||
|
fi
|
||||||
|
docker run --rm\
|
||||||
|
-v $(PDK_ROOT):$(PDK_ROOT)\
|
||||||
|
-u $(shell id -u $(USER)):$(shell id -g $(USER)) \
|
||||||
|
-e PDK_ROOT=$(PDK_ROOT)\
|
||||||
|
-e GIT_COMMITTER_NAME="caravel"\
|
||||||
|
-e GIT_COMMITTER_EMAIL="caravel@caravel.caravel"\
|
||||||
|
efabless/openlane-tools:magic-$(PDK_MAGIC_COMMIT)-centos-7\
|
||||||
|
sh -c "\
|
||||||
|
cd $(PDK_ROOT)/open_pdks && \
|
||||||
|
./configure --enable-sky130-pdk=$(PDK_ROOT)/skywater-pdk/libraries --enable-sram-sky130 && \
|
||||||
|
cd sky130 && \
|
||||||
|
make veryclean && \
|
||||||
|
make prerequisites && \
|
||||||
|
make && \
|
||||||
|
make SHARED_PDKS_PATH=$(PDK_ROOT) install && \
|
||||||
|
make clean \
|
||||||
|
"
|
||||||
|
.PHONY: gen-sources
|
||||||
|
gen-sources:
|
||||||
touch $(PDK_ROOT)/sky130A/SOURCES
|
touch $(PDK_ROOT)/sky130A/SOURCES
|
||||||
printf "skywater-pdk " >> $(PDK_ROOT)/sky130A/SOURCES
|
printf "skywater-pdk " >> $(PDK_ROOT)/sky130A/SOURCES
|
||||||
cd $(PDK_ROOT)/skywater-pdk && git rev-parse HEAD >> $(PDK_ROOT)/sky130A/SOURCES
|
cd $(PDK_ROOT)/skywater-pdk && git rev-parse HEAD >> $(PDK_ROOT)/sky130A/SOURCES
|
||||||
|
@ -1237,44 +1280,6 @@ gen-sources: $(PDK_ROOT)/sky130A
|
||||||
cd $(PDK_ROOT)/open_pdks && git rev-parse HEAD >> $(PDK_ROOT)/sky130A/SOURCES
|
cd $(PDK_ROOT)/open_pdks && git rev-parse HEAD >> $(PDK_ROOT)/sky130A/SOURCES
|
||||||
printf "magic $(PDK_MAGIC_COMMIT)" >> $(PDK_ROOT)/sky130A/SOURCES
|
printf "magic $(PDK_MAGIC_COMMIT)" >> $(PDK_ROOT)/sky130A/SOURCES
|
||||||
|
|
||||||
|
|
||||||
skywater-timing: check-env $(PDK_ROOT)/skywater-pdk
|
|
||||||
cd $(PDK_ROOT)/skywater-pdk && \
|
|
||||||
$(MAKE) timing
|
|
||||||
### OPEN_PDKS
|
|
||||||
$(PDK_ROOT)/open_pdks:
|
|
||||||
git clone git://opencircuitdesign.com/open_pdks $(PDK_ROOT)/open_pdks
|
|
||||||
|
|
||||||
.PHONY: open_pdks
|
|
||||||
open_pdks: check-env $(PDK_ROOT)/open_pdks
|
|
||||||
cd $(PDK_ROOT)/open_pdks && \
|
|
||||||
git checkout master && git pull && \
|
|
||||||
git checkout -qf $(OPEN_PDKS_COMMIT)
|
|
||||||
|
|
||||||
.PHONY: build-pdk
|
|
||||||
build-pdk: check-env $(PDK_ROOT)/open_pdks $(PDK_ROOT)/skywater-pdk
|
|
||||||
[ -d $(PDK_ROOT)/sky130A ] && \
|
|
||||||
(echo "Warning: A sky130A build already exists under $(PDK_ROOT). It will be deleted first!" && \
|
|
||||||
sleep 5 && \
|
|
||||||
rm -rf $(PDK_ROOT)/sky130A) || \
|
|
||||||
true
|
|
||||||
docker run --rm\
|
|
||||||
-v $(PDK_ROOT):$(PDK_ROOT)\
|
|
||||||
-e PDK_ROOT=$(PDK_ROOT)\
|
|
||||||
-e GIT_COMMITTER_NAME="caravel"\
|
|
||||||
-e GIT_COMMITTER_EMAIL="caravel@caravel.caravel"\
|
|
||||||
-u $$(id -u $(USER)):$$(id -g $(USER)) \
|
|
||||||
efabless/openlane-tools:magic-$(PDK_MAGIC_COMMIT)-centos-7\
|
|
||||||
sh -c "\
|
|
||||||
cd $(PDK_ROOT)/open_pdks && \
|
|
||||||
./configure --enable-sky130-pdk=$(PDK_ROOT)/skywater-pdk/libraries --with-sky130-local-path=$(PDK_ROOT) --enable-sram-sky130=yes && \
|
|
||||||
cd sky130 && \
|
|
||||||
make veryclean && \
|
|
||||||
make && \
|
|
||||||
make SHARED_PDKS_PATH=$(PDK_ROOT) install && \
|
|
||||||
make clean \
|
|
||||||
"
|
|
||||||
|
|
||||||
.RECIPE: manifest
|
.RECIPE: manifest
|
||||||
manifest: mag/ maglef/ verilog/rtl/ Makefile
|
manifest: mag/ maglef/ verilog/rtl/ Makefile
|
||||||
touch manifest && \
|
touch manifest && \
|
||||||
|
@ -1296,6 +1301,7 @@ master_manifest:
|
||||||
find spi/lvs/*.spice -type f -exec shasum {} \; >> master_manifest && \
|
find spi/lvs/*.spice -type f -exec shasum {} \; >> master_manifest && \
|
||||||
find gds/*.gds -type f -exec shasum {} \; >> master_manifest
|
find gds/*.gds -type f -exec shasum {} \; >> master_manifest
|
||||||
|
|
||||||
|
.PHONY: check-env
|
||||||
check-env:
|
check-env:
|
||||||
ifndef PDK_ROOT
|
ifndef PDK_ROOT
|
||||||
$(error PDK_ROOT is undefined, please export it before running make)
|
$(error PDK_ROOT is undefined, please export it before running make)
|
||||||
|
@ -1340,3 +1346,8 @@ README.rst: README.src.rst docs/source/getting-started.rst docs/source/tool-vers
|
||||||
-e's@.. note::@**NOTE:**@g' \
|
-e's@.. note::@**NOTE:**@g' \
|
||||||
-e's@.. warning::@**WARNING:**@g' \
|
-e's@.. warning::@**WARNING:**@g' \
|
||||||
> openlane/README.rst
|
> openlane/README.rst
|
||||||
|
|
||||||
|
.PHONY: clean-openlane
|
||||||
|
clean-openlane:
|
||||||
|
rm -rf $(OPENLANE_ROOT)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# SPDX-FileCopyrightText: 2020 Efabless Corporation
|
# SPDX-FileCopyrightText: 2020 Efabless Corporation
|
||||||
#
|
# # Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
# You may obtain a copy of the License at
|
# You may obtain a copy of the License at
|
||||||
#
|
#
|
||||||
|
@ -29,7 +28,8 @@ $(CONFIG) :
|
||||||
@echo "Missing $@. Please create a configuration for that design"
|
@echo "Missing $@. Please create a configuration for that design"
|
||||||
@exit 1
|
@exit 1
|
||||||
|
|
||||||
$(BLOCKS) : % : ./%/config.tcl FORCE
|
.PHONY: $(BLOCKS)
|
||||||
|
$(BLOCKS) : % : ./%/config.tcl
|
||||||
ifeq ($(OPENLANE_ROOT),)
|
ifeq ($(OPENLANE_ROOT),)
|
||||||
@echo "Please export OPENLANE_ROOT"
|
@echo "Please export OPENLANE_ROOT"
|
||||||
@exit 1
|
@exit 1
|
||||||
|
@ -42,7 +42,7 @@ endif
|
||||||
@sleep 1
|
@sleep 1
|
||||||
|
|
||||||
@if [ -f ./$*/interactive.tcl ]; then\
|
@if [ -f ./$*/interactive.tcl ]; then\
|
||||||
docker run -it -v $(OPENLANE_ROOT):/openlane \
|
docker run --rm -v $(OPENLANE_ROOT):/openlane \
|
||||||
-v $(PDK_ROOT):$(PDK_ROOT) \
|
-v $(PDK_ROOT):$(PDK_ROOT) \
|
||||||
-v $(PWD)/..:$(PWD)/.. \
|
-v $(PWD)/..:$(PWD)/.. \
|
||||||
-v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \
|
-v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \
|
||||||
|
@ -52,7 +52,7 @@ endif
|
||||||
-u $(shell id -u $(USER)):$(shell id -g $(USER)) \
|
-u $(shell id -u $(USER)):$(shell id -g $(USER)) \
|
||||||
$(OPENLANE_IMAGE_NAME) sh -c $(OPENLANE_INTERACTIVE_COMMAND);\
|
$(OPENLANE_IMAGE_NAME) sh -c $(OPENLANE_INTERACTIVE_COMMAND);\
|
||||||
else\
|
else\
|
||||||
docker run -it -v $(OPENLANE_ROOT):/openlane \
|
docker run --rm -v $(OPENLANE_ROOT):/openlane \
|
||||||
-v $(PDK_ROOT):$(PDK_ROOT) \
|
-v $(PDK_ROOT):$(PDK_ROOT) \
|
||||||
-v $(PWD)/..:$(PWD)/.. \
|
-v $(PWD)/..:$(PWD)/.. \
|
||||||
-v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \
|
-v $(CARAVEL_ROOT):$(CARAVEL_ROOT) \
|
||||||
|
@ -68,15 +68,23 @@ endif
|
||||||
cp $*/runs/$*/reports/final_summary_report.csv ../signoff/$*/
|
cp $*/runs/$*/reports/final_summary_report.csv ../signoff/$*/
|
||||||
|
|
||||||
.PHONY: openlane
|
.PHONY: openlane
|
||||||
openlane:
|
openlane: check-openlane-env
|
||||||
|
if [ -d "$(OPENLANE_ROOT)" ]; then\
|
||||||
|
echo "Deleting exisiting $(OPENLANE_ROOT)" && \
|
||||||
|
rm -rf $(OPENLANE_ROOT) && sleep 2; \
|
||||||
|
fi
|
||||||
|
git clone https://github.com/The-OpenROAD-Project/OpenLane --branch=$(OPENLANE_TAG) --depth=1 $(OPENLANE_ROOT) && \
|
||||||
|
cd $(OPENLANE_ROOT) && \
|
||||||
|
export OPENLANE_IMAGE_NAME=efabless/openlane:$(OPENLANE_TAG) && \
|
||||||
|
export IMAGE_NAME=efabless/openlane:$(OPENLANE_TAG) && \
|
||||||
|
$(MAKE) pull-openlane
|
||||||
|
|
||||||
|
.PHONY: check-openlane-env
|
||||||
|
check-openlane-env:
|
||||||
ifeq ($(OPENLANE_ROOT),)
|
ifeq ($(OPENLANE_ROOT),)
|
||||||
@echo "Please export OPENLANE_ROOT"
|
@echo "Please export OPENLANE_ROOT"
|
||||||
@exit 1
|
@exit 1
|
||||||
endif
|
endif
|
||||||
git clone https://github.com/The-OpenROAD-Project/OpenLane --branch=$(OPENLANE_TAG) --depth=1 $(OPENLANE_ROOT) && \
|
|
||||||
cd $(OPENLANE_ROOT) && \
|
|
||||||
export IMAGE_NAME=efabless/openlane:$(OPENLANE_TAG) && \
|
|
||||||
$(MAKE) pull-openlane
|
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue