blob: 34354fa905e1855b9d16d81c1ceb30fe8795e9c8 [file] [log] [blame]
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001# Makefile for efabless design kits for SkyWater Sky130:
2#
3# sky130A = 5-metal backend stack with dual MiM
4#
5# Written by Tim Edwards March 2019
6# efabless corporation
7# updated October 2019
8# updated December 2019 (divide installation sections for individual tools)
9# updated March 2020 (refactored the install process)
10# updated May 2020 (changed to new process name Sky130)
11#
12# Instructions:
13#
Tim Edwards7cbaaba2020-08-05 12:19:18 -040014# Run "configure" from the top level directory. Use the following
15# configuration options to match your environment:
Tim Edwards55f4d0e2020-07-05 15:41:02 -040016#
Tim Edwardsc7ab1ea2020-12-24 17:04:36 -050017# --enable-sky130-pdk[=<path>]
Tim Edwards942a14f2020-12-24 16:20:31 -050018# If enabled, install the skywater PDK. If <path> is specified,
19# then the skywater PDK is expected to be found rooted at the
20# given path. If not specified, then the skywater PDK will be
21# downloaded and installed to <repo root>/pdks.
22# If explicitly disabled, sky130 is skipped over entirely.
23#
Tim Edwards7cbaaba2020-08-05 12:19:18 -040024# --with-sky130-local-path=<path>
25# where <path> is the run-time location of the installed PDK
26# files generated by open_pdks. This option is mandatory and
27# has no default.
28#
29# --with-sky130-dist-path=<path>
30# where <path> is the install-time location of the installed
31# PDK files generated by open_pdks, with the expectation that
32# <path> is something like a git repository that is then
33# distributed across a system. If this option is not specified,
34# then files are installed to the local path.
35#
36# --with-sky130-link-targets=<value>
37# where <value> is one of "none" or "source". If set to "source",
38# then where possible, the installed files are symbolic links
39# back to the source, rather than copies of the source. The
40# default value is "none" if the option is not specified.
41#
42# --with-ef-style
43# If specified, then the installation uses the efabless style,
44# which swaps the file hierarchy of file formats vs. IP libraries;
45# e.g., "gds/sky130_fd_sc_hd/" with ef-style, vs.
46# "sky130_fd_sc_hd/gds/" without it.
47#
Tim Edwards22fdb442020-12-02 12:40:03 -050048# Enable/disable for specific libraries to be installed (and downloaded if
49# needed). Libraries that are part of the open_pdks repository are enabled
50# by default and must be disabled by passing an option to configure. Libraries
51# that are not part of the open_pdks repository are disabled by default and
52# must be enabled by passing an option to configure.
53#
54# Internal libraries and tool setups that can be disabled are the following:
55#
56# --disable-magic
57# Do not install setup files for the magic layout tool.
58#
59# --disable-netgen
60# Do not install setup files for the netgen LVS tool.
61#
Tim Edwards367711e2021-01-27 10:35:12 -050062# --disable-irsim
63# Do not install setup files for the IRSIM simulation tool.
64#
Tim Edwards22fdb442020-12-02 12:40:03 -050065# --disable-qflow
66# Do not install setup files for the qflow synthesis flow.
67#
68# --disable-openlane
69# Do not install setup files for the openlane sythesis flow.
70#
71# --disable-klayout
72# Do not install setup files for the klayout layout tool.
73#
Tim Edwardsccaea722020-12-24 10:59:42 -050074#
75# NOTE: The comments below are for features that have not yet been
76# implemented.
77#
Tim Edwards9a17fca2021-02-11 17:44:04 -050078# External (third-party) libraries and tool setups are the following (enabled
79# by default):
Tim Edwards22fdb442020-12-02 12:40:03 -050080#
Tim Edwardscdfec5e2021-04-22 20:59:13 -040081# --enable-alpha-sky130[=<path>]
Tim Edwardsbcf59aa2020-12-17 16:55:13 -050082# If enabled, install the sky130_ml_xx_hd font library from
Tim Edwardscfe970c2021-02-26 14:35:51 -050083# Paul Schulz on github. If <path> is not specified, then the
84# font library will be cloned from the git repository and
85# installed.
Tim Edwards22fdb442020-12-02 12:40:03 -050086#
Tim Edwardscdfec5e2021-04-22 20:59:13 -040087# --enable-xschem-sky130[=<path>]
Tim Edwards22fdb442020-12-02 12:40:03 -050088# If enabled, install the Sky130 setup for the xschem schematic
89# editor. If <path> is specified, then the xschem setup is
90# expected to be found rooted at the given path. If not
91# specified, then the xschem setup will be cloned from the
92# repository and installed.
93#
Tim Edwardscdfec5e2021-04-22 20:59:13 -040094# External (third-party) libraries and tool setups are the following (disabled
95# by default):
96#
97# --enable-sram-sky130[=<path>]
Tim Edwardscfe970c2021-02-26 14:35:51 -050098# If enabled, install the sky130_sram_macros library from
99# efabless on github. If <path> is not specified, then
100# the SRAM library will be cloned from the repository and
101# installed.
102#
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400103# --enable-osu-sky130[=<path>]
104# If enabled, install the sky130_osu_sc library from
105# foss-eda-tools on googlesource. If <path> is not
106# specified, then the OSU standard cell library will be
107# clones from the repository and installed.
108#
109# --enable-osu-t12-sky130[=<path>]
110# If enabled, install the sky130_osu_sc_t12 libraries from
111# foss-eda-tools on googlesource. If <path> is not
112# specified, then the OSU standard cell library will be
113# clones from the repository and installed.
114#
115# --enable-osu-t15-sky130[=<path>]
116# If enabled, install the sky130_osu_sc_t15 libraries from
117# foss-eda-tools on googlesource. If <path> is not
118# specified, then the OSU standard cell library will be
119# clones from the repository and installed.
120#
121# --enable-osu-t18-sky130[=<path>]
122# If enabled, install the sky130_osu_sc_t18 libraries from
123# foss-eda-tools on googlesource. If <path> is not
124# specified, then the OSU standard cell library will be
125# clones from the repository and installed.
126#
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400127# The variables below are substituted from the configuration options:
128#
129# SKYWATER_PATH: points to vendor sources
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400130# EF_STYLE: 1 for efabless style, 0 otherwise
131# LINK_TARGETS: link back to source or link to 1st PDK when possible
132# DIST_PATH: install location for distributed install
133# LOCAL_PATH: install location for local install or runtime location
134# for distributed install
135#
136# Run "make" to stage the PDK for tool setup and vendor libraries
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400137#
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400138# Run "make install" to install all staged files. The installation is
139# either local or distributed, depending on whether --with-sky130-dist-path
140# has been set when running configure.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400141#
142# Run "make clean" to remove all staging files.
143#
Tim Edwards9134eed2021-02-13 14:42:59 -0500144# Run "make veryclean" to remove all staging and make.log files.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400145#
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400146# For the sake of simplicity, the "standard" installation can be done
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400147# with the usual
148#
149# make
150# make install
151# make clean
152#
153#--------------------------------------------------------------------
154# This Makefile contains bash-isms
155SHELL = bash
Tristan Gingolda5854312020-10-15 18:28:16 +0200156MV = mv
Tim Edwards5a623ff2021-04-30 16:30:52 -0400157SED = @SED@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400158
Tim Edwardsf04c4212021-03-18 10:12:16 -0400159# Use git revision if this is a cloned repo; otherwise get the revision
160# from the VERSION file in the directory above.
161GITREV = $(shell git describe --long)
162ifeq (${GITREV},)
163 REVISION = $(shell cat ../VERSION)
164else
165 REVISION = ${GITREV}
166endif
167TECH = sky130
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400168
169# If EF_STYLE is set to 1, then efabless naming conventions are
170# used, otherwise the generic naming conventions are used.
171# Mainly, the hierarchy of library names and file types is reversed
172# (e.g., sky130_fd_sc_hd/lef vs. lef/sky130_fd_sc_hd).
173
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400174# EF_STYLE = 0 | 1
175EF_STYLE = @EF_STYLE@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400176
177# Normally it's fine to keep the staging path in a local directory,
178# although /tmp or a dedicated staging area are also fine, as long
179# as the install process can write to the path.
180
Tim Edwardsf04c4212021-03-18 10:12:16 -0400181STAGING_PATH = $(shell pwd)
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400182
183# If LINK_TARGETS is set to "none", then files are copied
184# from the SkyWater sources to the target. If set to "source",
185# symbolic links are made in the target directories pointing
186# back to the SkyWater sources. If set to the name of another
187# PDK (e.g, "sky130A"), then symbolic links are made to the
188# same files in that PDK, where they exist, and are copied
189# from source, where they don't.
190
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400191# LINK_TARGETS = source | none | sky130A
192LINK_TARGETS = @SKY130_LINK_TARGETS@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400193
194# Paths:
195
agorararmard3ee5f112021-02-03 19:49:09 +0200196# Path to skywater_pdk
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400197SKYWATER_PATH = @SKY130_SOURCE_PATH@
Tim Edwards66e53e52021-01-24 21:21:36 -0500198ifneq ($(SKYWATER_PATH),)
Tim Edwards6ee11532021-02-11 12:29:33 -0500199 SKYWATER_LIBS_PATH = ${SKYWATER_PATH}/libraries
200else
201 SKYWATER_LIBS_PATH =
Tim Edwards66e53e52021-01-24 21:21:36 -0500202endif
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400203
Tim Edwardsbcf59aa2020-12-17 16:55:13 -0500204# Path to independent library sources (to be added to configuration options).
Tim Edwards1168a8b2021-02-10 22:06:54 -0500205ALPHA_PATH = @SKY130_ML_XX_HD_PATH@
206XSCHEM_PATH = @XSCHEM_SKY130_PATH@
Tim Edwardscfe970c2021-02-26 14:35:51 -0500207SRAM_PATH = @SKY130_SRAM_MACROS_PATH@
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400208OSU_PATH = @SKY130_OSU_PATH@
209OSU_T12_PATH = @SKY130_OSU_T12_PATH@
210OSU_T15_PATH = @SKY130_OSU_T15_PATH@
211OSU_T18_PATH = @SKY130_OSU_T18_PATH@
Tim Edwardsbcf59aa2020-12-17 16:55:13 -0500212
Tim Edwards6ee11532021-02-11 12:29:33 -0500213PDK_URL = https://github.com/google/skywater-pdk
Tim Edwardscfe970c2021-02-26 14:35:51 -0500214ALPHA_URL = https://github.com/PaulSchulz/sky130_pschulz_xx_hd/archive/master.tar.gz
Tim Edwards6ee11532021-02-11 12:29:33 -0500215XSCHEM_URL = https://github.com/StefanSchippers/xschem_sky130/archive/main.tar.gz
Tim Edwardscfe970c2021-02-26 14:35:51 -0500216SRAM_URL = https://github.com/efabless/sky130_sram_macros/archive/main.tar.gz
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400217OSU_URL = https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_osu_sc/+archive/refs/heads/master.tar.gz
218OSU_T12_URL = https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_osu_sc_t12/+archive/refs/heads/master.tar.gz
219OSU_T15_URL = https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_osu_sc_t15/+archive/refs/heads/master.tar.gz
220OSU_T18_URL = https://foss-eda-tools.googlesource.com/skywater-pdk/libs/sky130_osu_sc_t18/+archive/refs/heads/master.tar.gz
Tim Edwards6ee11532021-02-11 12:29:33 -0500221
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400222# NOTE: Install destination is the git repository of the technology platform.
223# Once updated in git, the git project can be distributed to all hosts.
224#
225ifeq (${EF_STYLE}, 1)
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400226 LOCAL_PATH = @SKY130_LOCAL_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400227 CONFIG_DIR = .ef-config
228 REV_DIR = ${REVISION}
229else
230 # LOCAL_PATH = /usr/local/share/vlsi/SkyWater
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400231 LOCAL_PATH = @SKY130_LOCAL_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400232 CONFIG_DIR = .config
233 REV_DIR = .
234endif
235
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400236# DIST_PATH = ~/gits/ef-skywater-${TECH}
237DIST_PATH = @SKY130_DIST_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400238
239# EF process nodes created from the master sources
240SKY130A = sky130A
241
242ifeq (${LINK_TARGETS}, ${SKY130A})
243 DIST_LINK_TARGETS = ${LOCAL_PATH}/${LINK_TARGETS}
244else
245 DIST_LINK_TARGETS = ${LINK_TARGETS}
246endif
247
248# Basic definitions for each EF process node
249SKY130A_DEFS = -DTECHNAME=sky130A -DREVISION=${REVISION}
250
251# Module definitions for each process node
252# (Note that MOS is default and therefore not used anywhere)
Tim Edwards0a0272b2020-07-28 14:40:10 -0400253SKY130A_DEFS += -DMETAL5 -DMIM -DREDISTRIBUTION
254# SKY130A_DEFS += -DMETAL5 -DMIM
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400255
256# Add staging path
257SKY130A_DEFS += -DSTAGING_PATH=${STAGING_PATH}
258
259ifeq (${EF_STYLE}, 1)
260 EF_FORMAT = -ef_format
261 SKY130A_DEFS += -DEF_FORMAT
262else
263 EF_FORMAT = -std_format
264endif
265
266MAGICTOP = libs.tech/magic
267NETGENTOP = libs.tech/netgen
Tim Edwards367711e2021-01-27 10:35:12 -0500268IRSIMTOP = libs.tech/irsim
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400269QFLOWTOP = libs.tech/qflow
270KLAYOUTTOP = libs.tech/klayout
271OPENLANETOP = libs.tech/openlane
Tim Edwards1168a8b2021-02-10 22:06:54 -0500272XSCHEMTOP = libs.tech/xschem
Tim Edwardse4c44092021-02-12 10:18:56 -0500273XCIRCUITTOP = libs.tech/xcircuit
Tim Edwards25972f82021-04-27 21:45:58 -0400274NGSPICETOP = libs.tech/ngspice
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400275
276ifeq (${EF_STYLE}, 1)
277 MAGICPATH = ${MAGICTOP}/${REVISION}
Tim Edwards9134eed2021-02-13 14:42:59 -0500278 MAGICCURRENT = ${MAGICTOP}/current
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400279else
280 MAGICPATH = ${MAGICTOP}
Tim Edwards9134eed2021-02-13 14:42:59 -0500281 MAGICCURRENT = ${MAGICTOP}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400282endif
283
Tim Edwards367711e2021-01-27 10:35:12 -0500284# Currently, netgen, qflow, irsim, and klayout do not use revisioning (needs to change!)
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400285NETGENPATH = ${NETGENTOP}
Tim Edwards367711e2021-01-27 10:35:12 -0500286IRSIMPATH = ${IRSIMTOP}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400287QFLOWPATH = ${QFLOWTOP}
288KLAYOUTPATH = ${KLAYOUTTOP}
289OPENLANEPATH = ${OPENLANETOP}
Tim Edwards1168a8b2021-02-10 22:06:54 -0500290XSCHEMPATH = ${XSCHEMTOP}
Tim Edwardse4c44092021-02-12 10:18:56 -0500291XCIRCUITPATH = ${XCIRCUITTOP}
Tim Edwards25972f82021-04-27 21:45:58 -0400292NGSPICEPATH = ${NGSPICETOP}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400293
294MAGICTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICTOP}
295NETGENTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENTOP}
Tim Edwards367711e2021-01-27 10:35:12 -0500296IRSIMTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${IRSIMTOP}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400297QFLOWTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWTOP}
298KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTTOP}
299OPENLANETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANETOP}
Tim Edwards1168a8b2021-02-10 22:06:54 -0500300XSCHEMTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XSCHEMTOP}
Tim Edwardse4c44092021-02-12 10:18:56 -0500301XCIRCUITTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XCIRCUITTOP}
Tim Edwards25972f82021-04-27 21:45:58 -0400302NGSPICETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NGSPICETOP}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400303
304MAGIC_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICPATH}
305NETGEN_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENPATH}
Tim Edwards367711e2021-01-27 10:35:12 -0500306IRSIM_STAGING_A = ${STAGING_PATH}/${SKY130A}/${IRSIMPATH}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400307QFLOW_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWPATH}
308KLAYOUT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTPATH}
309OPENLANE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANEPATH}
Tim Edwards1168a8b2021-02-10 22:06:54 -0500310XSCHEM_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XSCHEMPATH}
Tim Edwardse4c44092021-02-12 10:18:56 -0500311XCIRCUIT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XCIRCUITPATH}
Tim Edwards25972f82021-04-27 21:45:58 -0400312NGSPICE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NGSPICEPATH}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400313
Tim Edwards9134eed2021-02-13 14:42:59 -0500314SKY130A_DEFS += -DMAGIC_CURRENT=${MAGICCURRENT}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400315
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500316# Openlane has a number of files that are common to all digital
317# standard cell libraries, so these are collected in one definition
318# here:
agorararmard2ca46022021-02-11 21:43:51 +0200319OPENLANE_COMMON = config.tcl tracks.info no_synth.cells drc_exclude.cells
manarabdelaty2ecac4f2021-03-08 15:23:12 +0200320OPENLANE_COMMON += tribuff_map.v latch_map.v mux2_map.v mux4_map.v fa_map.v rca_map.v csa_map.v
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500321
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400322# Where cpp syntax is followed, this is equivalent to cpp, but it does not
323# mangle non-C source files under the belief that they are actually C code.
324CPP = ../common/preproc.py
325
326# The following script in the ../common directory does most of the work of
327# copying or linking the foundry vendor files to the target directory.
328STAGE = set -f ; ../common/foundry_install.py ${EF_FORMAT}
329INSTALL = ../common/staging_install.py ${EF_FORMAT}
330
331# The script(s) below are used for custom changes to the vendor PDK files
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200332ADDPROP = ../common/insert_property.py ${EF_FORMAT}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400333
334# List the EDA tools to install local setup files for
Tim Edwardsccaea722020-12-24 10:59:42 -0500335TOOLS =
336
337# KLAYOUT_DISABLED = 0 | 1
338KLAYOUT_DISABLED = @KLAYOUT_DISABLED@
339ifneq (${KLAYOUT_DISABLED}, 1)
340 TOOLS += klayout
341endif
342
343# OPENLANE_DISABLED = 0 | 1
344OPENLANE_DISABLED = @OPENLANE_DISABLED@
345ifneq (${OPENLANE_DISABLED}, 1)
346 TOOLS += openlane
347endif
348
349# QFLOW_DISABLED = 0 | 1
350QFLOW_DISABLED = @QFLOW_DISABLED@
351ifneq (${QFLOW_DISABLED}, 1)
352 TOOLS += qflow
353endif
354
355# MAGIC_DISABLED = 0 | 1
356MAGIC_DISABLED = @MAGIC_DISABLED@
357ifneq (${MAGIC_DISABLED}, 1)
358 TOOLS += magic
359endif
360
361# NETGEN_DISABLED = 0 | 1
362NETGEN_DISABLED = @NETGEN_DISABLED@
363ifneq (${NETGEN_DISABLED}, 1)
364 TOOLS += netgen
365endif
366
Tim Edwards367711e2021-01-27 10:35:12 -0500367# IRSIM_DISABLED = 0 | 1
368IRSIM_DISABLED = @IRSIM_DISABLED@
369ifneq (${IRSIM_DISABLED}, 1)
370 TOOLS += irsim
371endif
372
Tim Edwards1168a8b2021-02-10 22:06:54 -0500373# XSCHEM_DISABLED = 0 | 1
374XSCHEM_DISABLED = @XSCHEM_DISABLED@
375ifneq (${XSCHEM_DISABLED}, 1)
376 TOOLS += xschem
377endif
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400378
Tim Edwardse4c44092021-02-12 10:18:56 -0500379# XCIRCUIT_DISABLED = 0 | 1
380XCIRCUIT_DISABLED = @XCIRCUIT_DISABLED@
381ifneq (${XCIRCUIT_DISABLED}, 1)
382 TOOLS += xcircuit
383endif
384
Tim Edwards25972f82021-04-27 21:45:58 -0400385# These definitions depend on the setting of EF_STYLE
386ifeq (${EF_STYLE}, 1)
387 IO_VERILOG = verilog/sky130_fd_io
388 HD_VERILOG = verilog/sky130_fd_sc_hd
389 HDLL_VERILOG = verilog/sky130_fd_sc_hdll
390 HVL_VERILOG = verilog/sky130_fd_sc_hvl
391 HS_VERILOG = verilog/sky130_fd_sc_hs
392 MS_VERILOG = verilog/sky130_fd_sc_ms
393 LS_VERILOG = verilog/sky130_fd_sc_ls
394 LP_VERILOG = verilog/sky130_fd_sc_lp
395 HD_TECHLEF = techLEF/sky130_fd_sc_hd
396 HDLL_TECHLEF = techLEF/sky130_fd_sc_hdll
397 MLXX_SCRIPTS = scripts/sky130_ml_xx_hd
398 PR_SPICE = spi/sky130_fd_pr
Tim Edwardsf63ee052021-04-29 15:13:45 -0400399 HVL_SPICE = spi/sky130_fd_sc_hvl
400 HVL_CDL = cdl/sky130_fd_sc_hvl
Tim Edwards25972f82021-04-27 21:45:58 -0400401else
402 IO_VERILOG = sky130_fd_io/verilog
403 HD_VERILOG = sky130_fd_sc_hd/verilog
404 HDLL_VERILOG = sky130_fd_sc_hdll/verilog
405 HVL_VERILOG = sky130_fd_sc_hvl/verilog
406 HS_VERILOG = sky130_fd_sc_hs/verilog
407 MS_VERILOG = sky130_fd_sc_ms/verilog
408 LS_VERILOG = sky130_fd_sc_ls/verilog
409 LP_VERILOG = sky130_fd_sc_lp/verilog
410 HD_TECHLEF = sky130_fd_sc_hd/techlef
411 HDLL_TECHLEF = sky130_fd_sc_hdll/techlef
412 MLXX_SCRIPTS = sky130_ml_xx_hd/scripts
413 PR_SPICE = sky130_fd_pr/spice
Tim Edwardsf63ee052021-04-29 15:13:45 -0400414 HVL_SPICE = sky130_fd_sc_hvl/spice
415 HVL_CDL = sky130_fd_sc_hvl/cdl
Tim Edwards25972f82021-04-27 21:45:58 -0400416endif
417
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400418all: all-a
419
Tim Edwards6ee11532021-02-11 12:29:33 -0500420# Handle prerequisites (fetch and install the PDK and requested libraries)
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400421prerequisites: pdk-repo alpha-repo xschem-repo sram-repo osu-repo osu-t12-repo osu-t15-repo osu-t18-repo
Tim Edwards6ee11532021-02-11 12:29:33 -0500422
423pdk-repo:
424 if test "x${SKYWATER_PATH}" != "x" ; then \
425 if test -d "${SKYWATER_PATH}" ; then \
426 echo "Using existing installation of SkyWater PDK from ${SKYWATER_PATH}" ; \
427 else \
428 echo "Downloading SkyWater PDK from ${PDK_URL}" ; \
429 custom/scripts/pdk_download.sh ${PDK_URL} ${SKYWATER_PATH} ; \
430 fi ; \
431 fi
432
433alpha-repo:
434 if test "x${ALPHA_PATH}" != "x" ; then \
435 if test -d "${ALPHA_PATH}" ; then \
436 echo "Using existing installation of alphanumeric library from ${ALPHA_PATH}" ; \
437 else \
438 echo "Downloading alphanumeric library from ${ALPHA_URL}" ; \
439 ../scripts/download.sh ${ALPHA_URL} ${ALPHA_PATH} ; \
440 fi ; \
441 fi
442
Tim Edwardscfe970c2021-02-26 14:35:51 -0500443sram-repo:
444 if test "x${SRAM_PATH}" != "x" ; then \
445 if test -d "${SRAM_PATH}" ; then \
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400446 echo "Using existing installation of SRAM macro library from ${SRAM_PATH}" ; \
Tim Edwardscfe970c2021-02-26 14:35:51 -0500447 else \
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400448 echo "Downloading SRAM macro library from ${SRAM_URL}" ; \
Tim Edwardscfe970c2021-02-26 14:35:51 -0500449 ../scripts/download.sh ${SRAM_URL} ${SRAM_PATH} ; \
450 fi ; \
451 fi
452
453xschem-repo:
454 if test "x${XSCHEM_PATH}" != "x" ; then \
455 if test -d "${XSCHEM_PATH}" ; then \
456 echo "Using existing installation of xschem setup from ${XSCHEM_PATH}" ; \
457 else \
458 echo "Downloading xschem setup from ${XSCHEM_URL}" ; \
459 ../scripts/download.sh ${XSCHEM_URL} ${XSCHEM_PATH} ; \
460 fi ; \
461 fi
462
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400463osu-repo:
464 if test "x${OSU_PATH}" != "x" ; then \
465 if test -d "${OSU_PATH}" ; then \
466 echo "Using existing installation of OSU standard cell library from ${OSU_PATH}" ; \
467 else \
468 echo "Downloading OSU standard cell library from ${OSU_URL}" ; \
469 ../scripts/download.sh ${OSU_URL} ${OSU_PATH} 0 ; \
470 fi ; \
471 fi
472
473osu-t12-repo:
474 if test "x${OSU_T12_PATH}" != "x" ; then \
475 if test -d "${OSU_T12_PATH}" ; then \
476 echo "Using existing installation of OSU T12 standard cell library from ${OSU_T12_PATH}" ; \
477 else \
478 echo "Downloading OSU standard T12 cell library from ${OSU_T12_URL}" ; \
479 ../scripts/download.sh ${OSU_T12_URL} ${OSU_T12_PATH} 0 ; \
480 fi ; \
481 fi
482
483osu-t15-repo:
484 if test "x${OSU_T15_PATH}" != "x" ; then \
485 if test -d "${OSU_T15_PATH}" ; then \
486 echo "Using existing installation of OSU T15 standard cell library from ${OSU_T15_PATH}" ; \
487 else \
488 echo "Downloading OSU standard T15 cell library from ${OSU_T15_URL}" ; \
489 ../scripts/download.sh ${OSU_T15_URL} ${OSU_T15_PATH} 0 ; \
490 fi ; \
491 fi
492
493osu-t18-repo:
494 if test "x${OSU_T18_PATH}" != "x" ; then \
495 if test -d "${OSU_T18_PATH}" ; then \
496 echo "Using existing installation of OSU T18 standard cell library from ${OSU_T18_PATH}" ; \
497 else \
498 echo "Downloading OSU standard T18 cell library from ${OSU_T18_URL}" ; \
499 ../scripts/download.sh ${OSU_T18_URL} ${OSU_T18_PATH} 0 ; \
500 fi ; \
501 fi
502
Tim Edwardscfe970c2021-02-26 14:35:51 -0500503all-a: prerequisites
504 echo "Starting sky130A PDK staging on "`date` > ${SKY130A}_make.log
Tim Edwards10aa9ab2021-03-15 17:46:29 -0400505 ${MAKE} general-a
Tim Edwardscfe970c2021-02-26 14:35:51 -0500506 ${MAKE} tools-a
507 ${MAKE} vendor-a
508 echo "Ended sky130A PDK staging on "`date` >> ${SKY130A}_make.log
509
Tim Edwardscfe970c2021-02-26 14:35:51 -0500510general-a: ${TECH}.json
511 mkdir -p ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}
512 rm -f ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json
513 ${CPP} ${SKY130A_DEFS} ${TECH}.json \
514 ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json
515
Tim Edwards942a14f2020-12-24 16:20:31 -0500516tools-a: $(addsuffix -a, $(TOOLS))
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400517
Tim Edwards5778c232020-07-07 16:57:52 -0400518magic-a: magic/${TECH}.tech magic/${TECH}gds.tech magic/${TECH}.magicrc magic/${TECH}.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400519 mkdir -p ${MAGICTOP_STAGING_A}
520 mkdir -p ${MAGIC_STAGING_A}
521 rm -f ${MAGICTOP_STAGING_A}/current
522 rm -f ${MAGIC_STAGING_A}/${SKY130A}.tech
523 rm -f ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech
524 rm -f ${MAGIC_STAGING_A}/${SKY130A}.tcl
525 rm -f ${MAGIC_STAGING_A}/${SKY130A}-BindKeys
526 rm -f ${MAGIC_STAGING_A}/magicrc
Tim Edwards9134eed2021-02-13 14:42:59 -0500527 if "${EF_STYLE}" == "1" ; then \
528 (cd ${MAGICTOP_STAGING_A} ; ln -s ${REV_DIR} current) ; \
529 fi
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400530 cp -rp custom/scripts/seal_ring_generator ${MAGIC_STAGING_A}/.
Tim Edwards4d081b82021-01-27 14:30:03 -0500531 cp -rp custom/scripts/bump_bond_generator ${MAGIC_STAGING_A}/.
Tim Edwards4d46bac2020-12-29 16:23:22 -0500532 cp custom/scripts/generate_fill.py ${MAGIC_STAGING_A}/.
Tim Edwards113b0832021-01-13 11:27:52 -0500533 cp custom/scripts/check_density.py ${MAGIC_STAGING_A}/.
Tim Edwardsc46b9532021-04-12 14:31:29 -0400534 cp custom/scripts/run_standard_drc.py ${MAGIC_STAGING_A}/.
535 cp custom/scripts/check_antenna.py ${MAGIC_STAGING_A}/.
Tim Edwards9134eed2021-02-13 14:42:59 -0500536 ${CPP} ${SKY130A_DEFS} magic/${TECH}.tech ${MAGIC_STAGING_A}/${SKY130A}.tech
537 ${CPP} ${SKY130A_DEFS} magic/${TECH}gds.tech ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech
538 ${CPP} ${SKY130A_DEFS} magic/${TECH}.magicrc ${MAGIC_STAGING_A}/${SKY130A}.magicrc
539 ${CPP} ${SKY130A_DEFS} ../common/pdk.bindkeys ${MAGIC_STAGING_A}/${SKY130A}-BindKeys
540 ${CPP} ${SKY130A_DEFS} magic/${TECH}.tcl ${MAGIC_STAGING_A}/${SKY130A}.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400541 ${CPP} ${SKY130A_DEFS} ../common/pdk.tcl >> ${MAGIC_STAGING_A}/${SKY130A}.tcl
542
Tim Edwards5778c232020-07-07 16:57:52 -0400543qflow-a: qflow/${TECH}.sh qflow/${TECH}.par
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400544 mkdir -p ${QFLOWTOP_STAGING_A}
545 mkdir -p ${QFLOW_STAGING_A}
546 rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.sh
547 rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.par
548 rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.sh
549 rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.par
550 rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.sh
551 rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.par
552 rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.sh
553 rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.par
554 rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.sh
555 rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.par
556 rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.sh
557 rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.par
558 rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.sh
559 rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.par
Tim Edwards7ec76972020-07-07 21:56:08 -0400560 rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.sh
561 rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.par
Tim Edwards9134eed2021-02-13 14:42:59 -0500562 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hd qflow/${TECH}.sh \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400563 ${QFLOW_STAGING_A}/${SKY130A}hd.sh
Tim Edwards9134eed2021-02-13 14:42:59 -0500564 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hdll qflow/${TECH}.sh \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400565 ${QFLOW_STAGING_A}/${SKY130A}hdll.sh
Tim Edwards9134eed2021-02-13 14:42:59 -0500566 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hvl qflow/${TECH}.sh \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400567 ${QFLOW_STAGING_A}/${SKY130A}hvl.sh
Tim Edwards9134eed2021-02-13 14:42:59 -0500568 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hs qflow/${TECH}.sh \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400569 ${QFLOW_STAGING_A}/${SKY130A}hs.sh
Tim Edwards9134eed2021-02-13 14:42:59 -0500570 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_lp qflow/${TECH}.sh \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400571 ${QFLOW_STAGING_A}/${SKY130A}lp.sh
Tim Edwards9134eed2021-02-13 14:42:59 -0500572 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ls qflow/${TECH}.sh \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400573 ${QFLOW_STAGING_A}/${SKY130A}ls.sh
Tim Edwards9134eed2021-02-13 14:42:59 -0500574 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ms qflow/${TECH}.sh \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400575 ${QFLOW_STAGING_A}/${SKY130A}ms.sh
Tim Edwards9134eed2021-02-13 14:42:59 -0500576 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_osu_sc_t18 qflow/sky130osu.sh \
Tim Edwards7ec76972020-07-07 21:56:08 -0400577 ${QFLOW_STAGING_A}/${SKY130A}osu.sh
Tim Edwards9134eed2021-02-13 14:42:59 -0500578 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_A}/${SKY130A}hd.par
579 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_A}/${SKY130A}hdll.par
580 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_A}/${SKY130A}hvl.par
581 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_A}/${SKY130A}hs.par
582 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_A}/${SKY130A}ms.par
583 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_A}/${SKY130A}lp.par
584 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_A}/${SKY130A}ls.par
585 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par ${QFLOW_STAGING_A}/${SKY130A}osu.par
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400586
Tim Edwards5778c232020-07-07 16:57:52 -0400587netgen-a: netgen/${TECH}_setup.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400588 mkdir -p ${NETGENTOP_STAGING_A}
589 mkdir -p ${NETGEN_STAGING_A}
590 rm -f ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
591 rm -f ${NETGEN_STAGING_A}/setup.tcl
Tim Edwards9134eed2021-02-13 14:42:59 -0500592 ${CPP} ${SKY130A_DEFS} netgen/${TECH}_setup.tcl ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400593 (cd ${NETGEN_STAGING_A} ; ln -s ${SKY130A}_setup.tcl setup.tcl)
594
Tim Edwards1168a8b2021-02-10 22:06:54 -0500595irsim-a: irsim
Tim Edwards367711e2021-01-27 10:35:12 -0500596 mkdir -p ${IRSIMTOP_STAGING_A}
597 mkdir -p ${IRSIM_STAGING_A}
598 rm -f ${IRSIM_STAGING_A}/${SKY130A}_*.prm
599 cp irsim/${SKY130A}_*.prm ${IRSIM_STAGING_A}/
600
Tim Edwards5778c232020-07-07 16:57:52 -0400601klayout-a: klayout/${TECH}.lyp klayout/${TECH}.lyt
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400602 mkdir -p ${KLAYOUTTOP_STAGING_A}
603 mkdir -p ${KLAYOUT_STAGING_A}
604 rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
605 rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
Tim Edwards9134eed2021-02-13 14:42:59 -0500606 ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyp ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
607 ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyt ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
agorararmard1a6ece52021-01-15 18:50:43 +0200608 cp klayout/${TECH}.lydrc ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc
agorararmard22561582021-01-15 17:55:59 +0200609 ./custom/scripts/gen_run_drc.py -l ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc -o ${KLAYOUT_STAGING_A}/${SKY130A}.drc
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400610
Tim Edwardse4c44092021-02-12 10:18:56 -0500611xcircuit-a: xcircuit/${TECH}.xcircuitrc
612 rm -rf ${XCIRCUIT_STAGING_A}
613 mkdir -p ${XCIRCUITTOP_STAGING_A}
614 mkdir -p ${XCIRCUIT_STAGING_A}
615 rm -f ${XCIRCUIT_STAGING_A}/*.lps
616 rm -f ${XCIRCUIT_STAGING_A}/${SKY130A}.xcircuitrc
Tim Edwards9134eed2021-02-13 14:42:59 -0500617 ${CPP} ${SKY130A_DEFS} xcircuit/ngspice.lps ${XCIRCUIT_STAGING_A}/ngspice.lps
618 ${CPP} ${SKY130A_DEFS} xcircuit/sky130_fd_pr.lps ${XCIRCUIT_STAGING_A}/sky130_fd_pr.lps
619 ${CPP} ${SKY130A_DEFS} xcircuit/sky130_fd_sc_hd.lps ${XCIRCUIT_STAGING_A}/sky130_fd_sc_hd.lps
620 ${CPP} ${SKY130A_DEFS} xcircuit/${TECH}.xcircuitrc ${XCIRCUIT_STAGING_A}/${SKY130A}.xcircuitrc
Tim Edwardse4c44092021-02-12 10:18:56 -0500621
Tim Edwards1168a8b2021-02-10 22:06:54 -0500622xschem-a: ${XSCHEM_PATH}
623 rm -rf ${XSCHEM_STAGING_A}
624 mkdir -p ${XSCHEMTOP_STAGING_A}
625 mkdir -p ${XSCHEM_STAGING_A}
626 # Copy the entire repository (other than .git, if it exists)
627 if test "x${XSCHEM_PATH}" != "x" ; then \
628 cp -rp ${XSCHEM_PATH}/* ${XSCHEM_STAGING_A} ; \
629 fi
Tim Edwards9a17fca2021-02-11 17:44:04 -0500630 # Re-copy the xschemrc, with one change to add the PDK install path as
631 # a component of XSCHEM_LIBRARY_PATH
632 cat ${XSCHEM_PATH}/xschemrc | \
Tim Edwards5a623ff2021-04-30 16:30:52 -0400633 ${SED} -e "/PWD/aappend XSCHEM_LIBRARY_PATH :${XSCHEM_STAGING_A}" | \
634 ${SED} -e "/sky130_models.tcl/s#scripts#${XSCHEM_STAGING_A}/scripts#" | \
635 ${SED} -e "/netlist_dir/aset netlist_dir ." \
Tim Edwards9a17fca2021-02-11 17:44:04 -0500636 > ${XSCHEM_STAGING_A}/xschemrc
Tim Edwards1168a8b2021-02-10 22:06:54 -0500637
Tristan Gingolda5854312020-10-15 18:28:16 +0200638openlane-a: openlane/common_pdn.tcl 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
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400639 mkdir -p ${OPENLANETOP_STAGING_A}
640 mkdir -p ${OPENLANE_STAGING_A}
Tim Edwards3c1dd9a2020-11-27 13:49:58 -0500641 rm -rf ${OPENLANE_STAGING_A}/custom_cells/*
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400642 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hd
Tim Edwards5778c232020-07-07 16:57:52 -0400643 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hs
Ahmed Ghazy8e84e5c2020-07-27 14:32:34 +0200644 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ls
645 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ms
646 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll
647 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl
Tristan Gingolda5854312020-10-15 18:28:16 +0200648 mkdir -p ${OPENLANE_STAGING_A}/sky130_osu_sc_t18
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400649 rm -f ${OPENLANE_STAGING_A}/common_pdn.info
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400650 rm -f ${OPENLANE_STAGING_A}/config.tcl
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500651 for file in ${OPENLANE_COMMON} ; do \
652 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/$$file ; \
653 done
654 for file in ${OPENLANE_COMMON} ; do \
655 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/$$file ; \
656 done
657 for file in ${OPENLANE_COMMON} ; do \
658 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/$$file ; \
659 done
660 for file in ${OPENLANE_COMMON} ; do \
661 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/$$file ; \
662 done
663 for file in ${OPENLANE_COMMON} ; do \
664 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/$$file ; \
665 done
666 for file in ${OPENLANE_COMMON} ; do \
667 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/$$file ; \
668 done
669 for file in ${OPENLANE_COMMON} ; do \
670 rm -f ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/$$file ; \
671 done
672
Ahmed Ghazy5fd61d22020-11-24 21:44:28 +0200673 cp -r openlane/custom_cells ${OPENLANE_STAGING_A}
Tim Edwards9134eed2021-02-13 14:42:59 -0500674 ${CPP} ${SKY130A_DEFS} openlane/common_pdn.tcl ${OPENLANE_STAGING_A}/common_pdn.tcl
675 ${CPP} ${SKY130A_DEFS} openlane/config.tcl ${OPENLANE_STAGING_A}/config.tcl
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500676
677 for file in ${OPENLANE_COMMON} ; do \
Tim Edwards9134eed2021-02-13 14:42:59 -0500678 ${CPP} -quiet ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/$$file \
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500679 ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/$$file ; \
680 done
681 for file in ${OPENLANE_COMMON} ; do \
Tim Edwards9134eed2021-02-13 14:42:59 -0500682 ${CPP} -quiet ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/$$file \
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500683 ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/$$file ; \
684 done
685 for file in ${OPENLANE_COMMON} ; do \
Tim Edwards9134eed2021-02-13 14:42:59 -0500686 ${CPP} -quiet ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/$$file \
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500687 ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/$$file ; \
688 done
689 for file in ${OPENLANE_COMMON} ; do \
Tim Edwards9134eed2021-02-13 14:42:59 -0500690 ${CPP} -quiet ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/$$file \
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500691 ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/$$file ; \
692 done
693 for file in ${OPENLANE_COMMON} ; do \
Tim Edwards9134eed2021-02-13 14:42:59 -0500694 ${CPP} -quiet ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/$$file \
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500695 ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/$$file ; \
696 done
697 for file in ${OPENLANE_COMMON} ; do \
Tim Edwards9134eed2021-02-13 14:42:59 -0500698 ${CPP} -quiet ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/$$file \
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500699 ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/$$file ; \
700 done
701
Tim Edwards9134eed2021-02-13 14:42:59 -0500702 ${CPP} -quiet ${SKY130A_DEFS} openlane/sky130_osu_sc_t18/config.tcl \
703 ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/config.tcl
704 ${CPP} -quiet ${SKY130A_DEFS} openlane/sky130_osu_sc_t18/tracks.info \
705 ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/tracks.info
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400706
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400707vendor-a: primitive-a io-a digital-a alpha-a sram-a osu-base-a osu-t12-a osu-t15-a osu-t18-a
708
709primitive-a:
Tim Edwards106e38b2020-09-20 13:07:54 -0400710 # Install device subcircuits from vendor files
Tim Edwards6ee11532021-02-11 12:29:33 -0500711 ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards995c1332020-09-25 15:33:58 -0400712 -ngspice sky130_fd_pr/latest/models/* \
713 filter=custom/scripts/rename_models.py \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200714 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400715 # Install base device library from vendor files
Tim Edwards6ee11532021-02-11 12:29:33 -0500716 ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards106e38b2020-09-20 13:07:54 -0400717 -gds %l/latest/cells/*/*.gds compile-only \
Tim Edwardsb6e8c7e2021-03-30 12:20:15 -0400718 options=custom/scripts/gds_import_setup.tcl \
Tim Edwards106e38b2020-09-20 13:07:54 -0400719 -cdl %l/latest/cells/*/*.cdl compile-only \
720 -lef %l/latest/cells/*/*.magic.lef compile-only \
Tim Edwardsbfc82692020-09-20 21:33:08 -0400721 -spice %l/latest/cells/*/*.spice filter=custom/scripts/rename_cells.py \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200722 -library primitive sky130_fd_pr 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwardse60b4862020-11-23 16:56:52 -0500723 # Custom: Add "short" resistor model and subcircuit to the r+c models file
Tim Edwards42f79a32020-09-21 14:18:09 -0400724 cat ./custom/models/short.spice >> \
agorararmard3ee5f112021-02-03 19:49:09 +0200725 ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
Tim Edwardse60b4862020-11-23 16:56:52 -0500726 # Custom: Add diodes as subcircuits to the r+c models file
727 cat ./custom/models/diode.spice >> \
agorararmard3ee5f112021-02-03 19:49:09 +0200728 ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
Tim Edwardsf63ee052021-04-29 15:13:45 -0400729 # Custom: Add resistors as subcircuits to the r+c models file
730 cat ./custom/models/resistor.spice >> \
731 ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
Tim Edwardse60b4862020-11-23 16:56:52 -0500732
Tim Edwards9134eed2021-02-13 14:42:59 -0500733 # Custom: Patch the models to work around ngspice issue with the relative
734 # order of the "nf" and "mult" parameters.
Tim Edwards25972f82021-04-27 21:45:58 -0400735 patch -p4 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/${PR_SPICE} \
Tim Edwards9134eed2021-02-13 14:42:59 -0500736 < custom/patches/sky130_fd_pr.patch \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200737 2>&1 | tee -a ${SKY130A}_make.log || true
Tim Edwards25972f82021-04-27 21:45:58 -0400738 patch -p1 -f -d ${STAGING_PATH}/${SKY130A} \
739 < custom/patches/sky130_fd_pr_2.patch \
740 2>&1 | tee -a ${SKY130A}_make.log || true
Tim Edwardsb06f0f22021-04-27 22:28:51 -0400741 # Custom: Patch the models to remove the substrate pin from the PNP
742 # device, which has no independent substrate pin (collector=substrate)
743 patch -p4 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/${PR_SPICE} \
744 < custom/patches/sky130_fd_pr_3.patch \
745 2>&1 | tee -a ${SKY130A}_make.log || true
Tim Edwardsf63ee052021-04-29 15:13:45 -0400746 # Custom: Patch the ngspice models to add the HV diffusion resistor subcircuits
747 patch -p2 -f -d ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice \
748 < custom/patches/sky130_fd_pr_5.patch \
749 2>&1 | tee -a ${SKY130A}_make.log || true
Tim Edwards9fdf5f02021-05-03 16:15:03 -0400750 # Custom: Parse the (commented out) statistics blocks and generate
751 # ngspice-compatible monte carlo parameters for mismatch and process
752 # (currently under test)
753 # ./custom/scripts/mismatch_params.py \
754 # 2>&1 | tee -a ${SKY130A}_make.log || true
755 # ./custom/scripts/mismatch_params.py \
756 # ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice \
757 # 2>&1 | tee -a ${SKY130A}_make.log || true
758 # ./custom/scripts/process_params.py \
759 # 2>&1 | tee -a ${SKY130A}_make.log || true
760
Tim Edwards10aa9ab2021-03-15 17:46:29 -0400761 # Custom: Add "spinit" file
762 cat ./custom/models/spinit >> \
763 ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/spinit
764
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400765io-a:
Ahmed Ghazy59370ab2020-10-29 02:04:45 +0200766 # Install custom additions to I/O pad library
767 ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
768 -verilog %l/verilog/*.v \
769 -cdl %l/cdl/*.cdl \
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400770 -spice %l/spice/*.spice \
Tim Edwardsb6e8c7e2021-03-30 12:20:15 -0400771 -gds %l/gds/*.gds options=custom/scripts/gds_import_setup.tcl \
Ahmed Ghazy59370ab2020-10-29 02:04:45 +0200772 -lef %l/lef/*.lef compile-only rename=sky130_ef_io \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200773 -library general sky130_fd_io 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400774 # Install SkyWater I/O pad library
Tim Edwards6ee11532021-02-11 12:29:33 -0500775 ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards1134fbc2020-10-12 22:35:42 -0400776 -spice %l/latest/cells/*/*.spice compile-only \
777 sort=custom/scripts/sort_pdkfiles.py \
778 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
779 sort=custom/scripts/sort_pdkfiles.py \
780 -lef %l/latest/cells/*/*.magic.lef compile-only \
781 sort=custom/scripts/sort_pdkfiles.py \
782 -doc %l/latest/cells/*/*.pdf \
783 -lib %l/latest/timing/*.lib \
784 -gds %l/latest/cells/*/*.gds compile-only \
785 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards26ab4962021-01-03 14:22:54 -0500786 options=custom/scripts/sky130_fd_io_import.tcl \
Tim Edwards1134fbc2020-10-12 22:35:42 -0400787 -verilog %l/latest/cells/*/*.*.v \
788 -verilog %l/latest/cells/*/*.v exclude=*.*.v \
789 compile-only filter=custom/scripts/inc_verilog.py \
790 sort=custom/scripts/sort_pdkfiles.py \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200791 -library general sky130_fd_io 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwards1134fbc2020-10-12 22:35:42 -0400792 # Remove the base verilog files which have already been included into
793 # the libraries
Tim Edwards25972f82021-04-27 21:45:58 -0400794 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${IO_VERILOG}/*.*.v
Ahmed Ghazy5fd61d22020-11-24 21:44:28 +0200795 # Install custom additions to standard cell libraries
796 ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
Tim Edwardsb6e8c7e2021-03-30 12:20:15 -0400797 -gds %l/gds/*.gds options=custom/scripts/gds_import_setup.tcl \
Ahmed Ghazy5fd61d22020-11-24 21:44:28 +0200798 -lef %l/lef/*.lef \
Tim Edwardsbb8ab292021-01-22 10:19:40 -0500799 -verilog %l/verilog/*.v \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200800 -library digital sky130_fd_sc_hd 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwardsd14571f2021-01-06 14:49:27 -0500801 # Add a maskhint set for the GPIO pad .mag view to prevent problems writing
802 # when writing HVI to GDS during hierarchical adjustments.
803 ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io__top_gpiov2 \
804 "MASKHINTS_HVI 1346 17198 5828 19224 13700 1890 15920 2360 24 17522 1778 20612" -mag
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400805
806digital-a:
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200807 # Install all SkyWater digital standard cells.
Tim Edwards6ee11532021-02-11 12:29:33 -0500808 ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400809 -techlef %l/latest/tech/*.tlef \
810 -spice %l/latest/cells/*/*.spice compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400811 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400812 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400813 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards106e38b2020-09-20 13:07:54 -0400814 -lef %l/latest/cells/*/*.magic.lef compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400815 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400816 -doc %l/latest/cells/*/*.pdf \
817 -lib %l/latest/timing/*.lib \
818 -gds %l/latest/cells/*/*.gds compile-only \
Tim Edwardsb6e8c7e2021-03-30 12:20:15 -0400819 options=custom/scripts/gds_import_setup.tcl \
Tim Edwards995c1332020-09-25 15:33:58 -0400820 sort=custom/scripts/sort_pdkfiles.py \
821 -verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
822 rename=primitives filter=custom/scripts/inc_verilog.py \
823 sort=custom/scripts/sort_pdkfiles.py \
824 -verilog %l/latest/cells/*/*.*.v \
825 -verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
826 compile-only filter=custom/scripts/inc_verilog.py \
827 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400828 -library digital sky130_fd_sc_hd \
829 -library digital sky130_fd_sc_hdll \
830 -library digital sky130_fd_sc_hvl \
831 -library digital sky130_fd_sc_hs \
832 -library digital sky130_fd_sc_ls \
833 -library digital sky130_fd_sc_ms \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200834 -library digital sky130_fd_sc_lp 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwards16a9caa2021-01-08 13:10:06 -0500835 # Add a maskhint set for the tap cell .ag view to prevent problems writing
836 # when writing NSDM and PSDM to GDS during hierarchical adjustments.
837 ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_sc_hd sky130_fd_sc_hd__tapvpwrvgnd_1 \
838 "MASKHINTS_PSDM 0 38 92 196" -mag
839 ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_sc_hd sky130_fd_sc_hd__tapvpwrvgnd_1 \
840 "MASKHINTS_NSDM 0 280 92 506" -mag
Tim Edwards995c1332020-09-25 15:33:58 -0400841 # Remove the base verilog files which have already been included into
842 # the libraries
Tim Edwards25972f82021-04-27 21:45:58 -0400843 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${HD_VERILOG}/*.*.v
844 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${HDLL_VERILOG}/*.*.v
845 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${HVL_VERILOG}/*.*.v
846 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${HS_VERILOG}/*.*.v
847 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${MS_VERILOG}/*.*.v
848 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${LS_VERILOG}/*.*.v
849 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${LP_VERILOG}/*.*.v
Ahmed Ghazy7875f1e2021-01-19 18:15:30 +0200850 # Apply extra PDK patches until they get fixed properly in the source
Tim Edwards25972f82021-04-27 21:45:58 -0400851 patch -p1 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/${HD_TECHLEF} \
Tim Edwards9134eed2021-02-13 14:42:59 -0500852 < custom/patches/hd_minenclosed.squeaky.patch \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200853 2>&1 | tee -a ${SKY130A}_make.log || true
Tim Edwards25972f82021-04-27 21:45:58 -0400854 patch -p1 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/${HDLL_TECHLEF} \
Tim Edwards9134eed2021-02-13 14:42:59 -0500855 < custom/patches/hdll_minenclosed.squeaky.patch \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200856 2>&1 | tee -a ${SKY130A}_make.log || true
Tim Edwardsf63ee052021-04-29 15:13:45 -0400857 # Custom: Patch the HVL library to correct the resistor device names
858 patch -p3 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/${HVL_SPICE} \
859 < custom/patches/sky130_fd_pr_4.patch \
860 2>&1 | tee -a ${SKY130A}_make.log || true
861 patch -p3 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/${HVL_CDL} \
862 < custom/patches/sky130_fd_pr_6.patch \
863 2>&1 | tee -a ${SKY130A}_make.log || true
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400864
865alpha-a:
Tim Edwardsbcf59aa2020-12-17 16:55:13 -0500866 # Install alphanumeric library.
Tim Edwards1168a8b2021-02-10 22:06:54 -0500867 ${STAGE} -source ${ALPHA_PATH}/.. -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards88bd42e2020-12-18 15:29:48 -0500868 -mag %l/mag/*.mag filter=custom/scripts/text2m5.py \
Mohamed Gaber28e86d72021-02-23 08:34:03 +0200869 -library general sky130_ml_xx_hd 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400870 # Install text2mag.py script for alphanumeric library
Tim Edwards25972f82021-04-27 21:45:58 -0400871 mkdir -p ${STAGING_PATH}/${SKY130A}/libs.ref/${MLXX_SCRIPTS}
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400872 cp custom/scripts/text2mag.py \
Tim Edwards25972f82021-04-27 21:45:58 -0400873 ${STAGING_PATH}/${SKY130A}/libs.ref/${MLXX_SCRIPTS}
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400874
875sram-a:
Tim Edwards8b96a1b2021-04-27 15:16:26 -0400876 # Install SRAM library. NOTE: SRAM macros share some of the same
877 # cell names, so use special option script gds_import_sram.tcl
Tim Edwardscfe970c2021-02-26 14:35:51 -0500878 ${STAGE} -source ${SRAM_PATH}/.. -target ${STAGING_PATH}/${SKY130A} \
879 -lef %l/*/*.lef \
880 -lib %l/*/*.lib \
Tim Edwards8b96a1b2021-04-27 15:16:26 -0400881 -gds %l/*/*.gds options=custom/scripts/gds_import_sram.tcl \
Tim Edwardscfe970c2021-02-26 14:35:51 -0500882 -spice %l/*/sky130_sram_1kbyte_1rw1r_32x256_8.lvs.sp \
883 rename=sky130_sram_1kbyte_1rw1r_32x256_8.spice \
884 -spice %l/*/sky130_sram_2kbyte_1rw1r_32x512_8.lvs.sp \
885 rename=sky130_sram_2kbyte_1rw1r_32x512_8.spice \
886 -spice %l/*/sky130_sram_4kbyte_1rw1r_32x1024_8.lvs.sp \
887 rename=sky130_sram_4kbyte_1rw1r_32x1024_8.spice \
888 -spice %l/*/sram_1rw1r_32_256_8_sky130.lvs.sp \
889 rename=sram_1rw1r_32_256_8_sky130.spice \
890 -verilog %l/*/*.v \
891 -library general sky130_sram_macros 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400892
893osu-base-a:
Tristan Gingolda5854312020-10-15 18:28:16 +0200894 # Install OSU digital standard cells.
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400895 ${STAGE} -source ${OSU_PATH} -target ${STAGING_PATH}/${SKY130A} \
896 -techlef %l/tech/sky130_osu_sc.lef rename=sky130_osu_sc.tlef \
Tristan Gingolda5854312020-10-15 18:28:16 +0200897 -cdl %l/latest/cdl/*.cdl ignore=topography compile-only \
898 -lef %l/latest/lef/*.lef compile-only \
899 -lib %l/latest/lib/*.lib \
900 -gds %l/latest/gds/*.gds compile-only \
Tim Edwardsb6e8c7e2021-03-30 12:20:15 -0400901 options=custom/scripts/gds_import_setup.tcl \
Tim Edwardscdfec5e2021-04-22 20:59:13 -0400902 -library digital sky130_osu_sc 2>&1 | tee -a ${SKY130A}_make.log
903
904osu-t12-a:
905 # Install OSU T12 hs digital standard cells.
906 ${STAGE} -source ${OSU_T12_PATH} -target ${STAGING_PATH}/${SKY130A} \
907 -techlef sky130_osu_sc_12T.tlef rename=sky130_osc_sc_12t_hs.tlef \
908 -spice 12T_hs/cdl/*.spice compile-only exclude=*.*.spice \
909 -lef 12T_hs/lef/*.lef \
910 -lib 12T_hs/lib/*.lib \
911 -gds 12T_hs/gds/*.gds compile-only \
912 options=custom/scripts/gds_import_setup.tcl \
913 -library digital sky130_osu_sc_12t_hs 2>&1 | tee -a ${SKY130A}_make.log
914 # Install OSU T12 ms digital standard cells.
915 ${STAGE} -source ${OSU_T12_PATH} -target ${STAGING_PATH}/${SKY130A} \
916 -techlef sky130_osu_sc_12T.tlef rename=sky130_osc_sc_12t_ms.tlef \
917 -spice 12T_ms/cdl/*.spice compile-only exclude=*.*.spice \
918 -lef 12T_ms/lef/*.lef \
919 -lib 12T_ms/lib/*.lib \
920 -gds 12T_ms/gds/*.gds compile-only \
921 options=custom/scripts/gds_import_setup.tcl \
922 -library digital sky130_osu_sc_12t_ms 2>&1 | tee -a ${SKY130A}_make.log
923 # Install OSU T12 ls digital standard cells.
924 ${STAGE} -source ${OSU_T12_PATH} -target ${STAGING_PATH}/${SKY130A} \
925 -techlef sky130_osu_sc_12T.tlef rename=sky130_osc_sc_12t_ls.tlef \
926 -spice 12T_ls/cdl/*.spice compile-only exclude=*.*.spice \
927 -lef 12T_ls/lef/*.lef \
928 -lib 12T_ls/lib/*.lib \
929 -gds 12T_ls/gds/*.gds compile-only \
930 options=custom/scripts/gds_import_setup.tcl \
931 -library digital sky130_osu_sc_12t_ls 2>&1 | tee -a ${SKY130A}_make.log
932
933osu-t15-a:
934 # Install OSU T15 hs digital standard cells.
935 ${STAGE} -source ${OSU_T15_PATH} -target ${STAGING_PATH}/${SKY130A} \
936 -techlef sky130_osu_sc_15T.tlef rename=sky130_osc_sc_15t_hs.tlef \
937 -spice 15T_hs/cdl/*.spice compile-only exclude=*.*.spice \
938 -lef 15T_hs/lef/*.lef \
939 -lib 15T_hs/lib/*.lib \
940 -gds 15T_hs/gds/*.gds compile-only \
941 options=custom/scripts/gds_import_setup.tcl \
942 -library digital sky130_osu_sc_15t_hs 2>&1 | tee -a ${SKY130A}_make.log
943 # Install OSU T15 ms digital standard cells.
944 ${STAGE} -source ${OSU_T15_PATH} -target ${STAGING_PATH}/${SKY130A} \
945 -techlef sky130_osu_sc_15T.tlef rename=sky130_osc_sc_15t_ms.tlef \
946 -spice 15T_ms/cdl/*.spice compile-only exclude=*.*.spice \
947 -lef 15T_ms/lef/*.lef \
948 -lib 15T_ms/lib/*.lib \
949 -gds 15T_ms/gds/*.gds compile-only \
950 options=custom/scripts/gds_import_setup.tcl \
951 -library digital sky130_osu_sc_15t_ms 2>&1 | tee -a ${SKY130A}_make.log
952 # Install OSU T15 ls digital standard cells.
953 ${STAGE} -source ${OSU_T15_PATH} -target ${STAGING_PATH}/${SKY130A} \
954 -techlef sky130_osu_sc_15T.tlef rename=sky130_osc_sc_15t_ls.tlef \
955 -spice 15T_ls/cdl/*.spice compile-only exclude=*.*.spice \
956 -lef 15T_ls/lef/*.lef \
957 -lib 15T_ls/lib/*.lib \
958 -gds 15T_ls/gds/*.gds compile-only \
959 options=custom/scripts/gds_import_setup.tcl \
960 -library digital sky130_osu_sc_15t_ls 2>&1 | tee -a ${SKY130A}_make.log
961
962osu-t18-a:
963 # Install OSU T18 hs digital standard cells.
964 ${STAGE} -source ${OSU_T18_PATH} -target ${STAGING_PATH}/${SKY130A} \
965 -techlef sky130_osu_sc_18T.tlef rename=sky130_osc_sc_18t_hs.tlef \
966 -spice 18T_hs/cdl/*.spice compile-only exclude=*.*.spice \
967 -lef 18T_hs/lef/*.lef \
968 -lib 18T_hs/lib/*.lib \
969 -gds 18T_hs/gds/*.gds compile-only \
970 options=custom/scripts/gds_import_setup.tcl \
971 -library digital sky130_osu_sc_18t_hs 2>&1 | tee -a ${SKY130A}_make.log
972 # Install OSU T18 ms digital standard cells.
973 ${STAGE} -source ${OSU_T18_PATH} -target ${STAGING_PATH}/${SKY130A} \
974 -techlef sky130_osu_sc_18T.tlef rename=sky130_osc_sc_18t_ms.tlef \
975 -spice 18T_ms/cdl/*.spice compile-only exclude=*.*.spice \
976 -lef 18T_ms/lef/*.lef \
977 -lib 18T_ms/lib/*.lib \
978 -gds 18T_ms/gds/*.gds compile-only \
979 options=custom/scripts/gds_import_setup.tcl \
980 -library digital sky130_osu_sc_18t_ms 2>&1 | tee -a ${SKY130A}_make.log
981 # Install OSU T18 ls digital standard cells.
982 ${STAGE} -source ${OSU_T18_PATH} -target ${STAGING_PATH}/${SKY130A} \
983 -techlef sky130_osu_sc_18T.tlef rename=sky130_osc_sc_18t_ls.tlef \
984 -spice 18T_ls/cdl/*.spice compile-only exclude=*.*.spice \
985 -lef 18T_ls/lef/*.lef \
986 -lib 18T_ls/lib/*.lib \
987 -gds 18T_ls/gds/*.gds compile-only \
988 options=custom/scripts/gds_import_setup.tcl \
989 -library digital sky130_osu_sc_18t_ls 2>&1 | tee -a ${SKY130A}_make.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400990
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400991install:
Ahmed Ghazyf45cbf32020-08-08 17:11:53 +0200992 if test "x${DIST_PATH}" == "x" ; then \
993 ${MAKE} install-local ; \
994 else \
995 ${MAKE} install-dist; \
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400996 fi
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400997
998install-local: install-local-a
999
1000install-local-a:
Tim Edwards9134eed2021-02-13 14:42:59 -05001001 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_install.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001002 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
1003 -target ${LOCAL_PATH}/${SKY130A} \
Tim Edwardsb184e852020-12-04 15:30:05 -05001004 -variable PDKPATH \
Mohamed Gaber28e86d72021-02-23 08:34:03 +02001005 -link_from ${LINK_TARGETS} 2>&1 | tee -a ${SKY130A}_install.log
Tim Edwards9134eed2021-02-13 14:42:59 -05001006 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_install.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001007
1008install-dist: install-dist-a
1009
1010install-dist-a:
Tim Edwards9134eed2021-02-13 14:42:59 -05001011 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_install.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001012 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
1013 -target ${DIST_PATH}/${SKY130A} \
Tim Edwardsb184e852020-12-04 15:30:05 -05001014 -variable PDKPATH \
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001015 -local ${LOCAL_PATH}/${SKY130A} \
Mohamed Gaber28e86d72021-02-23 08:34:03 +02001016 -link_from ${DIST_LINK_TARGETS} 2>&1 | tee -a ${SKY130A}_install.log
Tim Edwards9134eed2021-02-13 14:42:59 -05001017 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_install.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001018
Tim Edwards8830dfe2021-02-25 11:29:59 -05001019uninstall:
1020 if test "x${DIST_PATH}" == "x" ; then \
1021 ${MAKE} uninstall-local ; \
1022 else \
1023 ${MAKE} uninstall-dist; \
1024 fi
1025
1026uninstall-local: uninstall-local-a
1027
1028uninstall-local-a:
1029 echo "Uninstalling SKY130 PDK from ${LOCAL_PATH}"
1030 if test "x${LOCAL_PATH}" != "x" ; then \
1031 ${RM} -rf ${LOCAL_PATH}/${SKY130A} ; \
1032 fi
1033 echo "Finished SKY130 PDK uninstall"
1034
1035uninstall-dist: uninstall-dist-a
1036
1037uninstall-dist-a:
1038 echo "Uninstalling SKY130 PDK from ${DIST_PATH}"
1039 if test "x${DIST_PATH}" != "x" ; then \
1040 ${RM} -rf ${DIST_PATH}/${SKY130A} ; \
1041 fi
1042 echo "Finished SKY130 PDK uninstall"
1043
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001044clean: clean-a
1045
1046clean-a:
1047 ${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean
1048
1049veryclean: veryclean-a
1050
1051veryclean-a: clean-a
Tim Edwards9134eed2021-02-13 14:42:59 -05001052 ${RM} ${SKY130A}_make.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001053 ${RM} ${SKY130A}_install.log
Tim Edwards9134eed2021-02-13 14:42:59 -05001054 # Legacy name
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001055 ${RM} ${SKY130A}_migrate.log
Tim Edwards6ee11532021-02-11 12:29:33 -05001056