blob: f07db8f0e498e1268186b7d8d300c03361594b6b [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 Edwards7cbaaba2020-08-05 12:19:18 -040017# --with-sky130-source-path=<path>
18# where <path> is the location of the Google/Skywater repository
19# cloned from https://github.com/google/skywater-pdk. This
20# option is mandatory and has no default.
21#
22# --with-sky130-local-path=<path>
23# where <path> is the run-time location of the installed PDK
24# files generated by open_pdks. This option is mandatory and
25# has no default.
26#
27# --with-sky130-dist-path=<path>
28# where <path> is the install-time location of the installed
29# PDK files generated by open_pdks, with the expectation that
30# <path> is something like a git repository that is then
31# distributed across a system. If this option is not specified,
32# then files are installed to the local path.
33#
34# --with-sky130-link-targets=<value>
35# where <value> is one of "none" or "source". If set to "source",
36# then where possible, the installed files are symbolic links
37# back to the source, rather than copies of the source. The
38# default value is "none" if the option is not specified.
39#
40# --with-ef-style
41# If specified, then the installation uses the efabless style,
42# which swaps the file hierarchy of file formats vs. IP libraries;
43# e.g., "gds/sky130_fd_sc_hd/" with ef-style, vs.
44# "sky130_fd_sc_hd/gds/" without it.
45#
46# The variables below are substituted from the configuration options:
47#
48# SKYWATER_PATH: points to vendor sources
Tim Edwards55f4d0e2020-07-05 15:41:02 -040049# EF_STYLE: 1 for efabless style, 0 otherwise
50# LINK_TARGETS: link back to source or link to 1st PDK when possible
51# DIST_PATH: install location for distributed install
52# LOCAL_PATH: install location for local install or runtime location
53# for distributed install
54#
55# Run "make" to stage the PDK for tool setup and vendor libraries
Tim Edwards55f4d0e2020-07-05 15:41:02 -040056#
Tim Edwards7cbaaba2020-08-05 12:19:18 -040057# Run "make install" to install all staged files. The installation is
58# either local or distributed, depending on whether --with-sky130-dist-path
59# has been set when running configure.
Tim Edwards55f4d0e2020-07-05 15:41:02 -040060#
61# Run "make clean" to remove all staging files.
62#
63# Run "make veryclean" to remove all staging and install log files.
64#
Tim Edwards7cbaaba2020-08-05 12:19:18 -040065# For the sake of simplicity, the "standard" installation can be done
Tim Edwards55f4d0e2020-07-05 15:41:02 -040066# with the usual
67#
68# make
69# make install
70# make clean
71#
72#--------------------------------------------------------------------
73# This Makefile contains bash-isms
74SHELL = bash
Tristan Gingolda5854312020-10-15 18:28:16 +020075MV = mv
Tim Edwards55f4d0e2020-07-05 15:41:02 -040076
Tim Edwardsc3baf462020-11-16 12:40:24 -050077REVISION = `git describe --long`
Tim Edwards55f4d0e2020-07-05 15:41:02 -040078TECH = sky130
79
80# If EF_STYLE is set to 1, then efabless naming conventions are
81# used, otherwise the generic naming conventions are used.
82# Mainly, the hierarchy of library names and file types is reversed
83# (e.g., sky130_fd_sc_hd/lef vs. lef/sky130_fd_sc_hd).
84
Tim Edwards7cbaaba2020-08-05 12:19:18 -040085# EF_STYLE = 0 | 1
86EF_STYLE = @EF_STYLE@
Tim Edwards55f4d0e2020-07-05 15:41:02 -040087
88# Normally it's fine to keep the staging path in a local directory,
89# although /tmp or a dedicated staging area are also fine, as long
90# as the install process can write to the path.
91
92STAGING_PATH = `pwd`
93
94# If LINK_TARGETS is set to "none", then files are copied
95# from the SkyWater sources to the target. If set to "source",
96# symbolic links are made in the target directories pointing
97# back to the SkyWater sources. If set to the name of another
98# PDK (e.g, "sky130A"), then symbolic links are made to the
99# same files in that PDK, where they exist, and are copied
100# from source, where they don't.
101
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400102# LINK_TARGETS = source | none | sky130A
103LINK_TARGETS = @SKY130_LINK_TARGETS@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400104
105# Paths:
106
107# Path to skywater_pdk (to be changed to public repo; work in progress)
108# Version below comes from foss-eda-tools.googlesource.com
109# SKYWATER_PATH = ~/gits/skywater-pdk-scratch/skywater-pdk/libraries
110# Version below is also from foss-eda-tools and is more recent than
111# the scratch repo above.
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400112SKYWATER_PATH = @SKY130_SOURCE_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400113
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400114# Path to OSU standard cell library sources (to be added to configuration options).
Tim Edwards31a2adf2020-07-07 21:47:30 -0400115OSU_PATH = ~/gits/osu_130_pdk
116
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400117# NOTE: Install destination is the git repository of the technology platform.
118# Once updated in git, the git project can be distributed to all hosts.
119#
120ifeq (${EF_STYLE}, 1)
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400121 LOCAL_PATH = @SKY130_LOCAL_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400122 CONFIG_DIR = .ef-config
123 REV_DIR = ${REVISION}
124else
125 # LOCAL_PATH = /usr/local/share/vlsi/SkyWater
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400126 LOCAL_PATH = @SKY130_LOCAL_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400127 CONFIG_DIR = .config
128 REV_DIR = .
129endif
130
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400131# DIST_PATH = ~/gits/ef-skywater-${TECH}
132DIST_PATH = @SKY130_DIST_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400133
134# EF process nodes created from the master sources
135SKY130A = sky130A
136
137ifeq (${LINK_TARGETS}, ${SKY130A})
138 DIST_LINK_TARGETS = ${LOCAL_PATH}/${LINK_TARGETS}
139else
140 DIST_LINK_TARGETS = ${LINK_TARGETS}
141endif
142
143# Basic definitions for each EF process node
144SKY130A_DEFS = -DTECHNAME=sky130A -DREVISION=${REVISION}
145
146# Module definitions for each process node
147# (Note that MOS is default and therefore not used anywhere)
Tim Edwards0a0272b2020-07-28 14:40:10 -0400148SKY130A_DEFS += -DMETAL5 -DMIM -DREDISTRIBUTION
149# SKY130A_DEFS += -DMETAL5 -DMIM
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400150
151# Add staging path
152SKY130A_DEFS += -DSTAGING_PATH=${STAGING_PATH}
153
154ifeq (${EF_STYLE}, 1)
155 EF_FORMAT = -ef_format
156 SKY130A_DEFS += -DEF_FORMAT
157else
158 EF_FORMAT = -std_format
159endif
160
161MAGICTOP = libs.tech/magic
162NETGENTOP = libs.tech/netgen
163QFLOWTOP = libs.tech/qflow
164KLAYOUTTOP = libs.tech/klayout
165OPENLANETOP = libs.tech/openlane
166
167ifeq (${EF_STYLE}, 1)
168 MAGICPATH = ${MAGICTOP}/${REVISION}
169else
170 MAGICPATH = ${MAGICTOP}
171endif
172
173# Currently, netgen, qflow, and klayout do not use revisioning (needs to change!)
174NETGENPATH = ${NETGENTOP}
175QFLOWPATH = ${QFLOWTOP}
176KLAYOUTPATH = ${KLAYOUTTOP}
177OPENLANEPATH = ${OPENLANETOP}
178
179MAGICTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICTOP}
180NETGENTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENTOP}
181QFLOWTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWTOP}
182KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTTOP}
183OPENLANETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANETOP}
184
185MAGIC_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICPATH}
186NETGEN_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENPATH}
187QFLOW_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWPATH}
188KLAYOUT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTPATH}
189OPENLANE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANEPATH}
190
191SKY130A_DEFS += -DMAGIC_CURRENT=${MAGICTOP}/current
192
193# Where cpp syntax is followed, this is equivalent to cpp, but it does not
194# mangle non-C source files under the belief that they are actually C code.
195CPP = ../common/preproc.py
196
197# The following script in the ../common directory does most of the work of
198# copying or linking the foundry vendor files to the target directory.
199STAGE = set -f ; ../common/foundry_install.py ${EF_FORMAT}
200INSTALL = ../common/staging_install.py ${EF_FORMAT}
201
202# The script(s) below are used for custom changes to the vendor PDK files
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200203ADDPROP = ../common/insert_property.py ${EF_FORMAT}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400204
205# List the EDA tools to install local setup files for
206TOOLS = magic qflow netgen klayout openlane
207
208all: all-a
209
210all-a:
211 echo "Starting sky130A PDK staging on "`date` > ${SKY130A}_install.log
212 ${MAKE} tools-a
213 ${MAKE} vendor-a
214 echo "Ended sky130A PDK staging on "`date` >> ${SKY130A}_install.log
215
216tools-a: general-a magic-a qflow-a netgen-a klayout-a openlane-a
217
218general-a: ${TECH}.json
219 mkdir -p ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}
220 rm -f ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json
221 ${CPP} ${SKY130A_DEFS} ${TECH}.json > \
222 ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json
223
Tim Edwards5778c232020-07-07 16:57:52 -0400224magic-a: magic/${TECH}.tech magic/${TECH}gds.tech magic/${TECH}.magicrc magic/${TECH}.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400225 mkdir -p ${MAGICTOP_STAGING_A}
226 mkdir -p ${MAGIC_STAGING_A}
227 rm -f ${MAGICTOP_STAGING_A}/current
228 rm -f ${MAGIC_STAGING_A}/${SKY130A}.tech
229 rm -f ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech
230 rm -f ${MAGIC_STAGING_A}/${SKY130A}.tcl
231 rm -f ${MAGIC_STAGING_A}/${SKY130A}-BindKeys
232 rm -f ${MAGIC_STAGING_A}/magicrc
233 (cd ${MAGICTOP_STAGING_A} ; ln -s ${REV_DIR} current)
234 cp -rp custom/scripts/seal_ring_generator ${MAGIC_STAGING_A}/.
Tim Edwards5778c232020-07-07 16:57:52 -0400235 ${CPP} ${SKY130A_DEFS} magic/${TECH}.tech > ${MAGIC_STAGING_A}/${SKY130A}.tech
236 ${CPP} ${SKY130A_DEFS} magic/${TECH}gds.tech > ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech
237 ${CPP} ${SKY130A_DEFS} magic/${TECH}.magicrc > ${MAGIC_STAGING_A}/${SKY130A}.magicrc
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400238 ${CPP} ${SKY130A_DEFS} ../common/pdk.bindkeys > ${MAGIC_STAGING_A}/${SKY130A}-BindKeys
Tim Edwards5778c232020-07-07 16:57:52 -0400239 ${CPP} ${SKY130A_DEFS} magic/${TECH}.tcl > ${MAGIC_STAGING_A}/${SKY130A}.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400240 ${CPP} ${SKY130A_DEFS} ../common/pdk.tcl >> ${MAGIC_STAGING_A}/${SKY130A}.tcl
241
Tim Edwards5778c232020-07-07 16:57:52 -0400242qflow-a: qflow/${TECH}.sh qflow/${TECH}.par
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400243 mkdir -p ${QFLOWTOP_STAGING_A}
244 mkdir -p ${QFLOW_STAGING_A}
245 rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.sh
246 rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.par
247 rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.sh
248 rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.par
249 rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.sh
250 rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.par
251 rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.sh
252 rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.par
253 rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.sh
254 rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.par
255 rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.sh
256 rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.par
257 rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.sh
258 rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.par
Tim Edwards7ec76972020-07-07 21:56:08 -0400259 rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.sh
260 rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.par
Tim Edwards5778c232020-07-07 16:57:52 -0400261 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hd qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400262 ${QFLOW_STAGING_A}/${SKY130A}hd.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400263 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hdll qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400264 ${QFLOW_STAGING_A}/${SKY130A}hdll.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400265 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hvl qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400266 ${QFLOW_STAGING_A}/${SKY130A}hvl.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400267 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hs qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400268 ${QFLOW_STAGING_A}/${SKY130A}hs.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400269 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_lp qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400270 ${QFLOW_STAGING_A}/${SKY130A}lp.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400271 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ls qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400272 ${QFLOW_STAGING_A}/${SKY130A}ls.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400273 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ms qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400274 ${QFLOW_STAGING_A}/${SKY130A}ms.sh
Tristan Gingolda5854312020-10-15 18:28:16 +0200275 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_osu_sc_t18 qflow/sky130osu.sh > \
Tim Edwards7ec76972020-07-07 21:56:08 -0400276 ${QFLOW_STAGING_A}/${SKY130A}osu.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400277 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hd.par
278 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hdll.par
279 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hvl.par
280 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hs.par
281 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ms.par
282 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}lp.par
283 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ls.par
284 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}osu.par
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400285
Tim Edwards5778c232020-07-07 16:57:52 -0400286netgen-a: netgen/${TECH}_setup.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400287 mkdir -p ${NETGENTOP_STAGING_A}
288 mkdir -p ${NETGEN_STAGING_A}
289 rm -f ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
290 rm -f ${NETGEN_STAGING_A}/setup.tcl
Tim Edwards5778c232020-07-07 16:57:52 -0400291 ${CPP} ${SKY130A_DEFS} netgen/${TECH}_setup.tcl > ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400292 (cd ${NETGEN_STAGING_A} ; ln -s ${SKY130A}_setup.tcl setup.tcl)
293
Tim Edwards5778c232020-07-07 16:57:52 -0400294klayout-a: klayout/${TECH}.lyp klayout/${TECH}.lyt
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400295 mkdir -p ${KLAYOUTTOP_STAGING_A}
296 mkdir -p ${KLAYOUT_STAGING_A}
297 rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
298 rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
Tim Edwards5778c232020-07-07 16:57:52 -0400299 ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyp > ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
300 ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyt > ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400301
Tristan Gingolda5854312020-10-15 18:28:16 +0200302openlane-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 -0400303 mkdir -p ${OPENLANETOP_STAGING_A}
304 mkdir -p ${OPENLANE_STAGING_A}
Tim Edwards3c1dd9a2020-11-27 13:49:58 -0500305 rm -rf ${OPENLANE_STAGING_A}/custom_cells/*
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400306 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hd
Tim Edwards5778c232020-07-07 16:57:52 -0400307 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hs
Ahmed Ghazy8e84e5c2020-07-27 14:32:34 +0200308 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ls
309 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ms
310 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll
311 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl
Tristan Gingolda5854312020-10-15 18:28:16 +0200312 mkdir -p ${OPENLANE_STAGING_A}/sky130_osu_sc_t18
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400313 rm -f ${OPENLANE_STAGING_A}/common_pdn.info
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400314 rm -f ${OPENLANE_STAGING_A}/config.tcl
315 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl
Tim Edwards5778c232020-07-07 16:57:52 -0400316 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info
317 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells
Tim Edwards5778c232020-07-07 16:57:52 -0400318 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/config.tcl
319 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/tracks.info
320 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/no_synth.cells
Ahmed Ghazy8e84e5c2020-07-27 14:32:34 +0200321 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/config.tcl
322 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/tracks.info
323 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/no_synth.cells
324 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/config.tcl
325 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/tracks.info
326 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/no_synth.cells
327 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/config.tcl
328 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/tracks.info
329 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/no_synth.cells
330 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/config.tcl
331 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/tracks.info
332 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/no_synth.cells
Tristan Gingolda5854312020-10-15 18:28:16 +0200333 rm -f ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/config.tcl
334 rm -f ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/tracks.info
Ahmed Ghazy5fd61d22020-11-24 21:44:28 +0200335 cp -r openlane/custom_cells ${OPENLANE_STAGING_A}
Tim Edwards5778c232020-07-07 16:57:52 -0400336 ${CPP} ${SKY130A_DEFS} openlane/common_pdn.tcl > ${OPENLANE_STAGING_A}/common_pdn.tcl
337 ${CPP} ${SKY130A_DEFS} openlane/config.tcl > ${OPENLANE_STAGING_A}/config.tcl
338 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl
339 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info
340 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells
Tim Edwards5778c232020-07-07 16:57:52 -0400341 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/config.tcl
342 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/tracks.info
343 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/no_synth.cells
Ahmed Ghazy8e84e5c2020-07-27 14:32:34 +0200344 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/config.tcl
345 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/tracks.info
346 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/no_synth.cells
347 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/config.tcl
348 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/tracks.info
349 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/no_synth.cells
350 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/config.tcl
351 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/tracks.info
352 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/no_synth.cells
353 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/config.tcl
354 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/tracks.info
355 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/no_synth.cells
Tristan Gingolda5854312020-10-15 18:28:16 +0200356 ${CPP} ${SKY130A_DEFS} openlane/sky130_osu_sc_t18/config.tcl > ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/config.tcl
357 ${CPP} ${SKY130A_DEFS} openlane/sky130_osu_sc_t18/tracks.info > ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/tracks.info
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400358
359vendor-a:
agorararmard14a276b2020-10-07 20:40:48 +0200360 # Modify the LEF files to update hs and ms libraries
Tim Edwards106e38b2020-09-20 13:07:54 -0400361 # Install device subcircuits from vendor files
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400362 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards995c1332020-09-25 15:33:58 -0400363 -ngspice sky130_fd_pr/latest/models/* \
364 filter=custom/scripts/rename_models.py \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400365 |& tee -a ${SKY130A}_install.log
366 # Install base device library from vendor files
367 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards106e38b2020-09-20 13:07:54 -0400368 -gds %l/latest/cells/*/*.gds compile-only \
369 -cdl %l/latest/cells/*/*.cdl compile-only \
370 -lef %l/latest/cells/*/*.magic.lef compile-only \
Tim Edwardsbfc82692020-09-20 21:33:08 -0400371 -spice %l/latest/cells/*/*.spice filter=custom/scripts/rename_cells.py \
Tim Edwards106e38b2020-09-20 13:07:54 -0400372 -library primitive sky130_fd_pr |& tee -a ${SKY130A}_install.log
Tim Edwardse60b4862020-11-23 16:56:52 -0500373 # Custom: Add "short" resistor model and subcircuit to the r+c models file
Tim Edwards42f79a32020-09-21 14:18:09 -0400374 cat ./custom/models/short.spice >> \
375 ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
Tim Edwardse60b4862020-11-23 16:56:52 -0500376 # Custom: Add diodes as subcircuits to the r+c models file
377 cat ./custom/models/diode.spice >> \
378 ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
379
Ahmed Ghazy59370ab2020-10-29 02:04:45 +0200380 # Install custom additions to I/O pad library
381 ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
382 -verilog %l/verilog/*.v \
383 -cdl %l/cdl/*.cdl \
384 -gds %l/gds/*.gds \
385 -lef %l/lef/*.lef compile-only rename=sky130_ef_io \
386 -library general sky130_fd_io |& tee -a ${SKY130A}_install.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400387 # Install SkyWater I/O pad library
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400388 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards1134fbc2020-10-12 22:35:42 -0400389 -spice %l/latest/cells/*/*.spice compile-only \
390 sort=custom/scripts/sort_pdkfiles.py \
391 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
392 sort=custom/scripts/sort_pdkfiles.py \
393 -lef %l/latest/cells/*/*.magic.lef compile-only \
394 sort=custom/scripts/sort_pdkfiles.py \
395 -doc %l/latest/cells/*/*.pdf \
396 -lib %l/latest/timing/*.lib \
397 -gds %l/latest/cells/*/*.gds compile-only \
398 sort=custom/scripts/sort_pdkfiles.py \
399 -verilog %l/latest/cells/*/*.*.v \
400 -verilog %l/latest/cells/*/*.v exclude=*.*.v \
401 compile-only filter=custom/scripts/inc_verilog.py \
402 sort=custom/scripts/sort_pdkfiles.py \
403 -library general sky130_fd_io |& tee -a ${SKY130A}_install.log
404 # Remove the base verilog files which have already been included into
405 # the libraries
406 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_io/verilog/*.*.v
Ahmed Ghazy5fd61d22020-11-24 21:44:28 +0200407 # Install custom additions to standard cell libraries
408 ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
409 -gds %l/gds/*.gds \
410 -lef %l/lef/*.lef \
411 -library digital sky130_fd_sc_hd |& tee -a ${SKY130A}_install.log
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200412 # Install all SkyWater digital standard cells.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400413 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400414 -techlef %l/latest/tech/*.tlef \
415 -spice %l/latest/cells/*/*.spice compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400416 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400417 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400418 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards106e38b2020-09-20 13:07:54 -0400419 -lef %l/latest/cells/*/*.magic.lef compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400420 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400421 -doc %l/latest/cells/*/*.pdf \
422 -lib %l/latest/timing/*.lib \
423 -gds %l/latest/cells/*/*.gds compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400424 sort=custom/scripts/sort_pdkfiles.py \
425 -verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
426 rename=primitives filter=custom/scripts/inc_verilog.py \
427 sort=custom/scripts/sort_pdkfiles.py \
428 -verilog %l/latest/cells/*/*.*.v \
429 -verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
430 compile-only filter=custom/scripts/inc_verilog.py \
431 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400432 -library digital sky130_fd_sc_hd \
433 -library digital sky130_fd_sc_hdll \
434 -library digital sky130_fd_sc_hvl \
435 -library digital sky130_fd_sc_hs \
436 -library digital sky130_fd_sc_ls \
437 -library digital sky130_fd_sc_ms \
438 -library digital sky130_fd_sc_lp |& tee -a ${SKY130A}_install.log
Tim Edwards995c1332020-09-25 15:33:58 -0400439 # Remove the base verilog files which have already been included into
440 # the libraries
441 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hd/verilog/*.*.v
442 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hdll/verilog/*.*.v
443 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hvl/verilog/*.*.v
444 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hs/verilog/*.*.v
445 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ms/verilog/*.*.v
446 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ls/verilog/*.*.v
447 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_lp/verilog/*.*.v
Tristan Gingolda5854312020-10-15 18:28:16 +0200448 # Install OSU digital standard cells.
449 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwardsbbab9f62020-11-02 10:12:20 -0500450 -techlef %l/latest/lef/sky130_osu_sc.tlef rename=sky130_osu_sc_t18.tlef \
Tristan Gingolda5854312020-10-15 18:28:16 +0200451 -cdl %l/latest/cdl/*.cdl ignore=topography compile-only \
452 -lef %l/latest/lef/*.lef compile-only \
453 -lib %l/latest/lib/*.lib \
454 -gds %l/latest/gds/*.gds compile-only \
455 -library digital sky130_osu_sc_t18 |& tee -a ${SKY130A}_install.log
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400456
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400457install:
Ahmed Ghazyf45cbf32020-08-08 17:11:53 +0200458 if test "x${DIST_PATH}" == "x" ; then \
459 ${MAKE} install-local ; \
460 else \
461 ${MAKE} install-dist; \
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400462 fi
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400463
464install-local: install-local-a
465
466install-local-a:
467 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log
468 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
469 -target ${LOCAL_PATH}/${SKY130A} \
470 -link_from ${LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log
471 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log
472
473install-dist: install-dist-a
474
475install-dist-a:
476 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log
477 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
478 -target ${DIST_PATH}/${SKY130A} \
479 -local ${LOCAL_PATH}/${SKY130A} \
480 -link_from ${DIST_LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log
481 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log
482
483clean: clean-a
484
485clean-a:
486 ${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean
487
488veryclean: veryclean-a
489
490veryclean-a: clean-a
491 ${RM} ${SKY130A}_install.log
492 ${RM} ${SKY130A}_migrate.log