blob: 46de4b48f9773c11c21c215753e96e16a6534ac6 [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
75
Tim Edwards5c7924d2020-09-30 22:22:10 -040076REVISION = 20200927
Tim Edwards55f4d0e2020-07-05 15:41:02 -040077TECH = sky130
78
79# If EF_STYLE is set to 1, then efabless naming conventions are
80# used, otherwise the generic naming conventions are used.
81# Mainly, the hierarchy of library names and file types is reversed
82# (e.g., sky130_fd_sc_hd/lef vs. lef/sky130_fd_sc_hd).
83
Tim Edwards7cbaaba2020-08-05 12:19:18 -040084# EF_STYLE = 0 | 1
85EF_STYLE = @EF_STYLE@
Tim Edwards55f4d0e2020-07-05 15:41:02 -040086
87# Normally it's fine to keep the staging path in a local directory,
88# although /tmp or a dedicated staging area are also fine, as long
89# as the install process can write to the path.
90
91STAGING_PATH = `pwd`
92
93# If LINK_TARGETS is set to "none", then files are copied
94# from the SkyWater sources to the target. If set to "source",
95# symbolic links are made in the target directories pointing
96# back to the SkyWater sources. If set to the name of another
97# PDK (e.g, "sky130A"), then symbolic links are made to the
98# same files in that PDK, where they exist, and are copied
99# from source, where they don't.
100
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400101# LINK_TARGETS = source | none | sky130A
102LINK_TARGETS = @SKY130_LINK_TARGETS@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400103
104# Paths:
105
106# Path to skywater_pdk (to be changed to public repo; work in progress)
107# Version below comes from foss-eda-tools.googlesource.com
108# SKYWATER_PATH = ~/gits/skywater-pdk-scratch/skywater-pdk/libraries
109# Version below is also from foss-eda-tools and is more recent than
110# the scratch repo above.
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400111SKYWATER_PATH = @SKY130_SOURCE_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400112
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400113# Path to OSU standard cell library sources (to be added to configuration options).
Tim Edwards31a2adf2020-07-07 21:47:30 -0400114OSU_PATH = ~/gits/osu_130_pdk
115
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400116# NOTE: Install destination is the git repository of the technology platform.
117# Once updated in git, the git project can be distributed to all hosts.
118#
119ifeq (${EF_STYLE}, 1)
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400120 LOCAL_PATH = @SKY130_LOCAL_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400121 CONFIG_DIR = .ef-config
122 REV_DIR = ${REVISION}
123else
124 # LOCAL_PATH = /usr/local/share/vlsi/SkyWater
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400125 LOCAL_PATH = @SKY130_LOCAL_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400126 CONFIG_DIR = .config
127 REV_DIR = .
128endif
129
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400130# DIST_PATH = ~/gits/ef-skywater-${TECH}
131DIST_PATH = @SKY130_DIST_PATH@
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400132
133# EF process nodes created from the master sources
134SKY130A = sky130A
135
136ifeq (${LINK_TARGETS}, ${SKY130A})
137 DIST_LINK_TARGETS = ${LOCAL_PATH}/${LINK_TARGETS}
138else
139 DIST_LINK_TARGETS = ${LINK_TARGETS}
140endif
141
142# Basic definitions for each EF process node
143SKY130A_DEFS = -DTECHNAME=sky130A -DREVISION=${REVISION}
144
145# Module definitions for each process node
146# (Note that MOS is default and therefore not used anywhere)
Tim Edwards0a0272b2020-07-28 14:40:10 -0400147SKY130A_DEFS += -DMETAL5 -DMIM -DREDISTRIBUTION
148# SKY130A_DEFS += -DMETAL5 -DMIM
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400149
150# Add staging path
151SKY130A_DEFS += -DSTAGING_PATH=${STAGING_PATH}
152
153ifeq (${EF_STYLE}, 1)
154 EF_FORMAT = -ef_format
155 SKY130A_DEFS += -DEF_FORMAT
156else
157 EF_FORMAT = -std_format
158endif
159
160MAGICTOP = libs.tech/magic
161NETGENTOP = libs.tech/netgen
162QFLOWTOP = libs.tech/qflow
163KLAYOUTTOP = libs.tech/klayout
164OPENLANETOP = libs.tech/openlane
165
166ifeq (${EF_STYLE}, 1)
167 MAGICPATH = ${MAGICTOP}/${REVISION}
168else
169 MAGICPATH = ${MAGICTOP}
170endif
171
172# Currently, netgen, qflow, and klayout do not use revisioning (needs to change!)
173NETGENPATH = ${NETGENTOP}
174QFLOWPATH = ${QFLOWTOP}
175KLAYOUTPATH = ${KLAYOUTTOP}
176OPENLANEPATH = ${OPENLANETOP}
177
178MAGICTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICTOP}
179NETGENTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENTOP}
180QFLOWTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWTOP}
181KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTTOP}
182OPENLANETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANETOP}
183
184MAGIC_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICPATH}
185NETGEN_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENPATH}
186QFLOW_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWPATH}
187KLAYOUT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTPATH}
188OPENLANE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANEPATH}
189
190SKY130A_DEFS += -DMAGIC_CURRENT=${MAGICTOP}/current
191
192# Where cpp syntax is followed, this is equivalent to cpp, but it does not
193# mangle non-C source files under the belief that they are actually C code.
194CPP = ../common/preproc.py
195
196# The following script in the ../common directory does most of the work of
197# copying or linking the foundry vendor files to the target directory.
198STAGE = set -f ; ../common/foundry_install.py ${EF_FORMAT}
199INSTALL = ../common/staging_install.py ${EF_FORMAT}
200
201# The script(s) below are used for custom changes to the vendor PDK files
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200202ADDPROP = ../common/insert_property.py ${EF_FORMAT}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400203
204# List the EDA tools to install local setup files for
205TOOLS = magic qflow netgen klayout openlane
206
207all: all-a
208
209all-a:
210 echo "Starting sky130A PDK staging on "`date` > ${SKY130A}_install.log
211 ${MAKE} tools-a
212 ${MAKE} vendor-a
213 echo "Ended sky130A PDK staging on "`date` >> ${SKY130A}_install.log
214
215tools-a: general-a magic-a qflow-a netgen-a klayout-a openlane-a
216
217general-a: ${TECH}.json
218 mkdir -p ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}
219 rm -f ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json
220 ${CPP} ${SKY130A_DEFS} ${TECH}.json > \
221 ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json
222
Tim Edwards5778c232020-07-07 16:57:52 -0400223magic-a: magic/${TECH}.tech magic/${TECH}gds.tech magic/${TECH}.magicrc magic/${TECH}.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400224 mkdir -p ${MAGICTOP_STAGING_A}
225 mkdir -p ${MAGIC_STAGING_A}
226 rm -f ${MAGICTOP_STAGING_A}/current
227 rm -f ${MAGIC_STAGING_A}/${SKY130A}.tech
228 rm -f ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech
229 rm -f ${MAGIC_STAGING_A}/${SKY130A}.tcl
230 rm -f ${MAGIC_STAGING_A}/${SKY130A}-BindKeys
231 rm -f ${MAGIC_STAGING_A}/magicrc
232 (cd ${MAGICTOP_STAGING_A} ; ln -s ${REV_DIR} current)
233 cp -rp custom/scripts/seal_ring_generator ${MAGIC_STAGING_A}/.
Tim Edwards5778c232020-07-07 16:57:52 -0400234 ${CPP} ${SKY130A_DEFS} magic/${TECH}.tech > ${MAGIC_STAGING_A}/${SKY130A}.tech
235 ${CPP} ${SKY130A_DEFS} magic/${TECH}gds.tech > ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech
236 ${CPP} ${SKY130A_DEFS} magic/${TECH}.magicrc > ${MAGIC_STAGING_A}/${SKY130A}.magicrc
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400237 ${CPP} ${SKY130A_DEFS} ../common/pdk.bindkeys > ${MAGIC_STAGING_A}/${SKY130A}-BindKeys
Tim Edwards5778c232020-07-07 16:57:52 -0400238 ${CPP} ${SKY130A_DEFS} magic/${TECH}.tcl > ${MAGIC_STAGING_A}/${SKY130A}.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400239 ${CPP} ${SKY130A_DEFS} ../common/pdk.tcl >> ${MAGIC_STAGING_A}/${SKY130A}.tcl
240
Tim Edwards5778c232020-07-07 16:57:52 -0400241qflow-a: qflow/${TECH}.sh qflow/${TECH}.par
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400242 mkdir -p ${QFLOWTOP_STAGING_A}
243 mkdir -p ${QFLOW_STAGING_A}
244 rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.sh
245 rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.par
246 rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.sh
247 rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.par
248 rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.sh
249 rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.par
250 rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.sh
251 rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.par
252 rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.sh
253 rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.par
254 rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.sh
255 rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.par
256 rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.sh
257 rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.par
Tim Edwards7ec76972020-07-07 21:56:08 -0400258 rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.sh
259 rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.par
Tim Edwards5778c232020-07-07 16:57:52 -0400260 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hd qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400261 ${QFLOW_STAGING_A}/${SKY130A}hd.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400262 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hdll qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400263 ${QFLOW_STAGING_A}/${SKY130A}hdll.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400264 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hvl qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400265 ${QFLOW_STAGING_A}/${SKY130A}hvl.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400266 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hs qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400267 ${QFLOW_STAGING_A}/${SKY130A}hs.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400268 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_lp qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400269 ${QFLOW_STAGING_A}/${SKY130A}lp.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400270 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ls qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400271 ${QFLOW_STAGING_A}/${SKY130A}ls.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400272 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ms qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400273 ${QFLOW_STAGING_A}/${SKY130A}ms.sh
Tim Edwards7ec76972020-07-07 21:56:08 -0400274 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_osu_sc qflow/sky130osu.sh > \
275 ${QFLOW_STAGING_A}/${SKY130A}osu.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400276 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hd.par
277 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hdll.par
278 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hvl.par
279 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hs.par
280 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ms.par
281 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}lp.par
282 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ls.par
283 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}osu.par
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400284
Tim Edwards5778c232020-07-07 16:57:52 -0400285netgen-a: netgen/${TECH}_setup.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400286 mkdir -p ${NETGENTOP_STAGING_A}
287 mkdir -p ${NETGEN_STAGING_A}
288 rm -f ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
289 rm -f ${NETGEN_STAGING_A}/setup.tcl
Tim Edwards5778c232020-07-07 16:57:52 -0400290 ${CPP} ${SKY130A_DEFS} netgen/${TECH}_setup.tcl > ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400291 (cd ${NETGEN_STAGING_A} ; ln -s ${SKY130A}_setup.tcl setup.tcl)
292
Tim Edwards5778c232020-07-07 16:57:52 -0400293klayout-a: klayout/${TECH}.lyp klayout/${TECH}.lyt
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400294 mkdir -p ${KLAYOUTTOP_STAGING_A}
295 mkdir -p ${KLAYOUT_STAGING_A}
296 rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
297 rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
Tim Edwards5778c232020-07-07 16:57:52 -0400298 ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyp > ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
299 ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyt > ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400300
Ahmed Ghazy8e84e5c2020-07-27 14:32:34 +0200301openlane-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
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400302 mkdir -p ${OPENLANETOP_STAGING_A}
303 mkdir -p ${OPENLANE_STAGING_A}
304 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hd
Tim Edwards5778c232020-07-07 16:57:52 -0400305 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hs
Ahmed Ghazy8e84e5c2020-07-27 14:32:34 +0200306 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ls
307 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ms
308 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll
309 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400310 rm -f ${OPENLANE_STAGING_A}/common_pdn.info
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400311 rm -f ${OPENLANE_STAGING_A}/config.tcl
312 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl
Tim Edwards5778c232020-07-07 16:57:52 -0400313 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info
314 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells
315 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/sky130_fd_sc_hd__fakediode_2.gds
316 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/config.tcl
317 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/tracks.info
318 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/no_synth.cells
Ahmed Ghazy8e84e5c2020-07-27 14:32:34 +0200319 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/config.tcl
320 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/tracks.info
321 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/no_synth.cells
322 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/config.tcl
323 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/tracks.info
324 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/no_synth.cells
325 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/config.tcl
326 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/tracks.info
327 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/no_synth.cells
328 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/config.tcl
329 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/tracks.info
330 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/no_synth.cells
Tim Edwards5778c232020-07-07 16:57:52 -0400331 ${CPP} ${SKY130A_DEFS} openlane/common_pdn.tcl > ${OPENLANE_STAGING_A}/common_pdn.tcl
332 ${CPP} ${SKY130A_DEFS} openlane/config.tcl > ${OPENLANE_STAGING_A}/config.tcl
333 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl
334 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info
335 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells
336 cp openlane/sky130_fd_sc_hd/sky130_fd_sc_hd__fakediode_2.gds ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/sky130_fd_sc_hd__fakediode_2.gds
337 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/config.tcl
338 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/tracks.info
339 ${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 +0200340 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/config.tcl
341 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/tracks.info
342 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/no_synth.cells
343 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/config.tcl
344 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/tracks.info
345 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/no_synth.cells
346 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/config.tcl
347 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/tracks.info
348 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/no_synth.cells
349 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/config.tcl
350 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/tracks.info
351 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/no_synth.cells
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400352
353vendor-a:
Tim Edwards106e38b2020-09-20 13:07:54 -0400354 # Install device subcircuits from vendor files
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400355 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards995c1332020-09-25 15:33:58 -0400356 -ngspice sky130_fd_pr/latest/models/* \
357 filter=custom/scripts/rename_models.py \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400358 |& tee -a ${SKY130A}_install.log
359 # Install base device library from vendor files
360 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards106e38b2020-09-20 13:07:54 -0400361 -gds %l/latest/cells/*/*.gds compile-only \
362 -cdl %l/latest/cells/*/*.cdl compile-only \
363 -lef %l/latest/cells/*/*.magic.lef compile-only \
Tim Edwardsbfc82692020-09-20 21:33:08 -0400364 -spice %l/latest/cells/*/*.spice filter=custom/scripts/rename_cells.py \
Tim Edwards106e38b2020-09-20 13:07:54 -0400365 -library primitive sky130_fd_pr |& tee -a ${SKY130A}_install.log
Tim Edwards42f79a32020-09-21 14:18:09 -0400366 # Custom: Add "short" resistor model to the r+c models file
367 cat ./custom/models/short.spice >> \
368 ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400369 # Install SkyWater I/O pad library
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400370 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards1134fbc2020-10-12 22:35:42 -0400371 -spice %l/latest/cells/*/*.spice compile-only \
372 sort=custom/scripts/sort_pdkfiles.py \
373 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
374 sort=custom/scripts/sort_pdkfiles.py \
375 -lef %l/latest/cells/*/*.magic.lef compile-only \
376 sort=custom/scripts/sort_pdkfiles.py \
377 -doc %l/latest/cells/*/*.pdf \
378 -lib %l/latest/timing/*.lib \
379 -gds %l/latest/cells/*/*.gds compile-only \
380 sort=custom/scripts/sort_pdkfiles.py \
381 -verilog %l/latest/cells/*/*.*.v \
382 -verilog %l/latest/cells/*/*.v exclude=*.*.v \
383 compile-only filter=custom/scripts/inc_verilog.py \
384 sort=custom/scripts/sort_pdkfiles.py \
385 -library general sky130_fd_io |& tee -a ${SKY130A}_install.log
386 # Remove the base verilog files which have already been included into
387 # the libraries
388 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_io/verilog/*.*.v
389 # Install custom additions to I/O pad library
390 ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
391 -verilog %l/verilog/*.v \
392 -cdl %l/cdl/*.cdl \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400393 -library general sky130_fd_io |& tee -a ${SKY130A}_install.log
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200394 # Install all SkyWater digital standard cells.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400395 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400396 -techlef %l/latest/tech/*.tlef \
397 -spice %l/latest/cells/*/*.spice compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400398 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400399 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400400 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards106e38b2020-09-20 13:07:54 -0400401 -lef %l/latest/cells/*/*.magic.lef compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400402 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400403 -doc %l/latest/cells/*/*.pdf \
404 -lib %l/latest/timing/*.lib \
405 -gds %l/latest/cells/*/*.gds compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400406 sort=custom/scripts/sort_pdkfiles.py \
407 -verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
408 rename=primitives filter=custom/scripts/inc_verilog.py \
409 sort=custom/scripts/sort_pdkfiles.py \
410 -verilog %l/latest/cells/*/*.*.v \
411 -verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
412 compile-only filter=custom/scripts/inc_verilog.py \
413 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400414 -library digital sky130_fd_sc_hd \
415 -library digital sky130_fd_sc_hdll \
416 -library digital sky130_fd_sc_hvl \
417 -library digital sky130_fd_sc_hs \
418 -library digital sky130_fd_sc_ls \
419 -library digital sky130_fd_sc_ms \
420 -library digital sky130_fd_sc_lp |& tee -a ${SKY130A}_install.log
Tim Edwards995c1332020-09-25 15:33:58 -0400421 # Remove the base verilog files which have already been included into
422 # the libraries
423 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hd/verilog/*.*.v
424 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hdll/verilog/*.*.v
425 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hvl/verilog/*.*.v
426 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hs/verilog/*.*.v
427 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ms/verilog/*.*.v
428 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ls/verilog/*.*.v
429 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_lp/verilog/*.*.v
Tim Edwards31a2adf2020-07-07 21:47:30 -0400430 # Install OSU digital standard cells.
Ahmed Ghazy41c40c42020-07-27 17:00:22 +0200431 # ${STAGE} -source ${OSU_PATH} -target ${STAGING_PATH}/${SKY130A} \
432 # -techlef char/techfiles/scs8.lef rename sky130_osu_sc.tlef \
433 # -spice lib/spice/*.spice compile-only \
434 # -lef outputs/s8_osu130.lef rename sky130_osu_sc.lef \
435 # -lib outputs/*.lib \
436 # -gds lib/gds/*.gds compile-only \
437 # -verilog outputs/VERILOG/*.v \
438 # -library digital sky130_osu_sc
Ahmed Ghazy41c40c42020-07-27 17:00:22 +0200439 # # Add correct bounding boxes on Magic layouts
440 # ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_gpio_ovtv2 \
441 # "FIXED_BBOX 0 407 28000 40000"
442 # ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_xres4v2 \
443 # "FIXED_BBOX 0 407 15000 40000"
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400444
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400445install:
Ahmed Ghazyf45cbf32020-08-08 17:11:53 +0200446 if test "x${DIST_PATH}" == "x" ; then \
447 ${MAKE} install-local ; \
448 else \
449 ${MAKE} install-dist; \
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400450 fi
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400451
452install-local: install-local-a
453
454install-local-a:
455 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log
456 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
457 -target ${LOCAL_PATH}/${SKY130A} \
458 -link_from ${LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log
459 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log
460
461install-dist: install-dist-a
462
463install-dist-a:
464 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log
465 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
466 -target ${DIST_PATH}/${SKY130A} \
467 -local ${LOCAL_PATH}/${SKY130A} \
468 -link_from ${DIST_LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log
469 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log
470
471clean: clean-a
472
473clean-a:
474 ${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean
475
476veryclean: veryclean-a
477
478veryclean-a: clean-a
479 ${RM} ${SKY130A}_install.log
480 ${RM} ${SKY130A}_migrate.log