blob: 1e0748cc2d8f86eb7d2fc389f562c7ca8a8ac419 [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)
#
# Instructions:
#
# Run "configure" from the top level directory. Use the following
# configuration options to match your environment:
#
# --enable-sky130-pdk[=<path>]
# If enabled, install the skywater PDK. If <path> is specified,
# then the skywater PDK is expected to be found rooted at the
# given path. If not specified, then the skywater PDK will be
# downloaded and installed to <repo root>/pdks.
# 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.
#
# 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-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-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:
#
# SKYWATER_PATH: Points to vendor sources
# 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_pdk
SKYWATER_PATH = @SKY130_SOURCE_PATH@
ifneq ($(SKYWATER_PATH),)
SKYWATER_LIBS_PATH = ${SKYWATER_PATH}/libraries
else
SKYWATER_LIBS_PATH =
endif
# 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@
OSU_T12_PATH = @SKY130_OSU_T12_PATH@
OSU_T15_PATH = @SKY130_OSU_T15_PATH@
OSU_T18_PATH = @SKY130_OSU_T18_PATH@
PDK_URL = https://github.com/google/skywater-pdk
ALPHA_URL = https://github.com/PaulSchulz/sky130_pschulz_xx_hd
XSCHEM_URL = https://github.com/StefanSchippers/xschem_sky130
KLAYOUT_URL = https://github.com/mabrains/sky130_klayout_pdk
PRECHECK_URL = https://github.com/efabless/mpw_precheck
SRAM_URL = https://github.com/efabless/sky130_sram_macros
OSU_T12_URL = https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_osu_sc_t12
OSU_T15_URL = https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_osu_sc_t15
OSU_T18_URL = https://foss-eda-tools.googlesource.com/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 (${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 (${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
ifeq (${SKYWATER_PATH},)
COMMIT_DEFS += -DFD_PR_COMMIT="unknown"
COMMIT_DEFS += -DFD_IO_COMMIT="unknown"
COMMIT_DEFS += -DFD_SC_HD_COMMIT="unknown"
COMMIT_DEFS += -DFD_SC_HDLL_COMMIT="unknown"
COMMIT_DEFS += -DFD_SC_HVL_COMMIT="unknown"
COMMIT_DEFS += -DFD_SC_HS_COMMIT="unknown"
COMMIT_DEFS += -DFD_SC_MS_COMMIT="unknown"
COMMIT_DEFS += -DFD_SC_LS_COMMIT="unknown"
COMMIT_DEFS += -DFD_SC_LP_COMMIT="unknown"
else
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_pr/latest/cells),)
COMMIT_DEFS += -DFD_PR_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_PR_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_pr/latest)
endif
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_io/latest/cells),)
COMMIT_DEFS += -DFD_IO_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_IO_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_io/latest)
endif
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_sc_hd/latest/cells),)
COMMIT_DEFS += -DFD_SC_HD_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_HD_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_sc_hd/latest)
endif
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_sc_hdll/latest/cells),)
COMMIT_DEFS += -DFD_SC_HDLL_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_HDLL_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_sc_hdll/latest)
endif
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_sc_hvl/latest/cells),)
COMMIT_DEFS += -DFD_SC_HVL_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_HVL_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_sc_hvl/latest)
endif
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_sc_hs/latest/cells),)
COMMIT_DEFS += -DFD_SC_HS_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_HS_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_sc_hs/latest)
endif
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_sc_ms/latest/cells),)
COMMIT_DEFS += -DFD_SC_MS_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_MS_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_sc_ms/latest)
endif
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_sc_ls/latest/cells),)
COMMIT_DEFS += -DFD_SC_LS_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_LS_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_sc_ls/latest)
endif
ifeq ($(wildcard ${SKYWATER_PATH}/libraries/sky130_fd_sc_lp/latest/cells),)
COMMIT_DEFS += -DFD_SC_LP_COMMIT="unknown"
else
COMMIT_DEFS += -DFD_SC_LP_COMMIT=$(shell cd ${SKYWATER_PATH} ; git rev-parse @:libraries/sky130_fd_sc_lp/latest)
endif
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
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
all: $(foreach var, ${VARIANTS}, all-$(var))
# Handle prerequisites (fetch and install the PDK and requested libraries)
prerequisites: pdk-repo alpha-repo xschem-repo klayout-repo precheck-repo sram-repo osu-t12-repo osu-t15-repo osu-t18-repo
pdk-repo:
if test "x${SKYWATER_PATH}" != "x" ; then \
if test -d "${SKYWATER_PATH}" ; then \
echo "Using existing installation of SkyWater PDK from ${SKYWATER_PATH}" ; \
else \
echo "Downloading SkyWater PDK from ${PDK_URL}" ; \
custom/scripts/pdk_download.sh ${PDK_URL} ${SKYWATER_PATH} ; \
fi ; \
fi
alpha-repo:
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} ; \
fi ; \
fi
sram-repo:
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} ; \
fi ; \
fi
xschem-repo:
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} ; \
fi ; \
fi
klayout-repo:
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} ; \
fi ; \
fi
precheck-repo:
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} ; \
fi ; \
fi
osu-t12-repo:
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} 0 ; \
fi ; \
fi
osu-t15-repo:
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} 0 ; \
fi ; \
fi
osu-t18-repo:
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} 0 ; \
fi ; \
fi
# Update prerequisites
update: update-pdk-repo update-alpha-repo update-xschem-repo update-klayout-repo update-precheck-repo update-sram-repo update-osu-t12-repo update-osu-t15-repo update-osu-t18-repo
update-pdk-repo:
if test "x${SKYWATER_PATH}" != "x" ; then \
echo "Updating SkyWater PDK from ${PDK_URL}" ; \
custom/scripts/pdk_update.sh ${SKYWATER_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-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.
if test "x${KLAYOUT_PATH}" != "x" ; then \
cp -rp ${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 -rp ${KLAYOUT_PATH}/scripts/* ${KLAYOUT_STAGING_$*}/scripts/ ; \
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 entire repository (other than .git, if it exists)
if test "x${XSCHEM_PATH}" != "x" ; then \
cp -rp ${XSCHEM_PATH}/* ${XSCHEM_STAGING_$*} ; \
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 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 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-%:
# Build targets conditionally based on what repositories or submodules
# were selected or initialized. To be done: Allow a library version
# to be specified that overrides "latest".
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_pr/latest/cells ; then \
echo "Building primitives library and simulation models" ;\
make primitive-$*;\
fi
io-build-%:
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_io/latest/cells ; then \
echo "Building padframe I/O libraries" ;\
make io-$* ;\
fi
digital-hd-build-%:
# This assumes that at least the HD library submodule exists. Also it
# assumes that the same library version is used for all libraries, which
# is fine with "latest" but otherwise probably invalid.
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_sc_hd/latest/cells ; then \
echo "Building digital high-density standard cell library" ;\
make digital-hd-$* ;\
fi
digital-hvl-build-%:
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_sc_hvl/latest/cells ; then \
echo "Building digital high-voltage standard cell library" ;\
make digital-hvl-$* ;\
fi
digital-hdll-build-%:
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_sc_hdll/latest/cells ; then \
echo "Building digital high-density low-leakage standard cell library" ;\
make digital-hdll-$* ;\
fi
digital-lp-build-%:
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_sc_lp/latest/cells ; then \
echo "Building digital low-power standard cell library" ;\
make digital-lp-$* ;\
fi
digital-hs-build-%:
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_sc_hs/latest/cells ; then \
echo "Building digital high-speed standard cell library" ;\
make digital-hs-$* ;\
fi
digital-ms-build-%:
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_sc_ms/latest/cells ; then \
echo "Building digital medium-speed standard cell library" ;\
make digital-ms-$* ;\
fi
digital-ls-build-%:
if test -d ${SKYWATER_LIBS_PATH}/sky130_fd_sc_ls/latest/cells ; then \
echo "Building digital low-speed standard cell library" ;\
make digital-ls-$* ;\
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
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 ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-ngspice sky130_fd_pr/latest/models/* \
filter=custom/scripts/rename_models.py \
2>&1 | tee -a ${SKY130$*}_make.log
# Install device layouts from custom sources
${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130$*} \
-gds sky130_fd_pr/*.gds \
options=custom/scripts/gds_import_setup.tcl \
-library primitive sky130_fd_pr 2>&1 | tee -a ${SKY130$*}_make.log
# Install base device library from vendor files.
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-gds %l/latest/cells/*/*.gds \
no-copy=custom/sky130_fd_pr/*.gds \
include=custom/sky130_fd_pr/*.gds \
compile-only \
options=custom/scripts/gds_import_setup.tcl \
-lef %l/latest/cells/*/*.magic.lef compile-only \
-spice %l/latest/cells/*/*.spice filter=custom/scripts/rename_cells.py \
-library primitive sky130_fd_pr 2>&1 | tee -a ${SKY130$*}_make.log
# Custom: Add "short" resistor model and subcircuit to the r+c models file
cat ./custom/models/short.spice >> \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
# Custom: Add diodes as subcircuits to the r+c models file
cat ./custom/models/diode.spice >> \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
# Custom: Add resistors as subcircuits to the r+c models file
cat ./custom/models/resistor.spice >> \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
# Custom: Patch the r+c.mrp1monte.spice file to make the generic poly
# resistor a type "R" device.
${PATCH} -p1 -f -d ${STAGING_PATH}/${SKY130$*} \
< custom/patches/sky130_fd_pr_2.patch \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Custom: Patch the models to remove the substrate pin from the PNP
# device, which has no independent substrate pin (collector=substrate)
${PATCH} -p4 -f -d ${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE} \
< custom/patches/sky130_fd_pr_3.patch \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Custom: Patch the ngspice models to add the HV diffusion resistor subcircuits
${PATCH} -p2 -f -d ${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice \
< custom/patches/sky130_fd_pr_5.patch \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Fix up the PNP model file before running the next modification
head -15 ${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/sky130_fd_pr__pnp_05v5_W3p40L3p40.model.spice > ${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/temp
tail -39 ${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/sky130_fd_pr__pnp_05v5_W3p40L3p40.model.spice >> ${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/temp
mv ${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/temp ${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/sky130_fd_pr__pnp_05v5_W3p40L3p40.model.spice
# Custom: Add the PNP 3.4x3.4um device model to the includes in "all.spice"
./custom/scripts/fix_spice_includes.py ${EF_FORMAT} \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice/all.spice \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Custom: Add the PNP 3.4x3.4um device model to the includes in "montecarlo.spice"
./custom/scripts/fix_spice_includes2.py ${EF_FORMAT} \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice/parameters/montecarlo.spice \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Custom: Parse the (commented out) statistics blocks and generate
# ngspice-compatible monte carlo parameters for mismatch and process
./custom/scripts/mismatch_params.py ${EF_FORMAT} -variant=${SKY130$*} \
2>&1 | tee -a ${SKY130$*}_make.log || true
./custom/scripts/mismatch_params.py \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice \
2>&1 | tee -a ${SKY130$*}_make.log || true
./custom/scripts/process_params.py ${EF_FORMAT} -variant=${SKY130$*} \
2>&1 | tee -a ${SKY130$*}_make.log || true
./custom/scripts/process_params.py \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice \
2>&1 | tee -a ${SKY130$*}_make.log || true
./custom/scripts/montecarlo_hack.py -variant=${SKY130$*} \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Custom: Change vt to local_vt in one file for Xyce compatibilty
./custom/scripts/xyce_hack.py \
${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/sky130_fd_pr__res_iso_pw.model.spice \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Custom: Remove ACM model parameters from BSIM3 devices
./custom/scripts/xyce_hack2.py \
${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/sky130_fd_pr__special_nfet_pass.pm3.spice \
2>&1 | tee -a ${SKY130$*}_make.log || true
./custom/scripts/xyce_hack2.py \
${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/sky130_fd_pr__special_pfet_pass.pm3.spice \
2>&1 | tee -a ${SKY130$*}_make.log || true
./custom/scripts/xyce_hack2.py \
${STAGING_PATH}/${SKY130$*}/libs.ref/${PR_SPICE}/sky130_fd_pr__special_nfet_latch.pm3.spice \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Install custom corrected/enhanced sky130.lib.spice
cp custom/models/sky130.lib.spice \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Custom: Add special device ID layers to bipolar layouts in magic
# to make the extraction models correct.
./custom/scripts/add_bipolar_ids.py ${EF_FORMAT} -variant=${SKY130$*} \
2>&1 | tee -a ${SKY130$*}_make.log || true
# Custom: Add "spinit" file
cat ./custom/models/spinit >> \
${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice/spinit
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_setup.tcl \
-lef %l/lef/*.lef exclude=sky130_fd_io__top_xres4v2.lef \
compile-only rename=sky130_ef_io \
-lef %l/lef/sky130_fd_io__top_xres4v2.lef \
-library general sky130_fd_io 2>&1 | tee -a ${SKY130$*}_make.log
# Copy the GDS file for the GPIOv2 cell, then run the script that fixes it.
cp ${SKYWATER_LIBS_PATH}/sky130_fd_io/latest/cells/top_gpiov2/sky130_fd_io__top_gpiov2.gds \
${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_GDS}
./custom/scripts/fix_gpiov2_gds.py \
${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_GDS}/sky130_fd_io__top_gpiov2.gds
# Install SkyWater I/O pad library
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
include=custom/sky130_fd_io/cdl/*.cdl \
sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.lef annotate lefopts=-hide compile-only \
no-copy=sky130_fd_io__top_xres4v2.lef \
include=sky130_fd_io__top_xres4v2.lef \
exclude=*.magic.lef,sky130_ef_io.lef \
sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib \
-gds %l/latest/cells/*/*.gds compile-only \
sort=../common/sort_pdkfiles.py \
options=custom/scripts/sky130_fd_io_import.tcl \
no-copy=sky130_fd_io__top_gpiov2.gds \
include=sky130_fd_io__top_gpiov2.gds \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,sky130_ef_io.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
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130$*}/libs.ref/${IO_VERILOG}/*.*.v
# 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
# 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
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 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 ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef$*.py \
rename=sky130_fd_sc_hd__nom.tlef \
-spice %l/latest/cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
filter=custom/scripts/fix_sparecell_spice.py \
filter=custom/scripts/fix_device_models.py \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
filter=custom/scripts/fix_sparecell_cdl.py \
filter=custom/scripts/fix_serxtors_cdl.py \
sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.lef \
exclude=*.magic.lef,sky130_ef_sc_hd.lef lefopts=-toplayer \
filter=custom/scripts/fix_digital_lef.py \
annotate compile-only \
sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib filter=custom/scripts/add_wireloads.py \
filter=custom/scripts/fix_default_fanout_load.py \
filter=custom/scripts/fix_related_bias_pins.py \
-gds %l/latest/cells/*/*.gds compile-only \
no-copy=custom/sky130_fd_sc_hd/gds/sky130_fd*.gds \
include=custom/sky130_fd_sc_hd/gds/sky130_ef*.gds \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/models/*/*.v \
exclude=*.*.v include=custom/sky130_fd_sc_hd/verilog/*.v \
compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
compile-only filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hd 2>&1 | tee -a ${SKY130$*}_make.log
# Create minimum/maximum technology LEF files
./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${SKY130$*} \
-library=hd 2>&1 | tee -a ${SKY130$*}_make.log || true
# 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
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130$*}/libs.ref/${HD_VERILOG}/*.*.v
# Apply extra PDK patches until they get fixed properly in the source
${PATCH} -p1 -f -d ${STAGING_PATH}/${SKY130$*}/libs.ref/${HD_VERILOG} \
< custom/patches/hd_wire_syntax.patch \
2>&1 | tee -a ${SKY130$*}_make.log || true
digital-hdll-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef$*.py \
rename=sky130_fd_sc_hdll__nom.tlef \
-spice %l/latest/cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
filter=custom/scripts/fix_device_models.py \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
filter=custom/scripts/fix_digital_lef.py \
sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib filter=custom/scripts/add_wireloads.py \
filter=custom/scripts/fix_default_fanout_load.py \
filter=custom/scripts/fix_related_bias_pins.py \
-gds %l/latest/cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
compile-only filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hdll 2>&1 | tee -a ${SKY130$*}_make.log
# Create minimum/maximum technology LEF files
./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${SKY130$*} \
-library=hdll 2>&1 | tee -a ${SKY130$*}_make.log || true
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130$*}/libs.ref/${HDLL_VERILOG}/*.*.v
digital-hvl-%:
# 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 \
-spice %l/spice/*.spice \
-library digital sky130_fd_sc_hvl 2>&1 | tee -a ${SKY130$*}_make.log
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef$*.py \
rename=sky130_fd_sc_hvl__nom.tlef \
-spice %l/latest/cells/*/*.spice compile-only \
no-copy=custom/sky130_fd_sc_hvl/spice/sky130_fd*.spice \
sort=../common/sort_pdkfiles.py \
filter=custom/scripts/fix_device_models.py \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib filter=custom/scripts/add_wireloads.py \
filter=custom/scripts/fix_default_fanout_load.py \
filter=custom/scripts/fix_related_bias_pins.py \
filter=custom/scripts/fix_mismatched_opcond.py \
-gds %l/latest/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 %l/latest/models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
compile-only filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hvl 2>&1 | tee -a ${SKY130$*}_make.log
# Create minimum/maximum technology LEF files
./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${SKY130$*} \
-library=hvl 2>&1 | tee -a ${SKY130$*}_make.log || true
# 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
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130$*}/libs.ref/${HVL_VERILOG}/*.*.v
# Custom: Patch the HVL library to correct the resistor device names
${PATCH} -p3 -f -d ${STAGING_PATH}/${SKY130$*}/libs.ref/${HVL_SPICE} \
< custom/patches/sky130_fd_pr_${HVL_PATCH4}.patch \
2>&1 | tee -a ${SKY130$*}_make.log || true
${PATCH} -p3 -f -d ${STAGING_PATH}/${SKY130$*}/libs.ref/${HVL_CDL} \
< custom/patches/sky130_fd_pr_6.patch \
2>&1 | tee -a ${SKY130$*}_make.log || true
digital-lp-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef$*.py \
rename=sky130_fd_sc_lp__nom.tlef \
-spice %l/latest/cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
filter=custom/scripts/fix_device_models.py \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
filter=custom/scripts/fix_digital_lef.py \
sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib filter=custom/scripts/add_wireloads.py \
filter=custom/scripts/fix_default_fanout_load.py \
filter=custom/scripts/fix_related_bias_pins.py \
-gds %l/latest/cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
compile-only filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_lp 2>&1 | tee -a ${SKY130$*}_make.log
# Create minimum/maximum technology LEF files
./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${SKY130$*} \
-library=lp 2>&1 | tee -a ${SKY130$*}_make.log || true
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130$*}/libs.ref/${LP_VERILOG}/*.*.v
digital-hs-%:
# 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 \
-library digital sky130_fd_sc_hs 2>&1 | tee -a ${SKY130$*}_make.log
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef$*.py \
rename=sky130_fd_sc_hs__nom.tlef \
-spice %l/latest/cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
filter=custom/scripts/fix_device_models.py \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
filter=custom/scripts/fix_digital_lef.py \
sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib filter=custom/scripts/add_wireloads.py \
filter=custom/scripts/fix_default_fanout_load.py \
filter=custom/scripts/fix_related_bias_pins.py \
-gds %l/latest/cells/*/*.gds compile-only \
no-copy=custom/sky130_fd_sc_hs/gds/sky130_fd*.gds \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
compile-only filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hs 2>&1 | tee -a ${SKY130$*}_make.log
# Create minimum/maximum technology LEF files
./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${SKY130$*} \
-library=hs 2>&1 | tee -a ${SKY130$*}_make.log || true
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130$*}/libs.ref/${HS_VERILOG}/*.*.v
digital-ms-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef$*.py \
rename=sky130_fd_sc_ms__nom.tlef \
-spice %l/latest/cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
filter=custom/scripts/fix_device_models.py \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
filter=custom/scripts/fix_digital_lef.py \
sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib filter=custom/scripts/add_wireloads.py \
filter=custom/scripts/fix_default_fanout_load.py \
filter=custom/scripts/fix_related_bias_pins.py \
-gds %l/latest/cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
compile-only filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_ms 2>&1 | tee -a ${SKY130$*}_make.log
# Create minimum/maximum technology LEF files
./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${SKY130$*} \
-library=ms 2>&1 | tee -a ${SKY130$*}_make.log || true
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130$*}/libs.ref/${MS_VERILOG}/*.*.v
digital-ls-%:
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130$*} \
-techlef %l/latest/tech/*.tlef filter=custom/scripts/fix_techlef$*.py \
rename=sky130_fd_sc_ls__nom.tlef \
-spice %l/latest/cells/*/*.spice compile-only \
sort=../common/sort_pdkfiles.py \
filter=custom/scripts/fix_device_models.py \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.lef annotate compile-only \
exclude=*.magic.lef lefopts=-toplayer \
filter=custom/scripts/fix_digital_lef.py \
sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib filter=custom/scripts/add_wireloads.py \
filter=custom/scripts/fix_default_fanout_load.py \
filter=custom/scripts/fix_related_bias_pins.py \
-gds %l/latest/cells/*/*.gds compile-only \
options=custom/scripts/gds_import_setup.tcl \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
compile-only filter=custom/scripts/inc_verilog.py \
sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_ls 2>&1 | tee -a ${SKY130$*}_make.log
# Create minimum/maximum technology LEF files
./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${SKY130$*} \
-library=ls 2>&1 | tee -a ${SKY130$*}_make.log || true
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130$*}/libs.ref/${LS_VERILOG}/*.*.v
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
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