blob: d8eb452dc33dd8e6d72950cad426d2d7048f118d [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#
14# Modify values below as needed:
15#
16# VENDOR_PATH: points to vendor sources
17# EF_STYLE: 1 for efabless style, 0 otherwise
18# LINK_TARGETS: link back to source or link to 1st PDK when possible
19# DIST_PATH: install location for distributed install
20# LOCAL_PATH: install location for local install or runtime location
21# for distributed install
22#
23# Run "make" to stage the PDK for tool setup and vendor libraries
24
25# If installing into the final destination (local install):
26#
27# Run "make install-local" to install all staged files
28# ("make install" is equivalent to "make install-local")
29#
30# If installing into a repository to be distributed to the final destination:
31#
32# Run "make install-dist" to install all staged files
33#
34# Run "make clean" to remove all staging files.
35#
36# Run "make veryclean" to remove all staging and install log files.
37#
38# For the sake of simplicity, the "standard" local install can be done
39# with the usual
40#
41# make
42# make install
43# make clean
44#
45#--------------------------------------------------------------------
46# This Makefile contains bash-isms
47SHELL = bash
48
49REVISION = 20200508
50TECH = sky130
51
52# If EF_STYLE is set to 1, then efabless naming conventions are
53# used, otherwise the generic naming conventions are used.
54# Mainly, the hierarchy of library names and file types is reversed
55# (e.g., sky130_fd_sc_hd/lef vs. lef/sky130_fd_sc_hd).
56
57EF_STYLE = 0
58# EF_STYLE = 1
59
60# Normally it's fine to keep the staging path in a local directory,
61# although /tmp or a dedicated staging area are also fine, as long
62# as the install process can write to the path.
63
64STAGING_PATH = `pwd`
65
66# If LINK_TARGETS is set to "none", then files are copied
67# from the SkyWater sources to the target. If set to "source",
68# symbolic links are made in the target directories pointing
69# back to the SkyWater sources. If set to the name of another
70# PDK (e.g, "sky130A"), then symbolic links are made to the
71# same files in that PDK, where they exist, and are copied
72# from source, where they don't.
73
74# LINK_TARGETS = source
Ahmed Ghazy6e081f62020-07-27 14:01:34 +020075LINK_TARGETS = none
Tim Edwards55f4d0e2020-07-05 15:41:02 -040076# LINK_TARGETS = sky130A
Tim Edwards55f4d0e2020-07-05 15:41:02 -040077
78# Paths:
79
80# Path to skywater_pdk (to be changed to public repo; work in progress)
81# Version below comes from foss-eda-tools.googlesource.com
82# SKYWATER_PATH = ~/gits/skywater-pdk-scratch/skywater-pdk/libraries
83# Version below is also from foss-eda-tools and is more recent than
84# the scratch repo above.
85SKYWATER_PATH = ~/gits/skywater-pdk/libraries
86
Tim Edwards31a2adf2020-07-07 21:47:30 -040087# Path to OSU standard cell library sources
88OSU_PATH = ~/gits/osu_130_pdk
89
Tim Edwards55f4d0e2020-07-05 15:41:02 -040090# NOTE: Install destination is the git repository of the technology platform.
91# Once updated in git, the git project can be distributed to all hosts.
92#
93ifeq (${EF_STYLE}, 1)
94 LOCAL_PATH = /ef/tech/SW
95 CONFIG_DIR = .ef-config
96 REV_DIR = ${REVISION}
97else
98 # LOCAL_PATH = /usr/local/share/vlsi/SkyWater
99 LOCAL_PATH = ~/projects/efabless/tech/SW
100 CONFIG_DIR = .config
101 REV_DIR = .
102endif
103
104DIST_PATH = ~/gits/ef-skywater-${TECH}
105
106# EF process nodes created from the master sources
107SKY130A = sky130A
108
109ifeq (${LINK_TARGETS}, ${SKY130A})
110 DIST_LINK_TARGETS = ${LOCAL_PATH}/${LINK_TARGETS}
111else
112 DIST_LINK_TARGETS = ${LINK_TARGETS}
113endif
114
115# Basic definitions for each EF process node
116SKY130A_DEFS = -DTECHNAME=sky130A -DREVISION=${REVISION}
117
118# Module definitions for each process node
119# (Note that MOS is default and therefore not used anywhere)
Tim Edwards0a0272b2020-07-28 14:40:10 -0400120SKY130A_DEFS += -DMETAL5 -DMIM -DREDISTRIBUTION
121# SKY130A_DEFS += -DMETAL5 -DMIM
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400122
123# Add staging path
124SKY130A_DEFS += -DSTAGING_PATH=${STAGING_PATH}
125
126ifeq (${EF_STYLE}, 1)
127 EF_FORMAT = -ef_format
128 SKY130A_DEFS += -DEF_FORMAT
129else
130 EF_FORMAT = -std_format
131endif
132
133MAGICTOP = libs.tech/magic
134NETGENTOP = libs.tech/netgen
135QFLOWTOP = libs.tech/qflow
136KLAYOUTTOP = libs.tech/klayout
137OPENLANETOP = libs.tech/openlane
138
139ifeq (${EF_STYLE}, 1)
140 MAGICPATH = ${MAGICTOP}/${REVISION}
141else
142 MAGICPATH = ${MAGICTOP}
143endif
144
145# Currently, netgen, qflow, and klayout do not use revisioning (needs to change!)
146NETGENPATH = ${NETGENTOP}
147QFLOWPATH = ${QFLOWTOP}
148KLAYOUTPATH = ${KLAYOUTTOP}
149OPENLANEPATH = ${OPENLANETOP}
150
151MAGICTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICTOP}
152NETGENTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENTOP}
153QFLOWTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWTOP}
154KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTTOP}
155OPENLANETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANETOP}
156
157MAGIC_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICPATH}
158NETGEN_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENPATH}
159QFLOW_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWPATH}
160KLAYOUT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTPATH}
161OPENLANE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANEPATH}
162
163SKY130A_DEFS += -DMAGIC_CURRENT=${MAGICTOP}/current
164
165# Where cpp syntax is followed, this is equivalent to cpp, but it does not
166# mangle non-C source files under the belief that they are actually C code.
167CPP = ../common/preproc.py
168
169# The following script in the ../common directory does most of the work of
170# copying or linking the foundry vendor files to the target directory.
171STAGE = set -f ; ../common/foundry_install.py ${EF_FORMAT}
172INSTALL = ../common/staging_install.py ${EF_FORMAT}
173
174# The script(s) below are used for custom changes to the vendor PDK files
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200175ADDPROP = ../common/insert_property.py ${EF_FORMAT}
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400176
177# List the EDA tools to install local setup files for
178TOOLS = magic qflow netgen klayout openlane
179
180all: all-a
181
182all-a:
183 echo "Starting sky130A PDK staging on "`date` > ${SKY130A}_install.log
184 ${MAKE} tools-a
185 ${MAKE} vendor-a
186 echo "Ended sky130A PDK staging on "`date` >> ${SKY130A}_install.log
187
188tools-a: general-a magic-a qflow-a netgen-a klayout-a openlane-a
189
190general-a: ${TECH}.json
191 mkdir -p ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}
192 rm -f ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json
193 ${CPP} ${SKY130A_DEFS} ${TECH}.json > \
194 ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json
195
Tim Edwards5778c232020-07-07 16:57:52 -0400196magic-a: magic/${TECH}.tech magic/${TECH}gds.tech magic/${TECH}.magicrc magic/${TECH}.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400197 mkdir -p ${MAGICTOP_STAGING_A}
198 mkdir -p ${MAGIC_STAGING_A}
199 rm -f ${MAGICTOP_STAGING_A}/current
200 rm -f ${MAGIC_STAGING_A}/${SKY130A}.tech
201 rm -f ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech
202 rm -f ${MAGIC_STAGING_A}/${SKY130A}.tcl
203 rm -f ${MAGIC_STAGING_A}/${SKY130A}-BindKeys
204 rm -f ${MAGIC_STAGING_A}/magicrc
205 (cd ${MAGICTOP_STAGING_A} ; ln -s ${REV_DIR} current)
206 cp -rp custom/scripts/seal_ring_generator ${MAGIC_STAGING_A}/.
Tim Edwards5778c232020-07-07 16:57:52 -0400207 ${CPP} ${SKY130A_DEFS} magic/${TECH}.tech > ${MAGIC_STAGING_A}/${SKY130A}.tech
208 ${CPP} ${SKY130A_DEFS} magic/${TECH}gds.tech > ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech
209 ${CPP} ${SKY130A_DEFS} magic/${TECH}.magicrc > ${MAGIC_STAGING_A}/${SKY130A}.magicrc
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400210 ${CPP} ${SKY130A_DEFS} ../common/pdk.bindkeys > ${MAGIC_STAGING_A}/${SKY130A}-BindKeys
Tim Edwards5778c232020-07-07 16:57:52 -0400211 ${CPP} ${SKY130A_DEFS} magic/${TECH}.tcl > ${MAGIC_STAGING_A}/${SKY130A}.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400212 ${CPP} ${SKY130A_DEFS} ../common/pdk.tcl >> ${MAGIC_STAGING_A}/${SKY130A}.tcl
213
Tim Edwards5778c232020-07-07 16:57:52 -0400214qflow-a: qflow/${TECH}.sh qflow/${TECH}.par
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400215 mkdir -p ${QFLOWTOP_STAGING_A}
216 mkdir -p ${QFLOW_STAGING_A}
217 rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.sh
218 rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.par
219 rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.sh
220 rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.par
221 rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.sh
222 rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.par
223 rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.sh
224 rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.par
225 rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.sh
226 rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.par
227 rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.sh
228 rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.par
229 rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.sh
230 rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.par
Tim Edwards7ec76972020-07-07 21:56:08 -0400231 rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.sh
232 rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.par
Tim Edwards5778c232020-07-07 16:57:52 -0400233 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hd qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400234 ${QFLOW_STAGING_A}/${SKY130A}hd.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400235 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hdll qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400236 ${QFLOW_STAGING_A}/${SKY130A}hdll.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400237 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hvl qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400238 ${QFLOW_STAGING_A}/${SKY130A}hvl.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400239 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hs qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400240 ${QFLOW_STAGING_A}/${SKY130A}hs.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400241 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_lp qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400242 ${QFLOW_STAGING_A}/${SKY130A}lp.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400243 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ls qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400244 ${QFLOW_STAGING_A}/${SKY130A}ls.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400245 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ms qflow/${TECH}.sh > \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400246 ${QFLOW_STAGING_A}/${SKY130A}ms.sh
Tim Edwards7ec76972020-07-07 21:56:08 -0400247 ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_osu_sc qflow/sky130osu.sh > \
248 ${QFLOW_STAGING_A}/${SKY130A}osu.sh
Tim Edwards5778c232020-07-07 16:57:52 -0400249 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hd.par
250 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hdll.par
251 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hvl.par
252 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hs.par
253 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ms.par
254 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}lp.par
255 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ls.par
256 ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}osu.par
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400257
Tim Edwards5778c232020-07-07 16:57:52 -0400258netgen-a: netgen/${TECH}_setup.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400259 mkdir -p ${NETGENTOP_STAGING_A}
260 mkdir -p ${NETGEN_STAGING_A}
261 rm -f ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
262 rm -f ${NETGEN_STAGING_A}/setup.tcl
Tim Edwards5778c232020-07-07 16:57:52 -0400263 ${CPP} ${SKY130A_DEFS} netgen/${TECH}_setup.tcl > ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400264 (cd ${NETGEN_STAGING_A} ; ln -s ${SKY130A}_setup.tcl setup.tcl)
265
Tim Edwards5778c232020-07-07 16:57:52 -0400266klayout-a: klayout/${TECH}.lyp klayout/${TECH}.lyt
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400267 mkdir -p ${KLAYOUTTOP_STAGING_A}
268 mkdir -p ${KLAYOUT_STAGING_A}
269 rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
270 rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
Tim Edwards5778c232020-07-07 16:57:52 -0400271 ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyp > ${KLAYOUT_STAGING_A}/${SKY130A}.lyp
272 ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyt > ${KLAYOUT_STAGING_A}/${SKY130A}.lyt
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400273
Tim Edwards5778c232020-07-07 16:57:52 -0400274openlane-a: openlane/common_pdn.tcl openlane/config.tcl openlane/sky130_fd_sc_hd/config.tcl openlane/sky130_fd_sc_hs/config.tcl
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400275 mkdir -p ${OPENLANETOP_STAGING_A}
276 mkdir -p ${OPENLANE_STAGING_A}
277 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hd
Tim Edwards5778c232020-07-07 16:57:52 -0400278 mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hs
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400279 rm -f ${OPENLANE_STAGING_A}/common_pdn.info
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400280 rm -f ${OPENLANE_STAGING_A}/config.tcl
281 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl
Tim Edwards5778c232020-07-07 16:57:52 -0400282 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info
283 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells
284 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/sky130_fd_sc_hd__fakediode_2.gds
285 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/config.tcl
286 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/tracks.info
287 rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/no_synth.cells
288 ${CPP} ${SKY130A_DEFS} openlane/common_pdn.tcl > ${OPENLANE_STAGING_A}/common_pdn.tcl
289 ${CPP} ${SKY130A_DEFS} openlane/config.tcl > ${OPENLANE_STAGING_A}/config.tcl
290 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl
291 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info
292 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells
293 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
294 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/config.tcl
295 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/tracks.info
296 ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/no_synth.cells
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400297
298vendor-a:
299 # Install base device models from vendor files
300 # (NOTE: .mod and .pm3 files should not be in /cells/?)
301 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
302 -ngspice sky130_fd_pr_base/v%v/models/* filter=custom/scripts/fixspice.py \
303 -ngspice sky130_fd_pr_base/v%v/cells/*.mod filter=custom/scripts/fixspice.py \
304 -ngspice sky130_fd_pr_base/v%v/cells/*.pm3 filter=custom/scripts/fixspice.py \
305 |& tee -a ${SKY130A}_install.log
306 # Install RF device models from vendor files
307 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
308 -ngspice sky130_fd_pr_rf/v%v/models/* filter=custom/scripts/fixspice.py \
309 |& tee -a ${SKY130A}_install.log
310 # Install additional RF device models from vendor files
311 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
312 -ngspice sky130_fd_pr_rf2/v%v/models/* filter=custom/scripts/fixspice.py \
313 |& tee -a ${SKY130A}_install.log
314 # Install base device library from vendor files
315 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
316 -gds %l/v%v/cells/*/*.gds \
317 -spice %l/v%v/cells/*/*.spice ignore=topography \
318 -spice %l/v%v/cells/*/*.sp \
319 -library primitive sky130_fd_pr_base \
320 -library primitive sky130_fd_pr_rf \
321 -library primitive sky130_fd_pr_rf2 |& tee -a ${SKY130A}_install.log
322 # Install SkyWater I/O pad library
323 # Purposely ignoring "-lef sky130_fd_io/v%v/lef/*.lef" and making our own LEF views
324 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
325 -gds %l/v%v/cells/*/*.gds \
326 -verilog %l/v%v/cells/*/*.v \
327 -lib %l/v%v/cells/*/*.lib \
328 -doc %l/v%v/cells/*/*.doc \
329 -cdl %l/v%v/cells/*/*.cdl ignore=topography \
330 -spice %l/v%v/cells/*/*.spice \
331 -library general sky130_fd_io |& tee -a ${SKY130A}_install.log
Ahmed Ghazya285ff42020-07-27 17:52:14 +0200332 # Install all SkyWater digital standard cells.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400333 ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400334 -techlef %l/latest/tech/*.tlef \
335 -spice %l/latest/cells/*/*.spice compile-only \
336 -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
Tim Edwardsb6d540b2020-07-27 09:08:38 -0400337 -lef %l/latest/cells/*/*.lef exclude=*.*.lef compile-only \
Tim Edwardsfd5136b2020-07-08 22:57:04 -0400338 -doc %l/latest/cells/*/*.pdf \
339 -lib %l/latest/timing/*.lib \
340 -gds %l/latest/cells/*/*.gds compile-only \
Tim Edwardsd9fe0002020-07-14 21:53:24 -0400341 -verilog %l/latest/cells/*/*.v compile-only \
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400342 -library digital sky130_fd_sc_hd \
343 -library digital sky130_fd_sc_hdll \
344 -library digital sky130_fd_sc_hvl \
345 -library digital sky130_fd_sc_hs \
346 -library digital sky130_fd_sc_ls \
347 -library digital sky130_fd_sc_ms \
348 -library digital sky130_fd_sc_lp |& tee -a ${SKY130A}_install.log
Tim Edwards31a2adf2020-07-07 21:47:30 -0400349 # Install OSU digital standard cells.
Ahmed Ghazy41c40c42020-07-27 17:00:22 +0200350 # ${STAGE} -source ${OSU_PATH} -target ${STAGING_PATH}/${SKY130A} \
351 # -techlef char/techfiles/scs8.lef rename sky130_osu_sc.tlef \
352 # -spice lib/spice/*.spice compile-only \
353 # -lef outputs/s8_osu130.lef rename sky130_osu_sc.lef \
354 # -lib outputs/*.lib \
355 # -gds lib/gds/*.gds compile-only \
356 # -verilog outputs/VERILOG/*.v \
357 # -library digital sky130_osu_sc
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400358 # Install additional model file (efabless)
Ahmed Ghazy41c40c42020-07-27 17:00:22 +0200359 # ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
360 # -ngspice models/*.lib rename ${SKY130A}.lib \
361 # |& tee -a ${SKY130A}_install.log
362 # # Install custom additions to I/O pad library
363 # ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
364 # -gds %l/gds/*.gds \
365 # -verilog %l/verilog/*.v \
366 # -lef %l/lef/*.lef \
367 # -spice %l/spice/*.spice \
368 # -library general sky130_fd_io |& tee -a ${SKY130A}_install.log
369 # # Add correct bounding boxes on Magic layouts
370 # ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_gpio_ovtv2 \
371 # "FIXED_BBOX 0 407 28000 40000"
372 # ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_xres4v2 \
373 # "FIXED_BBOX 0 407 15000 40000"
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400374
375install: install-local
376
377install-local: install-local-a
378
379install-local-a:
380 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log
381 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
382 -target ${LOCAL_PATH}/${SKY130A} \
383 -link_from ${LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log
384 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log
385
386install-dist: install-dist-a
387
388install-dist-a:
389 echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log
390 ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \
391 -target ${DIST_PATH}/${SKY130A} \
392 -local ${LOCAL_PATH}/${SKY130A} \
393 -link_from ${DIST_LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log
394 echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log
395
396clean: clean-a
397
398clean-a:
399 ${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean
400
401veryclean: veryclean-a
402
403veryclean-a: clean-a
404 ${RM} ${SKY130A}_install.log
405 ${RM} ${SKY130A}_migrate.log