From b263195330f44e02b3085e9ac7a5a81ce254e72e Mon Sep 17 00:00:00 2001 From: Kane York Date: Mon, 27 Jul 2020 00:30:10 -0700 Subject: [PATCH] Add 'make submodules' to download standard cell libraries --- README.rst | 10 ++++++++++ README.src.rst | 10 ++++++++++ scripts/make/git.mk | 19 +++++++++++++++++++ 3 files changed, 39 insertions(+) diff --git a/README.rst b/README.rst index 9a17ca2..1f53be5 100644 --- a/README.rst +++ b/README.rst @@ -111,6 +111,16 @@ The SkyWater Open Source PDK aims to contain comprehensive documentation about u We are excited to see additions to this documentation around using this design kit with new tools and design flows. Please see the `Contributing file `_ for information on how to do this. +To download or update to the 'latest' version of all standard cell libraries, and to regenerate the liberty files, clone this repository and run the following commands. + +```bash +# Expect a large download! ~7GB at time of writing. +SUBMODULE_VERSION=latest make submodules -j3 || make submodules -j1 + +# Regenerate liberty files +make timing +``` + Support ======= diff --git a/README.src.rst b/README.src.rst index fb600e3..253c304 100644 --- a/README.src.rst +++ b/README.src.rst @@ -93,6 +93,16 @@ The SkyWater Open Source PDK aims to contain comprehensive documentation about u We are excited to see additions to this documentation around using this design kit with new tools and design flows. Please see the `Contributing file `_ for information on how to do this. +To download or update to the 'latest' version of all standard cell libraries, and to regenerate the liberty files, clone this repository and run the following commands. + +```bash +# Expect a large download! ~7GB at time of writing. +SUBMODULE_VERSION=latest make submodules -j3 || make submodules -j1 + +# Regenerate liberty files +make timing +``` + Support ======= diff --git a/scripts/make/git.mk b/scripts/make/git.mk index a058758..e1a862e 100644 --- a/scripts/make/git.mk +++ b/scripts/make/git.mk @@ -15,6 +15,25 @@ FULL_VERSION := $(shell git describe --long) TAG_VERSION := $(firstword $(subst -, ,$(FULL_VERSION))) +SUBMODULE_VERSION ?= latest + ifeq (,$(FULL_VERSION)) $(error "Version value could not be determined. Make sure you fetch the tags.") endif + +submodules: libraries/sky130_fd_sc_hd/$(SUBMODULE_VERSION)/.git libraries/sky130_fd_sc_hdll/$(SUBMODULE_VERSION)/.git libraries/sky130_fd_sc_hs/$(SUBMODULE_VERSION)/.git libraries/sky130_fd_sc_ms/$(SUBMODULE_VERSION)/.git libraries/sky130_fd_sc_ls/$(SUBMODULE_VERSION)/.git + +libraries/sky130_fd_sc_hd/%/.git: .gitmodules + git submodule update --init $(@D) + +libraries/sky130_fd_sc_hdll/%/.git: .gitmodules + git submodule update --init $(@D) + +libraries/sky130_fd_sc_hs/%/.git: .gitmodules + git submodule update --init $(@D) + +libraries/sky130_fd_sc_ms/%/.git: .gitmodules + git submodule update --init $(@D) + +libraries/sky130_fd_sc_ls/%/.git: .gitmodules + git submodule update --init $(@D)