blob: bbc61cce94f00fd1914c091105d7f5d4054c71bf [file] [log] [blame]
# Makefile for efabless design kits for SkyWater Sky130:
#
# sky130A = 5-metal backend stack with dual MiM
# sky130B = 5-metal backend stack with dual MiM and ReRAM
#
# Written by Tim Edwards March 2019
# efabless corporation
# updated October 2019
# updated December 2019 (divide installation sections for individual tools)
# updated March 2020 (refactored the install process)
# updated May 2020 (changed to new process name Sky130)
# updated January 2022 (divided into two variants A and B)
# updated July 2023 (sky130 repositories switched to github/efabless)
#
# Instructions:
#
# Run "configure" from the top level directory. Use the following
# configuration options to match your environment:
#
# --enable-sky130-pdk
# If enabled, install the skywater PDK.
# If explicitly disabled, sky130 is skipped over entirely.
#
# --with-sky130-link-targets=<value>
# where <value> is one of "none" or "source". If set to "source",
# then where possible, the installed files are symbolic links
# back to the source, rather than copies of the source. The
# default value is "none" if the option is not specified.
#
# --with-ef-style
# If specified, then the installation uses the efabless style,
# which swaps the file hierarchy of file formats vs. IP libraries;
# e.g., "gds/sky130_fd_sc_hd/" with ef-style, vs.
# "sky130_fd_sc_hd/gds/" without it. Normally this should not
# be enabled.
#
# Enable/disable for specific libraries to be installed (and downloaded if
# needed). Libraries that are part of the open_pdks repository are enabled
# by default and must be disabled by passing an option to configure. Libraries
# that are not part of the open_pdks repository are disabled by default and
# must be enabled by passing an option to configure.
#
# Internal libraries and tool setups that can be disabled are the following:
#
# --disable-magic
# Do not install setup files for the magic layout tool.
#
# --disable-netgen
# Do not install setup files for the netgen LVS tool.
#
# --disable-irsim
# Do not install setup files for the IRSIM simulation tool.
#
# --disable-qflow
# Do not install setup files for the qflow synthesis flow.
#
# --disable-openlane
# Do not install setup files for the openlane sythesis flow.
#
# --disable-klayout
# Do not install setup files for the klayout layout tool.
#
#
# NOTE: The comments below are for features that have not yet been
# implemented.
#
# External (third-party) libraries and tool setups are the following (enabled
# by default):
#
# --enable-primitive-sky130[=<path>]
# If enabled, install the sky130 primitives library.
# If <path> is not specified, then the primitives library will be
# cloned from the git repository and installed.
#
# --enable-io-sky130[=<path>]
# If enabled, install the sky130 I/O library.
# If <path> is not specified, then the I/O library will be
# cloned from the git repository and installed.
#
# --enable-sc-hs-sky130[=<path>]
# If enabled, install the sky130 high-speed standard cell library.
# If <path> is not specified, then the high-speed standard cell
# library will be cloned from the git repository and installed.
#
# --enable-sc-ms-sky130[=<path>]
# If enabled, install the sky130 medium-speed standard cell library.
# If <path> is not specified, then the medium-speed standard cell
# library will be cloned from the git repository and installed.
#
# --enable-sc-ls-sky130[=<path>]
# If enabled, install the sky130 low-speed standard cell library.
# If <path> is not specified, then the low-speed standard cell
# library will be cloned from the git repository and installed.
#
# --enable-sc-lp-sky130[=<path>]
# If enabled, install the sky130 low-power standard cell library.
# If <path> is not specified, then the low-power standard cell
# library will be cloned from the git repository and installed.
#
# --enable-sc-hd-sky130[=<path>]
# If enabled, install the sky130 high-density standard cell library.
# If <path> is not specified, then the high-density standard cell
# library will be cloned from the git repository and installed.
#
# --enable-sc-hdll-sky130[=<path>]
# If enabled, install the sky130 high-density low-leakage standard
# cell library. If <path> is not specified, then the high-density
# low-leakage standard cell library will be cloned from the git
# repository and installed.
#
# --enable-sc-hvl-sky130[=<path>]
# If enabled, install the sky130 high-voltage standard cell library.
# If <path> is not specified, then the high-voltage standard cell
# library will be cloned from the git repository and installed.
#
# --enable-alpha-sky130[=<path>]
# If enabled, install the sky130_ml_xx_hd font library from
# Paul Schulz on github. If <path> is not specified, then the
# font library will be cloned from the git repository and
# installed.
#
# --enable-xschem-sky130[=<path>]
# If enabled, install the Sky130 setup for the xschem schematic
# editor. If <path> is specified, then the xschem setup is
# expected to be found rooted at the given path. If not
# specified, then the xschem setup will be cloned from the
# repository and installed.
#
# --enable-klayout-sky130[=<path>]
# If enabled, install the Sky130 setup for the klayout layout
# editor. If <path> is specified, then the klayout setup is
# expected to be found rooted at the given path. If not
# specified, then the klayout setup will be cloned from the
# repository and installed.
#
# External (third-party) libraries and tool setups are the following (disabled
# by default):
#
# --enable-sram-sky130[=<path>]
# If enabled, install the sky130_sram_macros library from
# efabless on github. If <path> is not specified, then
# the SRAM library will be cloned from the repository and
# installed.
#
# --enable-sram-space-sky130[=<path>]
# If enabled, install the sky130_fd_bd_sram library from
# google on github. If <path> is not specified, then the
# library will be cloned from the repository and installed.
#
# --enable-osu-t12-sky130[=<path>]
# If enabled, install the sky130_osu_sc_t12 libraries from
# foss-eda-tools on googlesource. If <path> is not
# specified, then the OSU standard cell library will be
# clones from the repository and installed.
#
# --enable-osu-t15-sky130[=<path>]
# If enabled, install the sky130_osu_sc_t15 libraries from
# foss-eda-tools on googlesource. If <path> is not
# specified, then the OSU standard cell library will be
# clones from the repository and installed.
#
# --enable-osu-t18-sky130[=<path>]
# If enabled, install the sky130_osu_sc_t18 libraries from
# foss-eda-tools on googlesource. If <path> is not
# specified, then the OSU standard cell library will be
# clones from the repository and installed.
#
# The variables below are substituted from the configuration options:
#
# EF_STYLE: 1 for efabless style, 0 otherwise
# LINK_TARGETS_A: If "source", link back to source when possible
# ENABLED_VARIANTS: If not "all", then compile/install only the specified variants
#
# Run "make" to stage the PDK for tool setup and vendor libraries
#
# Run "make install" to install all staged files.
#
# Run "make clean" to remove all staging files.
#
# Run "make veryclean" to remove all staging and make.log files.
#
# For the sake of simplicity, the "standard" installation can be done
# with the usual
#
# make
# make install
# make clean
#
#--------------------------------------------------------------------
# This Makefile contains bash-isms
SHELL := /bin/bash
export SHELL
# We use pipes to save output to files, without pipefail they will always be
# seen by make as having succeeded.
SHELLOPTS := pipefail
export SHELLOPTS
MV = mv
PATCH = patch
SED = @SED@
prefix = @prefix@
datarootdir = @datarootdir@
datadir = @datadir@
# Use git revision if this is a cloned repo; otherwise get the revision
# from the VERSION file in the directory above.
GITREV = $(shell git describe --long)
ifeq (${GITREV},)
REVISION = $(shell cat ../VERSION)
else
REVISION = ${GITREV}
endif
TECH = sky130
# The run-time environment uses PDKPATH to override the PDK location,
# so prevent that from happening during PDK install. This will also
# happen with PDK_ROOT, so avoid that as well.
unexport PDKPATH
unexport PDK_ROOT
# If EF_STYLE is set to 1, then efabless naming conventions are
# used, otherwise the generic naming conventions are used.
# Mainly, the hierarchy of library names and file types is reversed
# (e.g., sky130_fd_sc_hd/lef vs. lef/sky130_fd_sc_hd).
# EF_STYLE = 0 | 1
EF_STYLE = @EF_STYLE@
# Normally it's fine to keep the staging path in a local directory,
# although /tmp or a dedicated staging area are also fine, as long
# as the install process can write to the path.
STAGING_PATH = $(shell pwd)
SHARED_PDKS_PATH ?= $(datadir)/pdk
# If LINK_TARGETS is set to "none", then files are copied
# from the SkyWater sources to the target. If set to "source",
# symbolic links are made in the target directories pointing
# back to the SkyWater sources. If set to the name of another
# PDK (e.g, "sky130A"), then symbolic links are made to the
# same files in that PDK, where they exist, and are copied
# from source, where they don't.
#
# Behavior is to let the link targets for variant A follow the
# configuration option. Link targets for variant B will always
# be the files of variant A (which may end up being symbolic
# links to symbolic links if "source" was chosen for link-targets
# in the configuration).
# LINK_TARGETS = source | none | sky130A
LINK_TARGETS_A = @SKY130_LINK_TARGETS@
LINK_TARGETS_B = sky130A
# ENABLED_VARIANTS = all | A | B
ENABLED_VARIANTS = @SKY130_ENABLED_VARIANTS@
ifeq (${ENABLED_VARIANTS},)
VARIANTS += A B
else
ifeq (${ENABLED_VARIANTS}, all)
VARIANTS += A B
else
VARIANTS += ${ENABLED_VARIANTS}
endif
endif
# Paths:
# Path to SkyWater open PDK sources.
SKY130_PR_PATH = @SKY130_FD_PR_PATH@
SKY130_IO_PATH = @SKY130_FD_IO_PATH@
SKY130_SC_HD_PATH = @SKY130_FD_SC_HD_PATH@
SKY130_SC_HDLL_PATH = @SKY130_FD_SC_HDLL_PATH@
SKY130_SC_HVL_PATH = @SKY130_FD_SC_HVL_PATH@
SKY130_SC_HS_PATH = @SKY130_FD_SC_HS_PATH@
SKY130_SC_MS_PATH = @SKY130_FD_SC_MS_PATH@
SKY130_SC_LS_PATH = @SKY130_FD_SC_LS_PATH@
SKY130_SC_LP_PATH = @SKY130_FD_SC_LP_PATH@
# Path to independent library sources (to be added to configuration options).
ALPHA_PATH = @SKY130_ML_XX_HD_PATH@
XSCHEM_PATH = @XSCHEM_SKY130_PATH@
KLAYOUT_PATH = @KLAYOUT_SKY130_PATH@
PRECHECK_PATH = @PRECHECK_SKY130_PATH@
SRAM_PATH = @SKY130_SRAM_MACROS_PATH@
SRAM_SPACE_PATH = @SKY130_FD_BD_SRAM_PATH@
OSU_T12_PATH = @SKY130_OSU_T12_PATH@
OSU_T15_PATH = @SKY130_OSU_T15_PATH@
OSU_T18_PATH = @SKY130_OSU_T18_PATH@
USE_REFERENCE = @USE_REFERENCE@
ifeq (${USE_REFERENCE}, 1)
REFERENCE_JSON = ${TECH}.json
else
REFERENCE_JSON =
endif
EF_URL = https://github.com/efabless
GOOGLE_URL = https://foss-eda-tools.googlesource.com
# Names of library repositories
PDK_LIB_PR = ${EF_URL}/skywater-pdk-libs-sky130_fd_pr
PDK_LIB_IO = ${EF_URL}/skywater-pdk-libs-sky130_fd_io
PDK_LIB_SC_HD = ${EF_URL}/skywater-pdk-libs-sky130_fd_sc_hd
PDK_LIB_SC_HDLL = ${EF_URL}/skywater-pdk-libs-sky130_fd_sc_hdll
PDK_LIB_SC_LP = ${EF_URL}/skywater-pdk-libs-sky130_fd_sc_lp
PDK_LIB_SC_HS = ${EF_URL}/skywater-pdk-libs-sky130_fd_sc_hs
PDK_LIB_SC_MS = ${EF_URL}/skywater-pdk-libs-sky130_fd_sc_ms
PDK_LIB_SC_LS = ${EF_URL}/skywater-pdk-libs-sky130_fd_sc_ls
PDK_LIB_SC_HVL = ${EF_URL}/skywater-pdk-libs-sky130_fd_sc_hvl
ALPHA_URL = https://github.com/PaulSchulz/sky130_pschulz_xx_hd
XSCHEM_URL = https://github.com/StefanSchippers/xschem_sky130
KLAYOUT_URL = ${EF_URL}/sky130_klayout_pdk
PRECHECK_URL = ${EF_URL}/mpw_precheck
SRAM_URL = ${EF_URL}/sky130_sram_macros
SRAM_SPACE_URL = ${GOOGLE_URL}/skywater-pdk/libs/sky130_fd_bd_sram
OSU_T12_URL = ${GOOGLE_URL}/skywater-pdk/libs/sky130_osu_sc_t12
OSU_T15_URL = ${GOOGLE_URL}/skywater-pdk/libs/sky130_osu_sc_t15
OSU_T18_URL = ${GOOGLE_URL}/skywater-pdk/libs/sky130_osu_sc_t18
# NOTE: Install destination is the git repository of the technology platform.
# Once updated in git, the git project can be distributed to all hosts.
#
ifeq (${EF_STYLE}, 1)
CONFIG_DIR = .ef-config
REV_DIR = ${REVISION}
else
CONFIG_DIR = .config
REV_DIR = .
endif
# EF process nodes created from the master sources
SKY130A = sky130A
SKY130B = sky130B
DIST_LINK_TARGETS_A = ${LINK_TARGETS_A}
DIST_LINK_TARGETS_B = ${SHARED_PDKS_PATH}/${LINK_TARGETS_B}
# Basic definitions for each EF process node
SKY130A_DEFS = -DTECHNAME=sky130A -DREVISION=${REVISION}
SKY130B_DEFS = -DTECHNAME=sky130B -DREVISION=${REVISION}
# Module definitions for each process node
# (Note that MOS is default and therefore not used anywhere)
SKY130A_DEFS += -DMETAL5 -DMIM -DREDISTRIBUTION
SKY130B_DEFS += -DMETAL5 -DMIM -DREDISTRIBUTION
# NOTE: ReRAM support is what distinguishes variant B from variant A.
SKY130B_DEFS += -DRERAM
# Add staging path
SKY130A_DEFS += -DSTAGING_PATH=${STAGING_PATH}
SKY130B_DEFS += -DSTAGING_PATH=${STAGING_PATH}
# Get the timestamp of the open_pdks commit to use for stamping layouts.
OPEN_PDKS_TIMESTAMP = $(shell git log -1 --format="%ad" --date=raw | cut -d' ' -f1)
TIMESTAMP_OPT = -timestamp ${OPEN_PDKS_TIMESTAMP}
# Record commit numbers for the nodeinfo.json file
OPEN_PDKS_COMMIT = $(shell git rev-parse HEAD)
ifeq (${OPEN_PDKS_COMMIT},)
COMMIT_DEFS = -DOPEN_PDKS_COMMIT=${REVISION}
else
COMMIT_DEFS = -DOPEN_PDKS_COMMIT=${OPEN_PDKS_COMMIT}
endif
ifeq (${SKY130_PR_PATH},)
COMMIT_DEFS += -DFD_PR_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_PR_COMMIT=$(shell cd ${SKY130_PR_PATH} ; git rev-parse HEAD)
endif
ifeq (${SKY130_IO_PATH},)
COMMIT_DEFS += -DFD_IO_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_IO_COMMIT=$(shell cd ${SKY130_IO_PATH} ; git rev-parse HEAD)
endif
ifeq (${SKY130_SC_HS_PATH},)
COMMIT_DEFS += -DFD_SC_HS_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_HS_COMMIT=$(shell cd ${SKY130_SC_HS_PATH} ; git rev-parse HEAD)
endif
ifeq (${SKY130_SC_MS_PATH},)
COMMIT_DEFS += -DFD_SC_MS_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_MS_COMMIT=$(shell cd ${SKY130_SC_MS_PATH} ; git rev-parse HEAD)
endif
ifeq (${SKY130_SC_LS_PATH},)
COMMIT_DEFS += -DFD_SC_LS_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_LS_COMMIT=$(shell cd ${SKY130_SC_LS_PATH} ; git rev-parse HEAD)
endif
ifeq (${SKY130_SC_LP_PATH},)
COMMIT_DEFS += -DFD_SC_LP_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_LP_COMMIT=$(shell cd ${SKY130_SC_LP_PATH} ; git rev-parse HEAD)
endif
ifeq (${SKY130_SC_HD_PATH},)
COMMIT_DEFS += -DFD_SC_HD_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_HD_COMMIT=$(shell cd ${SKY130_SC_HD_PATH} ; git rev-parse HEAD)
endif
ifeq (${SKY130_SC_HDLL_PATH},)
COMMIT_DEFS += -DFD_SC_HDLL_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_HDLL_COMMIT=$(shell cd ${SKY130_SC_HDLL_PATH} ; git rev-parse HEAD)
endif
ifeq (${SKY130_SC_HVL_PATH},)
COMMIT_DEFS += -DFD_SC_HVL_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_HVL_COMMIT=$(shell cd ${SKY130_SC_HVL_PATH} ; git rev-parse HEAD)
endif
ifeq (${XSCHEM_PATH},)
COMMIT_DEFS += -DXSCHEM_COMMIT="unknown"
else
COMMIT_DEFS += -DXSCHEM_COMMIT=$(shell cd ${XSCHEM_PATH} ; git rev-parse HEAD)
endif
ifeq (${KLAYOUT_PATH},)
COMMIT_DEFS += -DKLAYOUT_COMMIT="unknown"
else
COMMIT_DEFS += -DKLAYOUT_COMMIT=$(shell cd ${KLAYOUT_PATH} ; git rev-parse HEAD)
endif
ifeq (${PRECHECK_PATH},)
COMMIT_DEFS += -DPRECHECK_COMMIT="unknown"
else
COMMIT_DEFS += -DPRECHECK_COMMIT=$(shell cd ${PRECHECK_PATH} ; git rev-parse HEAD)
endif
ifeq (${ALPHA_PATH},)
COMMIT_DEFS += -DALPHA_COMMIT="unknown"
else
COMMIT_DEFS += -DALPHA_COMMIT=$(shell cd ${ALPHA_PATH} ; git rev-parse HEAD)
endif
ifeq (${SRAM_PATH},)
COMMIT_DEFS += -DSRAM_COMMIT="unknown"
else
COMMIT_DEFS += -DSRAM_COMMIT=$(shell cd ${SRAM_PATH} ; git rev-parse HEAD)
endif
ifeq (${SRAM_SPACE_PATH},)
COMMIT_DEFS += -DSRAM_SPACE_COMMIT="unknown"
else
COMMIT_DEFS += -DSRAM_SPACE_COMMIT=$(shell cd ${SRAM_SPACE_PATH} ; git rev-parse HEAD)
endif
ifeq (${OSU_T12_PATH},)
COMMIT_DEFS += -DOSU_T12_COMMIT="unknown"
else
COMMIT_DEFS += -DOSU_T12_COMMIT=$(shell cd ${OSU_T12_PATH} ; git rev-parse HEAD)
endif
ifeq (${OSU_T15_PATH},)
COMMIT_DEFS += -DOSU_T15_COMMIT="unknown"
else
COMMIT_DEFS += -DOSU_T15_COMMIT=$(shell cd ${OSU_T15_PATH} ; git rev-parse HEAD)
endif
ifeq (${OSU_T18_PATH},)
COMMIT_DEFS += -DOSU_T18_COMMIT="unknown"
else
COMMIT_DEFS += -DOSU_T18_COMMIT=$(shell cd ${OSU_T18_PATH} ; git rev-parse HEAD)
endif
COMMIT_DEFS += -DMAGIC_COMMIT=$(shell magic -dnull -noconsole --commit)
COMMIT_DEFS += -DMAGIC_VERSION=$(shell magic -dnull -noconsole --version)
COMMIT_DEFS += -DOPEN_PDKS_VERSION=$(shell cat ../VERSION)
ifeq (${EF_STYLE}, 1)
EF_FORMAT = -ef_format
SKY130A_DEFS += -DEF_FORMAT
SKY130B_DEFS += -DEF_FORMAT
else
EF_FORMAT = -std_format
endif
MAGICTOP = libs.tech/magic
NETGENTOP = libs.tech/netgen
IRSIMTOP = libs.tech/irsim
QFLOWTOP = libs.tech/qflow
KLAYOUTTOP = libs.tech/klayout
OPENLANETOP = libs.tech/openlane
XSCHEMTOP = libs.tech/xschem
XCIRCUITTOP = libs.tech/xcircuit
NGSPICETOP = libs.tech/ngspice
ifeq (${EF_STYLE}, 1)
MAGICPATH = ${MAGICTOP}/${REVISION}
MAGICCURRENT = ${MAGICTOP}/current
else
MAGICPATH = ${MAGICTOP}
MAGICCURRENT = ${MAGICTOP}
endif
# Currently, netgen, qflow, irsim, and klayout do not use revisioning (needs to change!)
NETGENPATH = ${NETGENTOP}
IRSIMPATH = ${IRSIMTOP}
QFLOWPATH = ${QFLOWTOP}
KLAYOUTPATH = ${KLAYOUTTOP}
OPENLANEPATH = ${OPENLANETOP}
XSCHEMPATH = ${XSCHEMTOP}
XCIRCUITPATH = ${XCIRCUITTOP}
NGSPICEPATH = ${NGSPICETOP}
MAGICTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICTOP}
NETGENTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENTOP}
IRSIMTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${IRSIMTOP}
QFLOWTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWTOP}
KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTTOP}
OPENLANETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANETOP}
XSCHEMTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XSCHEMTOP}
XCIRCUITTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XCIRCUITTOP}
NGSPICETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NGSPICETOP}
MAGIC_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICPATH}
NETGEN_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENPATH}
IRSIM_STAGING_A = ${STAGING_PATH}/${SKY130A}/${IRSIMPATH}
QFLOW_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWPATH}
KLAYOUT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTPATH}
OPENLANE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANEPATH}
XSCHEM_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XSCHEMPATH}
XCIRCUIT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XCIRCUITPATH}
NGSPICE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NGSPICEPATH}
MAGICTOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${MAGICTOP}
NETGENTOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${NETGENTOP}
IRSIMTOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${IRSIMTOP}
QFLOWTOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${QFLOWTOP}
KLAYOUTTOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${KLAYOUTTOP}
OPENLANETOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${OPENLANETOP}
XSCHEMTOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${XSCHEMTOP}
XCIRCUITTOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${XCIRCUITTOP}
NGSPICETOP_STAGING_B = ${STAGING_PATH}/${SKY130B}/${NGSPICETOP}
MAGIC_STAGING_B = ${STAGING_PATH}/${SKY130B}/${MAGICPATH}
NETGEN_STAGING_B = ${STAGING_PATH}/${SKY130B}/${NETGENPATH}
IRSIM_STAGING_B = ${STAGING_PATH}/${SKY130B}/${IRSIMPATH}
QFLOW_STAGING_B = ${STAGING_PATH}/${SKY130B}/${QFLOWPATH}
KLAYOUT_STAGING_B = ${STAGING_PATH}/${SKY130B}/${KLAYOUTPATH}
OPENLANE_STAGING_B = ${STAGING_PATH}/${SKY130B}/${OPENLANEPATH}
XSCHEM_STAGING_B = ${STAGING_PATH}/${SKY130B}/${XSCHEMPATH}
XCIRCUIT_STAGING_B = ${STAGING_PATH}/${SKY130B}/${XCIRCUITPATH}
NGSPICE_STAGING_B = ${STAGING_PATH}/${SKY130B}/${NGSPICEPATH}
SKY130A_DEFS += -DMAGIC_CURRENT=${MAGICCURRENT}
SKY130B_DEFS += -DMAGIC_CURRENT=${MAGICCURRENT}
# Openlane has a number of files that are common to all digital
# standard cell libraries, so these are collected in one definition
# here:
OPENLANE_COMMON = config.tcl tracks.info no_synth.cells drc_exclude.cells
OPENLANE_COMMON += tribuff_map.v latch_map.v mux2_map.v mux4_map.v fa_map.v rca_map.v csa_map.v
# Corners defined in IRSIM parameter files (wild-carded)
IRSIM_CORNERS = `ls irsim/*.prm | cut -c14-`
# Where cpp syntax is followed, this is equivalent to cpp, but it does not
# mangle non-C source files under the belief that they are actually C code.
CPP = ../common/preproc.py
# The following script in the ../common directory does most of the work of
# copying or linking the foundry vendor files to the target directory.
STAGE = set -f ; ../common/foundry_install.py ${EF_FORMAT} ${TIMESTAMP_OPT}
ifneq ($(DESTDIR), )
INSTALL = ../common/staging_install.py -writeto $(DESTDIR) ${EF_FORMAT}
else
INSTALL = ../common/staging_install.py ${EF_FORMAT}
endif
# The script(s) below are used for custom changes to the vendor PDK files
ADDPROP = ../common/insert_property.py ${EF_FORMAT}
ADDLAYER = ../common/insert_layer.py ${EF_FORMAT}
# List the EDA tools to install local setup files for
TOOLS =
# KLAYOUT_DISABLED = 0 | 1
KLAYOUT_DISABLED = @KLAYOUT_DISABLED@
ifneq (${KLAYOUT_DISABLED}, 1)
TOOLS += klayout
endif
# OPENLANE_DISABLED = 0 | 1
OPENLANE_DISABLED = @OPENLANE_DISABLED@
ifneq (${OPENLANE_DISABLED}, 1)
TOOLS += openlane
endif
# QFLOW_DISABLED = 0 | 1
QFLOW_DISABLED = @QFLOW_DISABLED@
ifneq (${QFLOW_DISABLED}, 1)
TOOLS += qflow
endif
# MAGIC_DISABLED = 0 | 1
MAGIC_DISABLED = @MAGIC_DISABLED@
ifneq (${MAGIC_DISABLED}, 1)
TOOLS += magic
endif
# NETGEN_DISABLED = 0 | 1
NETGEN_DISABLED = @NETGEN_DISABLED@
ifneq (${NETGEN_DISABLED}, 1)
TOOLS += netgen
endif
# IRSIM_DISABLED = 0 | 1
IRSIM_DISABLED = @IRSIM_DISABLED@
ifneq (${IRSIM_DISABLED}, 1)
TOOLS += irsim
endif
# XSCHEM_DISABLED = 0 | 1
XSCHEM_DISABLED = @XSCHEM_DISABLED@
ifneq (${XSCHEM_DISABLED}, 1)
TOOLS += xschem
endif
# XCIRCUIT_DISABLED = 0 | 1
XCIRCUIT_DISABLED = @XCIRCUIT_DISABLED@
ifneq (${XCIRCUIT_DISABLED}, 1)
TOOLS += xcircuit
endif
# These definitions depend on the setting of EF_STYLE
ifeq (${EF_STYLE}, 1)
IO_VERILOG = verilog/sky130_fd_io
IO_GDS = gds/sky130_fd_io
HD_VERILOG = verilog/sky130_fd_sc_hd
HDLL_VERILOG = verilog/sky130_fd_sc_hdll
HVL_VERILOG = verilog/sky130_fd_sc_hvl
HS_VERILOG = verilog/sky130_fd_sc_hs
MS_VERILOG = verilog/sky130_fd_sc_ms
LS_VERILOG = verilog/sky130_fd_sc_ls
LP_VERILOG = verilog/sky130_fd_sc_lp
HD_TECHLEF = techLEF/sky130_fd_sc_hd
HDLL_TECHLEF = techLEF/sky130_fd_sc_hdll
MLXX_SCRIPTS = scripts/sky130_ml_xx_hd
PR_SPICE = spi/sky130_fd_pr
HVL_SPICE = spi/sky130_fd_sc_hvl
HD_SPICE = spi/sky130_fd_sc_hd
HVL_PATCH4 = 4b
HVL_CDL = cdl/sky130_fd_sc_hvl
SPIEXT = spi
else
IO_VERILOG = sky130_fd_io/verilog
IO_GDS = sky130_fd_io/gds
HD_VERILOG = sky130_fd_sc_hd/verilog
HDLL_VERILOG = sky130_fd_sc_hdll/verilog
HVL_VERILOG = sky130_fd_sc_hvl/verilog
HS_VERILOG = sky130_fd_sc_hs/verilog
MS_VERILOG = sky130_fd_sc_ms/verilog
LS_VERILOG = sky130_fd_sc_ls/verilog
LP_VERILOG = sky130_fd_sc_lp/verilog
HD_TECHLEF = sky130_fd_sc_hd/techlef
HDLL_TECHLEF = sky130_fd_sc_hdll/techlef
MLXX_SCRIPTS = sky130_ml_xx_hd/scripts
PR_SPICE = sky130_fd_pr/spice
HVL_SPICE = sky130_fd_sc_hvl/spice
HD_SPICE = sky130_fd_sc_hd/spice
HVL_PATCH4 = 4
HVL_CDL = sky130_fd_sc_hvl/cdl
SPIEXT = spice
endif
all: $(foreach var, ${VARIANTS}, all-$(var))
reference: ${TECH}.json
# Rewrite the ${TECH}.json file to change the commit values in
# "reference" to reflect the state of the system when "make
# reference" was run. This is then committed to the open_pdks
# repository to create a known reference configuration of all
# tools.
../common/save_commit_refs.py ${COMMIT_DEFS} ${TECH}.json
# Handle prerequisites (fetch and install the PDK and requested libraries)
prerequisites: pr-repo io-repo sc-hd-repo sc-hdll-repo sc-hvl-repo sc-hs-repo sc-ms-repo sc-ls-repo sc-lp-repo alpha-repo xschem-repo klayout-repo precheck-repo sram-repo sram-space-repo osu-t12-repo osu-t15-repo osu-t18-repo
pr-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_PR_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_pr | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_PR_PATH}" != "x" ; then \
if test -d "${SKY130_PR_PATH}" ; then \
echo "Using existing installation of primitive library from ${SKY130_PR_PATH}" ; \
else \
echo "Downloading primitive library from ${SKY130_PR_PATH}" ; \
../scripts/download.sh ${PDK_LIB_PR} ${SKY130_PR_PATH} $${FD_PR_COMMIT} ; \
fi ; \
fi
io-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_IO_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_io | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_IO_PATH}" != "x" ; then \
if test -d "${SKY130_IO_PATH}" ; then \
echo "Using existing installation of I/O library from ${SKY130_IO_PATH}" ; \
else \
echo "Downloading I/O library from ${SKY130_IO_PATH}" ; \
../scripts/download.sh ${PDK_LIB_IO} ${SKY130_IO_PATH} $${FD_IO_COMMIT} ; \
fi ; \
fi
sc-hs-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_SC_HS_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_sc_hs | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_SC_HS_PATH}" != "x" ; then \
if test -d "${SKY130_SC_HS_PATH}" ; then \
echo "Using existing installation of high-speed standard cell library from ${SKY130_SC_HS_PATH}" ; \
else \
echo "Downloading high-speed standard cell library from ${SKY130_SC_HS_PATH}" ; \
../scripts/download.sh ${PDK_LIB_SC_HS} ${SKY130_SC_HS_PATH} $${FD_SC_HS_COMMIT} ; \
fi ; \
fi
sc-ms-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_SC_MS_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_sc_ms | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_SC_MS_PATH}" != "x" ; then \
if test -d "${SKY130_SC_MS_PATH}" ; then \
echo "Using existing installation of medium-speed standard cell library from ${SKY130_SC_MS_PATH}" ; \
else \
echo "Downloading medium-speed standard cell library from ${SKY130_SC_MS_PATH}" ; \
../scripts/download.sh ${PDK_LIB_SC_MS} ${SKY130_SC_MS_PATH} $${FD_SC_MS_COMMIT} ; \
fi ; \
fi
sc-ls-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_SC_LS_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_sc_ls | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_SC_LS_PATH}" != "x" ; then \
if test -d "${SKY130_SC_LS_PATH}" ; then \
echo "Using existing installation of low-speed standard cell library from ${SKY130_SC_LS_PATH}" ; \
else \
echo "Downloading low-speed standard cell library from ${SKY130_SC_LS_PATH}" ; \
../scripts/download.sh ${PDK_LIB_SC_LS} ${SKY130_SC_LS_PATH} $${FD_SC_LS_COMMIT} ; \
fi ; \
fi
sc-lp-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_SC_LP_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_sc_lp | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_SC_LP_PATH}" != "x" ; then \
if test -d "${SKY130_SC_LP_PATH}" ; then \
echo "Using existing installation of low-power standard cell library from ${SKY130_SC_LP_PATH}" ; \
else \
echo "Downloading low-power standard cell library from ${SKY130_SC_LP_PATH}" ; \
../scripts/download.sh ${PDK_LIB_SC_LP} ${SKY130_SC_LP_PATH} $${FD_SC_LP_COMMIT} ; \
fi ; \
fi
sc-hd-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_SC_HD_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_sc_hd | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_SC_HD_PATH}" != "x" ; then \
if test -d "${SKY130_SC_HD_PATH}" ; then \
echo "Using existing installation of high-density standard cell library from ${SKY130_SC_HD_PATH}" ; \
else \
echo "Downloading high-density standard cell library from ${SKY130_SC_HD_PATH}" ; \
../scripts/download.sh ${PDK_LIB_SC_HD} ${SKY130_SC_HD_PATH} $${FD_SC_HD_COMMIT} ; \
fi ; \
fi
sc-hdll-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_SC_HDLL_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_sc_hdll | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_SC_HDLL_PATH}" != "x" ; then \
if test -d "${SKY130_SC_HDLL_PATH}" ; then \
echo "Using existing installation of high-density low-leakage standard cell library from ${SKY130_SC_HDLL_PATH}" ; \
else \
echo "Downloading high-density low-leakage standard cell library from ${SKY130_SC_HDLL_PATH}" ; \
../scripts/download.sh ${PDK_LIB_SC_HDLL} ${SKY130_SC_HDLL_PATH} $${FD_SC_HDLL_COMMIT} ; \
fi ; \
fi
sc-hvl-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
FD_SC_HVL_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_sc_hvl | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SKY130_SC_HVL_PATH}" != "x" ; then \
if test -d "${SKY130_SC_HVL_PATH}" ; then \
echo "Using existing installation of high-voltage standard cell library from ${SKY130_SC_HVL_PATH}" ; \
else \
echo "Downloading high-voltage standard cell library from ${SKY130_SC_HVL_PATH}" ; \
../scripts/download.sh ${PDK_LIB_SC_HVL} ${SKY130_SC_HVL_PATH} $${FD_SC_HVL_COMMIT} ; \
fi ; \
fi
alpha-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
ALPHA_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_ml_xx_hd | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${ALPHA_PATH}" != "x" ; then \
if test -d "${ALPHA_PATH}" ; then \
echo "Using existing installation of alphanumeric library from ${ALPHA_PATH}" ; \
else \
echo "Downloading alphanumeric library from ${ALPHA_URL}" ; \
../scripts/download.sh ${ALPHA_URL} ${ALPHA_PATH} ${ALPHA_COMMIT} ; \
fi ; \
fi
sram-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
SRAM_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_sram_macros | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SRAM_PATH}" != "x" ; then \
if test -d "${SRAM_PATH}" ; then \
echo "Using existing installation of SRAM macro library from ${SRAM_PATH}" ; \
else \
echo "Downloading SRAM macro library from ${SRAM_URL}" ; \
../scripts/download.sh ${SRAM_URL} ${SRAM_PATH} ${SRAM_COMMIT}; \
fi ; \
fi
sram-space-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
SRAM_SPACE_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_fd_bd_sram | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${SRAM_SPACE_PATH}" != "x" ; then \
if test -d "${SRAM_SPACE_PATH}" ; then \
echo "Using existing installation of SRAM build-space library from ${SRAM_SPACE_PATH}" ; \
else \
echo "Downloading SRAM build-space library from ${SRAM_SPACE_URL}" ; \
../scripts/download.sh ${SRAM_SPACE_URL} ${SRAM_SPACE_PATH} ${SRAM_SPACE_COMMIT} ; \
fi ; \
fi
xschem-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
XSCHEM_COMMIT=`cat ${REFERENCE_JSON} | grep xschem_sky130 | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${XSCHEM_PATH}" != "x" ; then \
if test -d "${XSCHEM_PATH}" ; then \
echo "Using existing installation of xschem setup from ${XSCHEM_PATH}" ; \
else \
echo "Downloading xschem setup from ${XSCHEM_URL}" ; \
../scripts/download.sh ${XSCHEM_URL} ${XSCHEM_PATH} ${XSCHEM_COMMIT} ; \
fi ; \
fi
klayout-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
KLAYOUT_COMMIT=`cat ${REFERENCE_JSON} | grep klayout_sky130 | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${KLAYOUT_PATH}" != "x" ; then \
if test -d "${KLAYOUT_PATH}" ; then \
echo "Using existing installation of klayout setup from ${KLAYOUT_PATH}" ; \
else \
echo "Downloading klayout setup from ${KLAYOUT_URL}" ; \
../scripts/download.sh ${KLAYOUT_URL} ${KLAYOUT_PATH} ${KLAYOUT_COMMIT} ; \
fi ; \
fi
precheck-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
PRECHECK_COMMIT=`cat ${REFERENCE_JSON} | grep precheck_sky130 | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${PRECHECK_PATH}" != "x" ; then \
if test -d "${PRECHECK_PATH}" ; then \
echo "Using existing installation of klayout setup from ${PRECHECK_PATH}" ; \
else \
echo "Downloading klayout setup from ${PRECHECK_URL}" ; \
../scripts/download.sh ${PRECHECK_URL} ${PRECHECK_PATH} ${PRECHECK_COMMIT} ; \
fi ; \
fi
osu-t12-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
OSU_T12_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_osu_sc_t12 | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${OSU_T12_PATH}" != "x" ; then \
if test -d "${OSU_T12_PATH}" ; then \
echo "Using existing installation of OSU T12 standard cell library from ${OSU_T12_PATH}" ; \
else \
echo "Downloading OSU standard T12 cell library from ${OSU_T12_URL}" ; \
../scripts/download.sh ${OSU_T12_URL} ${OSU_T12_PATH} ${OSU_T12_COMMIT} ; \
fi ; \
fi
osu-t15-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
OSU_T15_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_osu_sc_t15 | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${OSU_T15_PATH}" != "x" ; then \
if test -d "${OSU_T15_PATH}" ; then \
echo "Using existing installation of OSU T15 standard cell library from ${OSU_T15_PATH}" ; \
else \
echo "Downloading OSU standard T15 cell library from ${OSU_T15_URL}" ; \
../scripts/download.sh ${OSU_T15_URL} ${OSU_T15_PATH} ${OSU_T15_COMMIT} ; \
fi ; \
fi
osu-t18-repo:
if test "x${REFERENCE_JSON}" != "x"; then \
OSU_T18_COMMIT=`cat ${REFERENCE_JSON} | grep sky130_osu_sc_t18 | grep -v COMMIT | cut -d'"' -f4` ; \
fi
if test "x${OSU_T18_PATH}" != "x" ; then \
if test -d "${OSU_T18_PATH}" ; then \
echo "Using existing installation of OSU T18 standard cell library from ${OSU_T18_PATH}" ; \
else \
echo "Downloading OSU standard T18 cell library from ${OSU_T18_URL}" ; \
../scripts/download.sh ${OSU_T18_URL} ${OSU_T18_PATH} ${OSU_T18_COMMIT} ; \
fi ; \
fi
# Update prerequisites
update: update-pr-repo update-io-repo update-sc-hs-repo update-sc-ms-repo update-sc-ls-repo update-sc-lp-repo update-sc-hd-repo update-sc-hdll-repo update-sc-hvl-repo update-alpha-repo update-xschem-repo update-klayout-repo update-precheck-repo update-sram-repo update-sram-space-repo update-osu-t12-repo update-osu-t15-repo update-osu-t18-repo
update-pr-repo:
if test "x${SKY130_PR_PATH}" != "x" ; then \
echo "Updating Sky130 primitive library from ${PDK_LIB_PR}" ; \
../scripts/update.sh ${SKY130_PR_PATH} ; \
fi
update-io-repo:
if test "x${SKY130_IO_PATH}" != "x" ; then \
echo "Updating Sky130 I/O library from ${PDK_LIB_IO}" ; \
../scripts/update.sh ${SKY130_IO_PATH} ; \
fi
update-sc-hs-repo:
if test "x${SKY130_SC_HS_PATH}" != "x" ; then \
echo "Updating Sky130 high-speed standard cell library from ${PDK_LIB_SC_HS}" ; \
../scripts/update.sh ${SKY130_SC_HS_PATH} ; \
fi
update-sc-ms-repo:
if test "x${SKY130_SC_MS_PATH}" != "x" ; then \
echo "Updating Sky130 medium-speed standard cell library from ${PDK_LIB_SC_MS}" ; \
../scripts/update.sh ${SKY130_SC_MS_PATH} ; \
fi
update-sc-ls-repo:
if test "x${SKY130_SC_LS_PATH}" != "x" ; then \
echo "Updating Sky130 low-speed standard cell library from ${PDK_LIB_SC_LS}" ; \
../scripts/update.sh ${SKY130_SC_LS_PATH} ; \
fi
update-sc-lp-repo:
if test "x${SKY130_SC_LP_PATH}" != "x" ; then \
echo "Updating Sky130 low-power standard cell library from ${PDK_LIB_SC_LP}" ; \
../scripts/update.sh ${SKY130_SC_LP_PATH} ; \
fi
update-sc-hd-repo:
if test "x${SKY130_SC_HD_PATH}" != "x" ; then \
echo "Updating Sky130 high-density standard cell library from ${PDK_LIB_SC_HD}" ; \
../scripts/update.sh ${SKY130_SC_HD_PATH} ; \
fi
update-sc-hdll-repo:
if test "x${SKY130_SC_HDLL_PATH}" != "x" ; then \
echo "Updating Sky130 high-density low-leakage standard cell library from ${PDK_LIB_SC_HDLL}" ; \
../scripts/update.sh ${SKY130_SC_HDLL_PATH} ; \
fi
update-sc-hvl-repo:
if test "x${SKY130_SC_HVL_PATH}" != "x" ; then \
echo "Updating Sky130 high-voltage standard cell library from ${PDK_LIB_SC_HVL}" ; \
../scripts/update.sh ${SKY130_SC_HVL_PATH} ; \
fi
update-alpha-repo:
if test "x${ALPHA_PATH}" != "x" ; then \
echo "Updating alphanumeric library from ${ALPHA_URL}" ; \
../scripts/update.sh ${ALPHA_PATH} ; \
fi
update-sram-repo:
if test "x${SRAM_PATH}" != "x" ; then \
echo "Updating SRAM macro library from ${SRAM_URL}" ; \
../scripts/update.sh ${SRAM_PATH} ; \
fi
update-sram-space-repo:
if test "x${SRAM_SPACE_PATH}" != "x" ; then \
echo "Updating SRAM build-space library from ${SRAM_SPACE_URL}" ; \
../scripts/update.sh ${SRAM_SPACE_PATH} ; \
fi
update-xschem-repo:
if test "x${XSCHEM_PATH}" != "x" ; then \
echo "Updating xschem setup from ${XSCHEM_URL}" ; \
../scripts/update.sh ${XSCHEM_PATH} ; \
fi
update-klayout-repo:
if test "x${KLAYOUT_PATH}" != "x" ; then \
echo "Updating klayout setup from ${KLAYOUT_URL}" ; \
../scripts/update.sh ${KLAYOUT_PATH} ; \
fi
update-precheck-repo:
if test "x${PRECHECK_PATH}" != "x" ; then \
echo "Updating klayout setup from ${PRECHECK_URL}" ; \
../scripts/update.sh ${PRECHECK_PATH} ; \
fi
update-osu-t12-repo:
if test "x${OSU_T12_PATH}" != "x" ; then \
echo "Updating OSU standard T12 cell library from ${OSU_T12_URL}" ; \
../scripts/update.sh ${OSU_T12_PATH} ; \
fi
update-osu-t15-repo:
if test "x${OSU_T15_PATH}" != "x" ; then \
echo "Updating OSU standard T15 cell library from ${OSU_T15_URL}" ; \
../scripts/update.sh ${OSU_T15_PATH} ; \
fi
update-osu-t18-repo:
if test "x${OSU_T18_PATH}" != "x" ; then \
echo "Updating OSU standard T18 cell library from ${OSU_T18_URL}" ; \
../scripts/update.sh ${OSU_T18_PATH} ; \
fi
all-%: prerequisites
echo "Starting sky130$* PDK staging on "`date` > ${SKY130$*}_make.log
${MAKE} general-$*
${MAKE} tools-$*
${MAKE} vendor-$*
echo "Ended sky130$* PDK staging on "`date` >> ${SKY130$*}_make.log
general-%: ${TECH}.json
mkdir -p ${STAGING_PATH}/${SKY130$*}/${CONFIG_DIR}
rm -f ${STAGING_PATH}/${SKY130$*}/${CONFIG_DIR}/nodeinfo.json
${CPP} ${SKY130$*_DEFS} ${COMMIT_DEFS} ${TECH}.json \
${STAGING_PATH}/${SKY130$*}/${CONFIG_DIR}/nodeinfo.json
tools-A: $(addsuffix -A, $(TOOLS))
tools-B: $(addsuffix -B, $(TOOLS))
magic-%: magic/${TECH}.tech magic/${TECH}gds.tech magic/${TECH}.magicrc magic/${TECH}.tcl
mkdir -p ${MAGICTOP_STAGING_$*}
mkdir -p ${MAGIC_STAGING_$*}
rm -f ${MAGICTOP_STAGING_$*}/current
rm -f ${MAGIC_STAGING_$*}/${SKY130$*}.tech
rm -f ${MAGIC_STAGING_$*}/${SKY130$*}-GDS.tech
rm -f ${MAGIC_STAGING_$*}/${SKY130$*}.tcl
rm -f ${MAGIC_STAGING_$*}/${SKY130$*}-BindKeys
rm -f ${MAGIC_STAGING_$*}/magicrc
if test "${EF_STYLE}" == "1" ; then \
(cd ${MAGICTOP_STAGING_$*} ; ln -s ${REV_DIR} current) ; \
fi
cp -rp custom/scripts/seal_ring_generator ${MAGIC_STAGING_$*}/.
cp -rp custom/scripts/bump_bond_generator ${MAGIC_STAGING_$*}/.
cp custom/scripts/run_standard_drc.py ${MAGIC_STAGING_$*}/.
${CPP} ${SKY130$*_DEFS} custom/scripts/generate_fill.py \
${MAGIC_STAGING_$*}/generate_fill.py
${CPP} ${SKY130$*_DEFS} custom/scripts/check_density.py \
${MAGIC_STAGING_$*}/check_density.py
${CPP} ${SKY130$*_DEFS} custom/scripts/check_antenna.py \
${MAGIC_STAGING_$*}/check_antenna.py
${CPP} ${SKY130$*_DEFS} magic/${TECH}.tech ${MAGIC_STAGING_$*}/${SKY130$*}.tech
${CPP} ${SKY130$*_DEFS} magic/${TECH}gds.tech ${MAGIC_STAGING_$*}/${SKY130$*}-GDS.tech
${CPP} ${SKY130$*_DEFS} magic/${TECH}.magicrc ${MAGIC_STAGING_$*}/${SKY130$*}.magicrc
${CPP} ${SKY130$*_DEFS} ../common/pdk.bindkeys ${MAGIC_STAGING_$*}/${SKY130$*}-BindKeys
${CPP} ${SKY130$*_DEFS} magic/${TECH}.tcl ${MAGIC_STAGING_$*}/${SKY130$*}.tcl
${CPP} ${SKY130$*_DEFS} ../common/pdk.tcl >> ${MAGIC_STAGING_$*}/${SKY130$*}.tcl
qflow-%: qflow/${TECH}.sh qflow/${TECH}.par
mkdir -p ${QFLOWTOP_STAGING_$*}
mkdir -p ${QFLOW_STAGING_$*}
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_hd.sh
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_hd.par
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_hdll.sh
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_hdll.par
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_hs.sh
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_hs.par
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_hvl.sh
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_hvl.par
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_ls.sh
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_ls.par
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_lp.sh
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_lp.par
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_ms.sh
rm -f ${QFLOW_STAGING_$*}/sky130_fd_sc_ms.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_12t_ls.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_12t_ls.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_12t_ms.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_12t_ms.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_12t_hs.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_12t_hs.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_15t_ls.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_15t_ls.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_15t_ms.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_15t_ms.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_15t_hs.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_15t_hs.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_18t_ls.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_18t_ls.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_18t_ms.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_18t_ms.par
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_18t_hs.sh
rm -f ${QFLOW_STAGING_$*}/sky130_osu_sc_18t_hs.par
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_fd_sc_hd -DVOLTAGE=1v95 \
qflow/${TECH}.sh ${QFLOW_STAGING_$*}/sky130_fd_sc_hd.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_fd_sc_hdll -DVOLTAGE=1v95 \
qflow/${TECH}.sh ${QFLOW_STAGING_$*}/sky130_fd_sc_hdll.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_fd_sc_hvl -DVOLTAGE=4v95 \
qflow/${TECH}.sh ${QFLOW_STAGING_$*}/sky130_fd_sc_hvl.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_fd_sc_hs -DVOLTAGE=1v95 \
qflow/${TECH}.sh ${QFLOW_STAGING_$*}/sky130_fd_sc_hs.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_fd_sc_lp -DVOLTAGE=1v95 \
qflow/${TECH}.sh ${QFLOW_STAGING_$*}/sky130_fd_sc_lp.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_fd_sc_ls -DVOLTAGE=1v95 \
qflow/${TECH}.sh ${QFLOW_STAGING_$*}/sky130_fd_sc_ls.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_fd_sc_ms -DVOLTAGE=1v95 \
qflow/${TECH}.sh ${QFLOW_STAGING_$*}/sky130_fd_sc_ms.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_12t_ls qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_12t_ls.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_12t_ms qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_12t_ms.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_12t_hs qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_12t_hs.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_15t_ls qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_15t_ls.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_15t_ms qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_15t_ms.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_15t_hs qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_15t_hs.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_18t_ls qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_18t_ls.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_18t_ms qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_18t_ms.sh
${CPP} ${SKY130$*_DEFS} -DLIBRARY=sky130_osu_sc_18t_hs qflow/sky130osu.sh \
${QFLOW_STAGING_$*}/sky130_osu_sc_18t_hs.sh
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_$*}/sky130_fd_sc_hd.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_$*}/sky130_fd_sc_hdll.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_$*}/sky130_fd_sc_hvl.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_$*}/sky130_fd_sc_hs.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_$*}/sky130_fd_sc_ms.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_$*}/sky130_fd_sc_lp.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_$*}/sky130_fd_sc_ls.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_12t_ls.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_12t_ms.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_12t_hs.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_15t_ls.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_15t_ms.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_15t_hs.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_18t_ls.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_18t_ms.par
${CPP} ${SKY130$*_DEFS} qflow/${TECH}.par \
${QFLOW_STAGING_$*}/sky130_osu_sc_18t_hs.par
netgen-%: netgen/${TECH}_setup.tcl
mkdir -p ${NETGENTOP_STAGING_$*}
mkdir -p ${NETGEN_STAGING_$*}
rm -f ${NETGEN_STAGING_$*}/${SKY130$*}_setup.tcl
rm -f ${NETGEN_STAGING_$*}/setup.tcl
${CPP} ${SKY130$*_DEFS} netgen/${TECH}_setup.tcl \
${NETGEN_STAGING_$*}/${SKY130$*}_setup.tcl
(cd ${NETGEN_STAGING_$*} ; ln -s ${SKY130$*}_setup.tcl setup.tcl)
irsim-%: irsim
mkdir -p ${IRSIMTOP_STAGING_$*}
mkdir -p ${IRSIM_STAGING_$*}
rm -f ${IRSIM_STAGING_$*}/${SKY130$*}_*.prm
for corner in ${IRSIM_CORNERS} ; do \
cat irsim/header.txt irsim/sky130_$$corner > \
${IRSIM_STAGING_$*}/${SKY130$*}_$$corner ; \
done
xcircuit-%: xcircuit/${TECH}.xcircuitrc
rm -rf ${XCIRCUIT_STAGING_$*}
mkdir -p ${XCIRCUITTOP_STAGING_$*}
mkdir -p ${XCIRCUIT_STAGING_$*}
rm -f ${XCIRCUIT_STAGING_$*}/*.lps
rm -f ${XCIRCUIT_STAGING_$*}/${SKY130$*}.xcircuitrc
${CPP} ${SKY130$*_DEFS} xcircuit/ngspice.lps ${XCIRCUIT_STAGING_$*}/ngspice.lps
${CPP} ${SKY130$*_DEFS} xcircuit/sky130_fd_pr.lps \
${XCIRCUIT_STAGING_$*}/sky130_fd_pr.lps
${CPP} ${SKY130$*_DEFS} -DHD_SPICE=${HD_SPICE} -DSPIEXT=${SPIEXT} \
xcircuit/sky130_fd_sc_hd.lps ${XCIRCUIT_STAGING_$*}/sky130_fd_sc_hd.lps
${CPP} ${SKY130$*_DEFS} xcircuit/${TECH}.xcircuitrc \
${XCIRCUIT_STAGING_$*}/${SKY130$*}.xcircuitrc
klayout-%: ${KLAYOUT_PATH}
if test "x${KLAYOUT_PATH}" != "x" ; then \
rm -rf ${KLAYOUT_STAGING_$*} ; \
mkdir -p ${KLAYOUT_STAGING_$*} ; \
mkdir -p ${KLAYOUT_STAGING_$*}/tech ; \
mkdir -p ${KLAYOUT_STAGING_$*}/drc ; \
mkdir -p ${KLAYOUT_STAGING_$*}/lvs ; \
mkdir -p ${KLAYOUT_STAGING_$*}/scripts ; \
mkdir -p ${KLAYOUT_STAGING_$*}/pymacros ; \
fi
# Copy lvs and pymacro directories from the repository. Other files
# are rearranged to the preferred structure. Do not recursively copy
# the lvs/ directory, as the subdirectory testing/ is huge and
# nonessential.
if test "x${KLAYOUT_PATH}" != "x" ; then \
cp -p ${KLAYOUT_PATH}/sky130_tech/tech/sky130/lvs/* ${KLAYOUT_STAGING_$*}/lvs/ ; \
cp -rp ${KLAYOUT_PATH}/sky130_tech/tech/sky130/pymacros/* ${KLAYOUT_STAGING_$*}/pymacros/ ; \
cp ${KLAYOUT_PATH}/sky130_tech/tech/sky130/${TECH}.lyp ${KLAYOUT_STAGING_$*}/tech/${SKY130$*}.lyp ; \
cp ${KLAYOUT_PATH}/sky130_tech/tech/sky130/${TECH}.lyt ${KLAYOUT_STAGING_$*}/tech/${SKY130$*}.lyt ; \
cp ${KLAYOUT_PATH}/sky130_tech/tech/sky130/${TECH}.map ${KLAYOUT_STAGING_$*}/tech/${SKY130$*}.map ; \
fi
# Copy original DRC deck from open_pdks (is this useful?)
cp klayout/sky130.lydrc ${KLAYOUT_STAGING_$*}/drc/${SKY130$*}.lydrc
# Copy drc directory contents from the Efabless Open MPW precheck repository
if test "x${PRECHECK_PATH}" != "x" ; then \
cp ${PRECHECK_PATH}/checks/tech-files/sky130A_mr.drc ${KLAYOUT_STAGING_$*}/drc/${SKY130$*}_mr.drc ; \
cp -rp ${PRECHECK_PATH}/checks/drc_checks/klayout/* ${KLAYOUT_STAGING_$*}/drc/ ; \
fi
xschem-%: ${XSCHEM_PATH}
if test "x${XSCHEM_PATH}" != "x" ; then \
rm -rf ${XSCHEM_STAGING_$*} ; \
mkdir -p ${XSCHEMTOP_STAGING_$*} ; \
mkdir -p ${XSCHEM_STAGING_$*} ; \
fi
# Copy the xschem repository (other than .git, if it exists)
# then remove the larger of the two example directories
if test "x${XSCHEM_PATH}" != "x" ; then \
cp -rp ${XSCHEM_PATH}/* ${XSCHEM_STAGING_$*} ; \
rm -rf ${XSCHEM_STAGING_$*}/decred_hash_macro ; \
fi
# xschem setup is for sky130A. Fix for the given target variant.
# Add custom additions to the startup file for open_pdk.
if test "x${XSCHEM_PATH}" != "x" ; then \
cat ${XSCHEM_PATH}/xschemrc | \
${SED} -e "/sky130A/s#sky130A#TECHNAME#" \
> ${XSCHEM_STAGING_$*}/xschemrc_source ; \
${CPP} ${SKY130$*_DEFS} ${XSCHEM_STAGING_$*}/xschemrc_source \
${XSCHEM_STAGING_$*}/xschemrc ; \
cat ${XSCHEM_PATH}/xschem_verilog_import/xschemrc | \
${SED} -e "/sky130A/s#sky130A#TECHNAME#" \
> ${XSCHEM_STAGING_$*}/xschemrc_source ; \
${CPP} ${SKY130$*_DEFS} ${XSCHEM_STAGING_$*}/xschemrc_source \
${XSCHEM_STAGING_$*}/xschem_verilog_import/xschemrc ; \
rm -f ${XSCHEM_STAGING_$*}/xschemrc_source ; \
cat ./custom/xschem/xschemrc_append >> ${XSCHEM_STAGING_$*}/xschemrc ; \
fi
# In the sky130A variant, remove the reram schematic/symbol and references
if test "x${XSCHEM_PATH}" != "x" ; then \
if test "x$*" == "xA" ; then \
rm -f ${XSCHEM_STAGING_$*}/sky130_tests/test_reram* ; \
rm -f ${XSCHEM_STAGING_$*}/sky130_tests/tb_reram* ; \
rm -f ${XSCHEM_STAGING_$*}/sky130_fd_pr/reram* ; \
cat ${XSCHEM_STAGING_$*}/sky130_tests/top.sch | \
${SED} -e "/^C.*{.*reram.*}.*{.*[^}] *$$/,/.*} *$$/d" \
-e "/^C.*{.*reram.*}.*{.*} *$$/d" \
> ${XSCHEM_STAGING_$*}/temp ; \
mv ${XSCHEM_STAGING_$*}/temp ${XSCHEM_STAGING_$*}/sky130_tests/top.sch ; \
fi ; \
fi
openlane-%: openlane/config.tcl openlane/sky130_fd_sc_hd/config.tcl openlane/sky130_fd_sc_hs/config.tcl openlane/sky130_fd_sc_ms/config.tcl openlane/sky130_fd_sc_ls/config.tcl openlane/sky130_fd_sc_hdll/config.tcl openlane/sky130_osu_sc_t18/config.tcl
mkdir -p ${OPENLANETOP_STAGING_$*}
mkdir -p ${OPENLANE_STAGING_$*}
rm -rf ${OPENLANE_STAGING_$*}/custom_cells/*
mkdir -p ${OPENLANE_STAGING_$*}/sky130_fd_sc_hd
mkdir -p ${OPENLANE_STAGING_$*}/sky130_fd_sc_hs
mkdir -p ${OPENLANE_STAGING_$*}/sky130_fd_sc_ls
mkdir -p ${OPENLANE_STAGING_$*}/sky130_fd_sc_ms
mkdir -p ${OPENLANE_STAGING_$*}/sky130_fd_sc_hdll
mkdir -p ${OPENLANE_STAGING_$*}/sky130_fd_sc_hvl
mkdir -p ${OPENLANE_STAGING_$*}/sky130_osu_sc_t18
rm -f ${OPENLANE_STAGING_$*}/common_pdn.info
rm -f ${OPENLANE_STAGING_$*}/config.tcl
for file in ${OPENLANE_COMMON} ; do \
rm -f ${OPENLANE_STAGING_$*}/sky130_fd_sc_hd/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
rm -f ${OPENLANE_STAGING_$*}/sky130_fd_sc_hs/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
rm -f ${OPENLANE_STAGING_$*}/sky130_fd_sc_hdll/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
rm -f ${OPENLANE_STAGING_$*}/sky130_fd_sc_ls/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
rm -f ${OPENLANE_STAGING_$*}/sky130_fd_sc_ms/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
rm -f ${OPENLANE_STAGING_$*}/sky130_fd_sc_hvl/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
rm -f ${OPENLANE_STAGING_$*}/sky130_osu_sc_t18/$$file ; \
done
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.min.magic
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.nom.magic
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.max.magic
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.min.spef_extractor
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.nom.spef_extractor
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.max.spef_extractor
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.min.calibre
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.nom.calibre
rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.max.calibre
cp -r openlane/custom_cells ${OPENLANE_STAGING_$*}
cp -r openlane/cvc ${OPENLANE_STAGING_$*}
${CPP} ${SKY130$*_DEFS} openlane/config.tcl ${OPENLANE_STAGING_$*}/config.tcl
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.min.magic \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.min.magic
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.nom.magic \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.nom.magic
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.max.magic \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.max.magic
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.min.spef_extractor \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.min.spef_extractor
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.nom.spef_extractor \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.nom.spef_extractor
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.max.spef_extractor \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.max.spef_extractor
# Only install the calibre-derived rule files if they exist in the source
if test -f openlane/rules.openrcx.sky130$*.min.calibre ; then \
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.min.calibre \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.min.calibre ;\
fi
if test -f openlane/rules.openrcx.sky130$*.nom.calibre ; then \
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.nom.calibre \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.nom.calibre ;\
fi
if test -f openlane/rules.openrcx.sky130$*.max.calibre ; then \
${CPP} ${SKY130$*_DEFS} openlane/rules.openrcx.sky130$*.max.calibre \
${OPENLANE_STAGING_$*}/rules.openrcx.sky130$*.max.calibre ;\
fi
for file in ${OPENLANE_COMMON} ; do \
${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_fd_sc_hd/$$file \
${OPENLANE_STAGING_$*}/sky130_fd_sc_hd/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_fd_sc_hs/$$file \
${OPENLANE_STAGING_$*}/sky130_fd_sc_hs/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_fd_sc_ms/$$file \
${OPENLANE_STAGING_$*}/sky130_fd_sc_ms/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_fd_sc_ls/$$file \
${OPENLANE_STAGING_$*}/sky130_fd_sc_ls/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_fd_sc_hdll/$$file \
${OPENLANE_STAGING_$*}/sky130_fd_sc_hdll/$$file ; \
done
for file in ${OPENLANE_COMMON} ; do \
${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_fd_sc_hvl/$$file \
${OPENLANE_STAGING_$*}/sky130_fd_sc_hvl/$$file ; \
done
${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_osu_sc_t18/config.tcl \
${OPENLANE_STAGING_$*}/sky130_osu_sc_t18/config.tcl
${CPP} -quiet ${SKY130$*_DEFS} openlane/sky130_osu_sc_t18/tracks.info \
${OPENLANE_STAGING_$*}/sky130_osu_sc_t18/tracks.info
vendor-A: primitive-build-A io-build-A sram-build-A sram-space-build-A digital-hd-build-A digital-hvl-build-A digital-hdll-build-A digital-lp-build-A digital-hs-build-A digital-ms-build-A digital-ls-build-A alpha-build-A osu-t12-build-A osu-t15-build-A osu-t18-build-A
vendor-B: primitive-build-B io-build-B sram-build-B sram-space-build-B digital-hd-build-B digital-hvl-build-B digital-hdll-build-B digital-lp-build-B digital-hs-build-B digital-ms-build-B digital-ls-build-B alpha-build-B osu-t12-build-B osu-t15-build-B osu-t18-build-B
primitive-build-%:
if test "x${SKY130_PR_PATH}" != "x" ; then \
if test -d ${SKY130_PR_PATH} ; then \
echo "Building primitives library and simulation models" ; \
make primitive-$*; \
fi ; \
fi
io-build-%:
if test "x${SKY130_IO_PATH}" != "x" ; then \
if test -d ${SKY130_IO_PATH} ; then \
echo "Building padframe I/O libraries" ; \
make io-$* ; \
fi ; \
fi
digital-hd-build-%:
if test "x${SKY130_SC_HD_PATH}" != "x" ; then \
if test -d ${SKY130_SC_HD_PATH} ; then \
echo "Building digital high-density standard cell library" ; \
make digital-hd-$* ; \
fi ; \
fi
digital-hvl-build-%:
if test "x${SKY130_SC_HVL_PATH}" != "x" ; then \
if test -d ${SKY130_SC_HVL_PATH} ; then \
echo "Building digital high-voltage standard cell library" ; \
make digital-hvl-$* ; \
fi ; \
fi
digital-hdll-build-%:
if test "x${SKY130_SC_HDLL_PATH}" != "x" ; then \
if test -d ${SKY130_SC_HDLL_PATH} ; then \
echo "Building digital high-density low-leakage standard cell library" ; \
make digital-hdll-$* ; \
fi ; \
fi
digital-lp-build-%:
if test "x${SKY130_SC_LP_PATH}" != "x" ; then \
if test -d ${SKY130_SC_LP_PATH} ; then \
echo "Building digital low-power standard cell library" ; \
make digital-lp-$* ; \
fi ; \
fi
digital-hs-build-%:
if test "x${SKY130_SC_HS_PATH}" != "x" ; then \
if test -d ${SKY130_SC_HS_PATH} ; then \
echo "Building digital high-speed standard cell library" ; \
make digital-hs-$* ; \
fi ; \
fi
digital-ms-build-%:
if test "x${SKY130_SC_MS_PATH}" != "x" ; then \
if test -d ${SKY130_SC_MS_PATH} ; then \
echo "Building digital medium-speed standard cell library" ; \
make digital-ms-$* ; \
fi ; \
fi
digital-ls-build-%:
if test "x${SKY130_SC_LS_PATH}" != "x" ; then \
if test -d ${SKY130_SC_LS_PATH} ; then \
echo "Building digital low-speed standard cell library" ; \
make digital-ls-$* ; \
fi ; \
fi
alpha-build-%:
if test "x${ALPHA_PATH}" != "x" ; then \
echo "Building alphanumeric layout libraries" ; \
make alpha-$* ; \
fi
sram-build-%:
if test "x${SRAM_PATH}" != "x" ; then \
echo "Building SRAM macro library" ; \
make sram-$* ; \
fi
sram-space-build-%:
if test "x${SRAM_SPACE_PATH}" != "x" ; then \
echo "Building SRAM build-space library" ; \
make sram-space-$* ; \
fi
osu-t12-build-%:
if test "x${OSU_T12_PATH}" != "x" ; then \
echo "Building OSU 12-track-high standard cell library" ; \
make osu-t12-$* ; \
fi
osu-t15-build-%:
if test "x${OSU_T15_PATH}" != "x" ; then \
echo "Building OSU 15-track-high standard cell library" ;\
make osu-t15-$* ;\
fi
osu-t18-build-%:
if test "x${OSU_T18_PATH}" != "x" ; then \
echo "Building OSU 18-track-high standard cell library" ; \
make osu-t18-$* ; \
fi
primitive-%:
# Install device subcircuits from vendor files
${STAGE} -source ${SKY130_PR_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-ngspice models/* \
filter=custom/scripts/rename_models.py \
2>&1 | tee -a ${SKY130$*}_make.log
# Install base device library from vendor files.
${STAGE} -source ${SKY130_PR_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-gds cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-lef cells/*/*.magic.lef compile-only \
-spice cells/*/*.spice filter=custom/scripts/rename_cells.py \
-library primitive sky130_fd_pr 2>&1 | tee -a ${SKY130$*}_make.log
# Run the add_properties.py script to add extraction information to layout
# cells for which the intended device cannot be extracted.
./custom/scripts/add_properties.py ${EF_FORMAT} -variant=${SKY130$*} \
2>&1 | tee -a ${SKY130$*}_make.log || true
io-%:
# Install custom additions to I/O pad library
${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130$*} \
-verilog %l/verilog/*.v compile-only rename=sky130_ef_io \
-cdl %l/cdl/*.cdl \
-spice %l/spice/*.spice \
-lib %l/lib/*.lib \
-gds %l/gds/*.gds options=custom/scripts/gds_import_io.tcl \
-lef %l/lef/*.lef exclude=sky130_fd_io__top_xres4v2.lef,sky130_fd_io__top_power_hvc_wpadv2.lef,sky130_fd_io__top_gpiov2.lef \
compile-only rename=sky130_ef_io \
-lef %l/lef/sky130_fd_io__top_*.lef \
-library general sky130_fd_io 2>&1 | tee -a ${SKY130$*}_make.log
# Install SkyWater I/O pad library
${STAGE} -source ${SKY130_IO_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-cdl cells/*/*.cdl ignore=topography compile-only \
include=custom/sky130_fd_io/cdl/*.cdl \
sort=../common/sort_pdkfiles.py \
-lef cells/*/*.lef annotate lefopts=-hide compile-only \
filter=custom/scripts/fix_io_lef.py \
no-copy=sky130_fd_io__top_xres4v2.lef,sky130_fd_io__top_gpiov2.lef \
include=sky130_fd_io__top_xres4v2.lef,sky130_fd_io__top_power_hvc_wpadv2.lef,sky130_fd_io__top_gpiov2.lef \
exclude=*.magic.lef,sky130_ef_io.lef \
sort=../common/sort_pdkfiles.py \
-doc cells/*/*.pdf \
-lib timing/*.lib \
-spice netlist/*.spice \
-gds cells/*/*.gds compile-only \
sort=../common/sort_pdkfiles.py \
options=custom/scripts/gds_import_io.tcl \
-verilog cells/*/*.blackbox.v compile-only exclude=sky130_ef_io.v \
rename=sky130_fd_io__blackbox.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.pp.v \
exclude=sky130_ef_io.v,sky130_fd_io__blackbox.v \
compile-only rename=sky130_fd_io__blackbox_pp.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.*.v remove \
-verilog cells/*/*.v \
exclude=*.*.v,sky130_ef_io.v,sky130_fd_io__blackbox.v,sky130_fd_io__blackbox_pp.v \
compile-only filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library general sky130_fd_io 2>&1 | tee -a ${SKY130$*}_make.log
# Add a maskhint set for the GPIO pad .mag view to prevent problems writing
# when writing HVI to GDS during hierarchical adjustments.
${ADDPROP} ${STAGING_PATH}/${SKY130$*} sky130_fd_io sky130_fd_io__top_gpiov2 \
"MASKHINTS_HVI 1346 17198 5828 19224 13700 1890 15920 2360 24 17522 1778 20612" -mag
digital-hd-%:
# Install custom additions to standard cell libraries
${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130$*} \
-gds %l/gds/*.gds options=custom/scripts/gds_import_setup.tcl \
-lef %l/lef/*.lef \
compile-only lefopts=-toplayer rename=sky130_ef_sc_hd.lef \
-verilog %l/verilog/*.v \
-library digital sky130_fd_sc_hd 2>&1 | tee -a ${SKY130$*}_make.log
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKY130_SC_HD_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef tech/*.tlef \
-spice cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
-cdl cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef cells/*/*.lef \
exclude=*.magic.lef,sky130_ef_sc_hd.lef lefopts=-toplayer \
annotate compile-only \
sort=../common/sort_pdkfiles.py \
-doc cells/*/*.pdf \
-lib timing/*.lib.part* collate \
-lib timing/*.lib \
-gds cells/*/*.gds compile-only \
include=custom/sky130_fd_sc_hd/gds/sky130_ef*.gds \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog models/*/*.v compile-only \
exclude=*.*.v \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.v compile-only \
exclude=primitives.v \
rename=sky130_fd_sc_hd__blackbox.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.pp.v compile-only \
exclude=primitives.v,sky130_fd_sc_hd__blackbox.v \
rename=sky130_fd_sc_hd__blackbox_pp.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.*.v remove \
-verilog cells/*/*.v compile-only \
exclude=*.*.v,primitives.v,sky130_fd_sc_hd__blackbox.v,sky130_fd_sc_hd__blackbox_pp.v \
include=custom/sky130_fd_sc_hd/verilog/*.v \
filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hd 2>&1 | tee -a ${SKY130$*}_make.log
# Add a maskhint set for the tap cell .mag view to prevent problems writing
# when writing NSDM and PSDM to GDS during hierarchical adjustments.
${ADDPROP} ${STAGING_PATH}/${SKY130$*} sky130_fd_sc_hd \
sky130_fd_sc_hd__tapvpwrvgnd_1 \
"MASKHINTS_PSDM 0 38 92 195" -mag
${ADDPROP} ${STAGING_PATH}/${SKY130$*} sky130_fd_sc_hd \
sky130_fd_sc_hd__tapvpwrvgnd_1 \
"MASKHINTS_NSDM 0 279 92 506" -mag
# Quick solution to extraction issue---connect VNB label pwell to rest
${ADDLAYER} ${STAGING_PATH}/${SKY130$*} sky130_fd_sc_hd \
sky130_fd_sc_hd__a21bo_1 \
pwell "29 17 69 157" -mag
digital-hdll-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKY130_SC_HDLL_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef tech/*.tlef \
-spice cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
-cdl cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
sort=../common/sort_pdkfiles.py \
-doc cells/*/*.pdf \
-lib timing/*.lib.part* collate \
-lib timing/*.lib \
-gds cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.v compile-only \
exclude=primitives.v \
rename=sky130_fd_sc_hdll__blackbox.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.pp.v compile-only \
exclude=primitives.v,sky130_fd_sc_hdll__blackbox.v \
rename=sky130_fd_sc_hdll__blackbox_pp.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.*.v remove \
-verilog cells/*/*.v compile-only \
exclude=*.*.v,primitives.v,sky130_fd_sc_hdll__blackbox.v,sky130_fd_sc_hdll__blackbox_pp.v \
filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hdll 2>&1 | tee -a ${SKY130$*}_make.log
digital-hvl-%:
${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130$*} \
-gds %l/gds/*.gds options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_fd_sc_hvl 2>&1 | tee -a ${SKY130$*}_make.log
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKY130_SC_HVL_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef tech/*.tlef \
-spice cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
-cdl cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
sort=../common/sort_pdkfiles.py \
-doc cells/*/*.pdf \
-lib timing/*.lib \
-gds cells/*/*.gds compile-only \
include=custom/sky130_fd_sc_hvl/gds/sky130_ef*.gds \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.v compile-only \
exclude=primitives.v \
rename=sky130_fd_sc_hvl__blackbox.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.pp.v compile-only \
exclude=primitives.v,sky130_fd_sc_hvl__blackbox.v \
rename=sky130_fd_sc_hvl__blackbox_pp.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.*.v remove \
-verilog cells/*/*.v compile-only \
exclude=*.*.v,primitives.v,sky130_fd_sc_hvl__blackbox.v,sky130_fd_sc_hvl__blackbox_pp.v \
filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hvl 2>&1 | tee -a ${SKY130$*}_make.log
# Add a maskhint to the HVL level shifter to represent the HVI layer as
# drawn in the GDS, and so eliminate the HVI-to-nwell DRC error.
${ADDPROP} ${STAGING_PATH}/${SKY130$*} sky130_fd_sc_hvl sky130_fd_sc_hvl__lsbufhv2lv_1 \
"MASKHINTS_HVI 22 34 706 1316" -mag
digital-lp-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKY130_SC_LP_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef tech/*.tlef \
-spice cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
-cdl cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
sort=../common/sort_pdkfiles.py \
-doc cells/*/*.pdf \
-lib timing/*.lib.part* collate \
-lib timing/*.lib \
-gds cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.v compile-only \
exclude=primitives.v \
rename=sky130_fd_sc_lp__blackbox.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.pp.v compile-only \
exclude=primitives.v,sky130_fd_sc_lp__blackbox.v \
rename=sky130_fd_sc_lp__blackbox_pp.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.*.v remove \
-verilog cells/*/*.v compile-only \
exclude=*.*.v,primitives.v,sky130_fd_sc_lp__blackbox.v,sky130_fd_sc_lp__blackbox_pp.v \
filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_lp 2>&1 | tee -a ${SKY130$*}_make.log
digital-hs-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKY130_SC_HS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef tech/*.tlef \
-spice cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
-cdl cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
sort=../common/sort_pdkfiles.py \
-doc cells/*/*.pdf \
-lib timing/*.lib.part* collate \
-lib timing/*.lib \
-gds cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.v compile-only \
exclude=primitives.v \
rename=sky130_fd_sc_hs__blackbox.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.pp.v compile-only \
exclude=primitives.v,sky130_fd_sc_hs__blackbox.v \
rename=sky130_fd_sc_hs__blackbox_pp.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.*.v remove \
-verilog cells/*/*.v compile-only \
exclude=*.*.v,primitives.v,sky130_fd_sc_hs__blackbox.v,sky130_fd_sc_hs__blackbox_pp.v \
filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hs 2>&1 | tee -a ${SKY130$*}_make.log
digital-ms-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKY130_SC_MS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef tech/*.tlef \
-spice cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
-cdl cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
sort=../common/sort_pdkfiles.py \
-doc cells/*/*.pdf \
-lib timing/*.lib.part* collate \
-lib timing/*.lib \
-gds cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.v compile-only \
exclude=primitives.v \
rename=sky130_fd_sc_ms__blackbox.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.pp.v compile-only \
exclude=primitives.v,sky130_fd_sc_ms__blackbox.v \
rename=sky130_fd_sc_ms__blackbox_pp.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.*.v remove \
-verilog cells/*/*.v compile-only \
exclude=*.*.v,primitives.v,sky130_fd_sc_ms__blackbox.v,sky130_fd_sc_ms__blackbox_pp.v \
filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_ms 2>&1 | tee -a ${SKY130$*}_make.log
digital-ls-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKY130_SC_LS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef tech/*.tlef \
-spice cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
-cdl cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
sort=../common/sort_pdkfiles.py \
-doc cells/*/*.pdf \
-lib timing/*.lib.part* collate \
-lib timing/*.lib \
-gds cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.v compile-only \
exclude=primitives.v \
rename=sky130_fd_sc_ls__blackbox.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.blackbox.pp.v compile-only \
exclude=primitives.v,sky130_fd_sc_ls__blackbox.v \
rename=sky130_fd_sc_ls__blackbox_pp.v \
sort=../common/sort_pdkfiles.py \
-verilog cells/*/*.*.v remove \
-verilog cells/*/*.v compile-only \
exclude=*.*.v,primitives.v,sky130_fd_sc_ls__blackbox.v,sky130_fd_sc_ls__blackbox_pp.v \
filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_ls 2>&1 | tee -a ${SKY130$*}_make.log
alpha-%:
# Install alphanumeric library.
${STAGE} -source ${ALPHA_PATH}/.. -target ${STAGING_PATH}/${SKY130$*} \
-mag %l/mag/*.mag filter=custom/scripts/text2m5.py \
-library general sky130_ml_xx_hd 2>&1 | tee -a ${SKY130$*}_make.log
# Install text2mag.py script for alphanumeric library
mkdir -p ${STAGING_PATH}/${SKY130$*}/libs.ref/${MLXX_SCRIPTS}
cp custom/scripts/text2mag.py \
${STAGING_PATH}/${SKY130$*}/libs.ref/${MLXX_SCRIPTS}
sram-%:
# Install SRAM library. NOTE: SRAM macros share some of the same
# cell names, so use special option script gds_import_sram.tcl
# To do: Add option to process each GDS file individually in magic,
# instead of all at once.
${STAGE} -source ${SRAM_PATH}/.. -target ${STAGING_PATH}/${SKY130$*} \
-lef %l/*/*.lef \
-lib %l/*/*.lib \
-gds %l/*/*.gds options=custom/scripts/gds_import_sram.tcl \
-spice %l/*/*.lvs.sp filter=custom/scripts/sp_to_spice.py \
-verilog %l/*/*.v \
-library general sky130_sram_macros 2>&1 | tee -a ${SKY130$*}_make.log
sram-space-%:
# Install custom additions to SRAM space
${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130$*} \
-gds sky130_fd_bd_sram/*.gds \
options=custom/scripts/gds_import_setup.tcl \
-library general sky130_fd_bd_sram 2>&1 | tee -a ${SKY130$*}_make.log
# Install SRAM build-space library.
${STAGE} -source ${SRAM_SPACE_PATH}/.. -target ${STAGING_PATH}/${SKY130$*} \
-gds %l/cells/*/*.gds compile-only \
no-copy=custom/sky130_fd_bd_sram/*.gds \
include=custom/sky130_fd_bd_sram/*.gds \
-lef %l/cells/*/*.lef compile-only \
-spice %l/cells/*/*.lvs.calibre.spice compile-only \
-library general sky130_fd_bd_sram 2>&1 | tee -a ${SKY130$*}_make.log
osu-t12-%:
# Install OSU T12 hs digital standard cells.
${STAGE} -source ${OSU_T12_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_12T.tlef rename=sky130_osu_sc_12t_hs.tlef \
-spice 12T_hs/cdl/*.spice compile-only exclude=*.*.spice \
-lef 12T_hs/lef/*.lef \
-lib 12T_hs/lib/*.lib \
-gds 12T_hs/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_12t_hs 2>&1 | tee -a ${SKY130$*}_make.log
# Install OSU T12 ms digital standard cells.
${STAGE} -source ${OSU_T12_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_12T.tlef rename=sky130_osu_sc_12t_ms.tlef \
-spice 12T_ms/cdl/*.spice compile-only exclude=*.*.spice \
-lef 12T_ms/lef/*.lef \
-lib 12T_ms/lib/*.lib \
-gds 12T_ms/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_12t_ms 2>&1 | tee -a ${SKY130$*}_make.log
# Install OSU T12 ls digital standard cells.
${STAGE} -source ${OSU_T12_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_12T.tlef rename=sky130_osu_sc_12t_ls.tlef \
-spice 12T_ls/cdl/*.spice compile-only exclude=*.*.spice \
-lef 12T_ls/lef/*.lef \
-lib 12T_ls/lib/*.lib \
-gds 12T_ls/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_12t_ls 2>&1 | tee -a ${SKY130$*}_make.log
osu-t15-%:
# Install OSU T15 hs digital standard cells.
${STAGE} -source ${OSU_T15_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_15T.tlef rename=sky130_osu_sc_15t_hs.tlef \
-spice 15T_hs/cdl/*.spice compile-only exclude=*.*.spice \
-lef 15T_hs/lef/*.lef \
-lib 15T_hs/lib/*.lib \
-gds 15T_hs/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_15t_hs 2>&1 | tee -a ${SKY130$*}_make.log
# Install OSU T15 ms digital standard cells.
${STAGE} -source ${OSU_T15_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_15T.tlef rename=sky130_osu_sc_15t_ms.tlef \
-spice 15T_ms/cdl/*.spice compile-only exclude=*.*.spice \
-lef 15T_ms/lef/*.lef \
-lib 15T_ms/lib/*.lib \
-gds 15T_ms/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_15t_ms 2>&1 | tee -a ${SKY130$*}_make.log
# Install OSU T15 ls digital standard cells.
${STAGE} -source ${OSU_T15_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_15T.tlef rename=sky130_osu_sc_15t_ls.tlef \
-spice 15T_ls/cdl/*.spice compile-only exclude=*.*.spice \
-lef 15T_ls/lef/*.lef \
-lib 15T_ls/lib/*.lib \
-gds 15T_ls/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_15t_ls 2>&1 | tee -a ${SKY130$*}_make.log
osu-t18-%:
# Install OSU T18 hs digital standard cells.
${STAGE} -source ${OSU_T18_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_18T.tlef rename=sky130_osu_sc_18t_hs.tlef \
-spice 18T_hs/cdl/*.spice compile-only exclude=*.*.spice \
-lef 18T_hs/lef/*.lef \
-lib 18T_hs/lib/*.lib \
-gds 18T_hs/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_18t_hs 2>&1 | tee -a ${SKY130$*}_make.log
# Install OSU T18 ms digital standard cells.
${STAGE} -source ${OSU_T18_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_18T.tlef rename=sky130_osu_sc_18t_ms.tlef \
-spice 18T_ms/cdl/*.spice compile-only exclude=*.*.spice \
-lef 18T_ms/lef/*.lef \
-lib 18T_ms/lib/*.lib \
-gds 18T_ms/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_18t_ms 2>&1 | tee -a ${SKY130$*}_make.log
# Install OSU T18 ls digital standard cells.
${STAGE} -source ${OSU_T18_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef sky130_osu_sc_18T.tlef rename=sky130_osu_sc_18t_ls.tlef \
-spice 18T_ls/cdl/*.spice compile-only exclude=*.*.spice \
-lef 18T_ls/lef/*.lef \
-lib 18T_ls/lib/*.lib \
-gds 18T_ls/gds/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
-library digital sky130_osu_sc_18t_ls 2>&1 | tee -a ${SKY130$*}_make.log
install: $(foreach var, ${VARIANTS}, install-$(var))
install-A:
echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_install.log
${INSTALL} \
-source ${STAGING_PATH}/${SKY130A} \
-finalpath ${SHARED_PDKS_PATH}/${SKY130A} \
-variable PDKPATH \
-link_from ${DIST_LINK_TARGETS_A} 2>&1 | tee -a ${SKY130A}_install.log
echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_install.log
# NOTE: if DIST_LINK_TARGETS_B points back to the A variant, then the install
# of B depends on the install of A. Can't think of a way to make the dependency
# itself depend on the value of DIST_LINK_TARGETS_B, so I'm just forcing the
# install to always be sequential: install A first, then B.
install-B: install-A
echo "Starting SKY130 PDK migration on "`date` > ${SKY130B}_install.log
${INSTALL} \
-source ${STAGING_PATH}/${SKY130B} \
-finalpath ${SHARED_PDKS_PATH}/${SKY130B} \
-variable PDKPATH \
-link_from ${DIST_LINK_TARGETS_B} 2>&1 | tee -a ${SKY130B}_install.log
echo "Ended SKY130 PDK migration on "`date` >> ${SKY130B}_install.log
uninstall: $(foreach var, ${VARIANTS}, uninstall-$(var))
uninstall-A:
echo "Uninstalling SKY130 PDK from ${SHARED_PDKS_PATH}"
if test "x${SHARED_PDKS_PATH}" != "x" ; then \
${RM} -rf ${SHARED_PDKS_PATH}/${SKY130A} ; \
fi
echo "Finished SKY130 PDK uninstall"
uninstall-B:
echo "Uninstalling SKY130 PDK from ${SHARED_PDKS_PATH}"
if test "x${SHARED_PDKS_PATH}" != "x" ; then \
${RM} -rf ${SHARED_PDKS_PATH}/${SKY130B} ; \
fi
echo "Finished SKY130 PDK uninstall"
clean: $(foreach var, ${VARIANTS}, clean-$(var))
clean-A:
${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean
clean-B:
${STAGE} -target ${STAGING_PATH}/${SKY130B} -clean
veryclean: $(foreach var, ${VARIANTS}, veryclean-$(var))
veryclean-A: clean-A
${RM} ${SKY130A}_make.log
${RM} ${SKY130A}_install.log
# Legacy name
${RM} ${SKY130A}_migrate.log
veryclean-B: clean-B
${RM} ${SKY130B}_make.log
${RM} ${SKY130B}_install.log
# Old aliases (retained for compatibility)
install-dist:
$(warning "'make install-dist' has been replaced with 'make install'")
make install
install-local:
$(warning "'make install-local' has been replaced with 'make install'")
make install
uninstall-dist:
$(warning "'make uninstall-dist' has been replaced with 'make uninstall'")
make uninstall
uninstall-local:
$(warning "'make uninstall-local' has been replaced with 'make uninstall'")
make uninstall
install-dist-A:
$(warning "'make install-dist-A' has been replaced with 'make install'")
make install
install-local-A:
$(warning "'make install-local-A' has been replaced with 'make install'")
make install
uninstall-dist-A:
$(warning "'make uninstall-dist-A' has been replaced with 'make uninstall'")
make uninstall
uninstall-local-A:
$(warning "'make uninstall-local-A' has been replaced with 'make uninstall'")
make uninstall