blob: d509361f6290338475de7a2389b0c9f446de6a09 [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 Edwards5c7924d2020-09-30 22:22:10 -040077REVISION = 20200927
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}
305 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hd
Tim Edwards5778c232020-07-07 16:57:52 -0400306 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hs
Ahmed Ghazy8e84e5c2020-07-27 14:32:34 +0200307 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ls
308 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ms
309 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll
310 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl
Tristan Gingolda5854312020-10-15 18:28:16 +0200311 mkdir -p ${OPENLANE_STAGING_A}/sky130_osu_sc_t18
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400312 rm -f ${OPENLANE_STAGING_A}/common_pdn.info
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400313 rm -f ${OPENLANE_STAGING_A}/config.tcl
314 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl
Tim Edwards5778c232020-07-07 16:57:52 -0400315 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info
316 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells
317 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/sky130_fd_sc_hd__fakediode_2.gds
318 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
Tim Edwards5778c232020-07-07 16:57:52 -0400335 ${CPP} ${SKY130A_DEFS} openlane/common_pdn.tcl > ${OPENLANE_STAGING_A}/common_pdn.tcl
336 ${CPP} ${SKY130A_DEFS} openlane/config.tcl > ${OPENLANE_STAGING_A}/config.tcl
337 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl
338 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info
339 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells
340 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
341 ${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:
Tim Edwards106e38b2020-09-20 13:07:54 -0400360 # Install device subcircuits from vendor files
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400361 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards995c1332020-09-25 15:33:58 -0400362 -ngspice sky130_fd_pr/latest/models/* \
363 filter=custom/scripts/rename_models.py \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400364 |& tee -a ${SKY130A}_install.log
365 # Install base device library from vendor files
366 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards106e38b2020-09-20 13:07:54 -0400367 -gds %l/latest/cells/*/*.gds compile-only \
368 -cdl %l/latest/cells/*/*.cdl compile-only \
369 -lef %l/latest/cells/*/*.magic.lef compile-only \
Tim Edwardsbfc82692020-09-20 21:33:08 -0400370 -spice %l/latest/cells/*/*.spice filter=custom/scripts/rename_cells.py \
Tim Edwards106e38b2020-09-20 13:07:54 -0400371 -library primitive sky130_fd_pr |& tee -a ${SKY130A}_install.log
Tim Edwards42f79a32020-09-21 14:18:09 -0400372 # Custom: Add "short" resistor model to the r+c models file
373 cat ./custom/models/short.spice >> \
374 ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400375 # Install SkyWater I/O pad library
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400376 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwards1134fbc2020-10-12 22:35:42 -0400377 -spice %l/latest/cells/*/*.spice compile-only \
378 sort=custom/scripts/sort_pdkfiles.py \
379 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
380 sort=custom/scripts/sort_pdkfiles.py \
381 -lef %l/latest/cells/*/*.magic.lef compile-only \
382 sort=custom/scripts/sort_pdkfiles.py \
383 -doc %l/latest/cells/*/*.pdf \
384 -lib %l/latest/timing/*.lib \
385 -gds %l/latest/cells/*/*.gds compile-only \
386 sort=custom/scripts/sort_pdkfiles.py \
387 -verilog %l/latest/cells/*/*.*.v \
388 -verilog %l/latest/cells/*/*.v exclude=*.*.v \
389 compile-only filter=custom/scripts/inc_verilog.py \
390 sort=custom/scripts/sort_pdkfiles.py \
391 -library general sky130_fd_io |& tee -a ${SKY130A}_install.log
392 # Remove the base verilog files which have already been included into
393 # the libraries
394 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_io/verilog/*.*.v
395 # Install custom additions to I/O pad library
396 ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
397 -verilog %l/verilog/*.v \
398 -cdl %l/cdl/*.cdl \
Tim Edwards116a34a2020-10-13 14:10:10 -0400399 -gds %l/gds/*.gds \
400 -lef %l/lef/*.lef compile-only \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400401 -library general sky130_fd_io |& tee -a ${SKY130A}_install.log
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200402 # Install all SkyWater digital standard cells.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400403 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400404 -techlef %l/latest/tech/*.tlef \
405 -spice %l/latest/cells/*/*.spice compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400406 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400407 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400408 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards106e38b2020-09-20 13:07:54 -0400409 -lef %l/latest/cells/*/*.magic.lef compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400410 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400411 -doc %l/latest/cells/*/*.pdf \
412 -lib %l/latest/timing/*.lib \
413 -gds %l/latest/cells/*/*.gds compile-only \
Tim Edwards995c1332020-09-25 15:33:58 -0400414 sort=custom/scripts/sort_pdkfiles.py \
415 -verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
416 rename=primitives filter=custom/scripts/inc_verilog.py \
417 sort=custom/scripts/sort_pdkfiles.py \
418 -verilog %l/latest/cells/*/*.*.v \
419 -verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
420 compile-only filter=custom/scripts/inc_verilog.py \
421 sort=custom/scripts/sort_pdkfiles.py \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400422 -library digital sky130_fd_sc_hd \
423 -library digital sky130_fd_sc_hdll \
424 -library digital sky130_fd_sc_hvl \
425 -library digital sky130_fd_sc_hs \
426 -library digital sky130_fd_sc_ls \
427 -library digital sky130_fd_sc_ms \
428 -library digital sky130_fd_sc_lp |& tee -a ${SKY130A}_install.log
Tim Edwards995c1332020-09-25 15:33:58 -0400429 # Remove the base verilog files which have already been included into
430 # the libraries
431 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hd/verilog/*.*.v
432 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hdll/verilog/*.*.v
433 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hvl/verilog/*.*.v
434 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hs/verilog/*.*.v
435 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ms/verilog/*.*.v
436 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ls/verilog/*.*.v
437 ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_lp/verilog/*.*.v
Tristan Gingolda5854312020-10-15 18:28:16 +0200438 # Install OSU digital standard cells.
439 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
440 -techlef %l/latest/lef/sky130_osu_sc.tlef \
441 -cdl %l/latest/cdl/*.cdl ignore=topography compile-only \
442 -lef %l/latest/lef/*.lef compile-only \
443 -lib %l/latest/lib/*.lib \
444 -gds %l/latest/gds/*.gds compile-only \
445 -library digital sky130_osu_sc_t18 |& tee -a ${SKY130A}_install.log
446 # Renaming. Can it be avoided or simplified ?
447 ${MV} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_osu_sc_t18/techlef/sky130_osu_sc.tlef ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_osu_sc_t18/techlef/sky130_osu_sc_t18.tlef
Tim Edwards31a2adf2020-07-07 21:47:30 -0400448 # Install OSU digital standard cells.
Ahmed Ghazy41c40c42020-07-27 17:00:22 +0200449 # ${STAGE} -source ${OSU_PATH} -target ${STAGING_PATH}/${SKY130A} \
450 # -techlef char/techfiles/scs8.lef rename sky130_osu_sc.tlef \
451 # -spice lib/spice/*.spice compile-only \
452 # -lef outputs/s8_osu130.lef rename sky130_osu_sc.lef \
453 # -lib outputs/*.lib \
454 # -gds lib/gds/*.gds compile-only \
455 # -verilog outputs/VERILOG/*.v \
456 # -library digital sky130_osu_sc
Ahmed Ghazy41c40c42020-07-27 17:00:22 +0200457 # # Add correct bounding boxes on Magic layouts
458 # ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_gpio_ovtv2 \
459 # "FIXED_BBOX 0 407 28000 40000"
460 # ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_xres4v2 \
461 # "FIXED_BBOX 0 407 15000 40000"
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400462
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400463install:
Ahmed Ghazyf45cbf32020-08-08 17:11:53 +0200464 if test "x${DIST_PATH}" == "x" ; then \
465 ${MAKE} install-local ; \
466 else \
467 ${MAKE} install-dist; \
Tim Edwards7cbaaba2020-08-05 12:19:18 -0400468 fi
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400469
470install-local: install-local-a
471
472install-local-a:
473 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log
474 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
475 -target ${LOCAL_PATH}/${SKY130A} \
476 -link_from ${LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log
477 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log
478
479install-dist: install-dist-a
480
481install-dist-a:
482 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log
483 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
484 -target ${DIST_PATH}/${SKY130A} \
485 -local ${LOCAL_PATH}/${SKY130A} \
486 -link_from ${DIST_LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log
487 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log
488
489clean: clean-a
490
491clean-a:
492 ${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean
493
494veryclean: veryclean-a
495
496veryclean-a: clean-a
497 ${RM} ${SKY130A}_install.log
498 ${RM} ${SKY130A}_migrate.log