blob: 1d5b4aac3e0d66edaae9b6e13e69c0ef6358db03 [file] [log] [blame]
Tim Edwardscc0029b2022-08-01 18:11:30 -04001# Makefile for Efabless design kits for gf180mcu:
2#
3# This file supports all the process options including 2 to 6 metals,
4# and multiple thicknesses of the top metal. The three PDKs generated by
5# the Makefile represent the three backend options for which the I/O library
6# has layout, which are, namely, 3-, 4-, and 5- metal options.
7#
8# Important note about the process: GF180MCU uses the same base process as
9# other GF180 processes. However, instead of a thin oxide gate, the base
10# oxide is a thick oxide, and the thick oxide mask defines a thicker oxide.
11# The process DRC rules then follow the rule sets for thick oxide devices,
12# so the minimum length transistor is 280nm, making this much more like a
13# 0.28um process than a 0.18um process.
14#
15# Notes about definitions:
16# METALSN means N layers of metal, where N can be 2 to 6.
17# THICKMET3P0 means that the top metal is 3.0um thick
18# THICKMET1P1 means that the top metal is 1.1um thick
19# THICKMET0P9 means that the top metal is 0.9um thick
20# Otherwise, the top metal is 0.6um thick
21# Always use exactly one "METALSN" option (N = 4 to 6).
22#
23# NOTE: Using "METALSN" instead of "METALN" because "METALN" are the preferred
24# layer names in the technology LEF file.
25#
26# MIM means that the MiM cap is defined between top metal and the one below.
27# The process defines a "MIM OPT A" with the MiM cap between metals 3 and 2.
28# Because this option is only available with METALS4 (For METALS3 options A
29# and B are the same), it is not being implemented.
30#
31# MIM caps are mutually-exclusive-selectable 1fF, 1.5fF, or 2fF per um^2.
32# For simplicity, this file assumes the 2fF per um^2 value.
33#
34# HRPOLY1K defines the 1K high sheet rho poly resistor.
35#
36# Not all combinations of options are valid. Global Foundries defines the
37# following combinations as valid (adjusting for the decision not to
38# implement MIM OPT A):
39#
40# METALS2 + THICKMET3P0
41#
42# METALS3 + MIM
43# METALS3 + MIM + THICKMET0P9
44# METALS3 + MIM + THICKMET1P1
45# METALS3 + MIM + THICKMET3P0
46#
47# METALS4 + MIM + THICKMET0P9
48# METALS4 + MIM + THICKMET1P1
49# METALS4 + MIM + THICKMET3P0
50#
51# METALS5 + MIM + THICKMET0P9
52# METALS5 + MIM + THICKMET1P1
53#
54# METALS6 + MIM + THICKMET0P9
55#
56#------------------------------------------------------------------------------
57#
58# The defined options per PDK in this file are:
59#
60# gf180mcuA = METALS3 | MIM | THICKMET3P0 | HRPOLY1K
61# gf180mcuB = METALS4 | MIM | THICKMET1P1 | HRPOLY1K
62# gf180mcuC = METALS5 | MIM | THICKMET0P9 | HRPOLY1K
Johan Euphrosined905a6a2023-02-14 14:18:36 +090063# gf180mcuD = METALS5 | MIM | THICKMET1P1 | HRPOLY1K
Tim Edwardscc0029b2022-08-01 18:11:30 -040064#
65# Written by Tim Edwards April 2022
66# Efabless, Inc.
67#
68#--------------------------------------------------------------------
69# This Makefile contains bash-isms
70SHELL := /bin/bash
71export SHELL
72# We use pipes to save output to files, without pipefail they will always be
73# seen by make as having succeeded.
74SHELLOPTS := pipefail
75export SHELLOPTS
76MV = mv
77PATCH = patch
78SED = @SED@
79
80prefix = @prefix@
81datarootdir = @datarootdir@
82datadir = @datadir@
83
Tim Edwards815863e2023-02-24 11:17:46 -050084# Path to open_pdks root directory (may need changing if it is a symbolic link)
85SCRIPTSDIR ?= ..
Tim Edwardscc0029b2022-08-01 18:11:30 -040086
87# Use git revision if this is a cloned repo; otherwise get the revision
88# from the VERSION file in the directory above.
89GITREV = $(shell git describe --long)
90ifeq (${GITREV},)
91 REVISION = $(shell cat ${SCRIPTSDIR}/VERSION)
92else
93 REVISION = ${GITREV}
94endif
95TECH = gf180mcu
96
97# The run-time environment uses PDKPATH to override the PDK location,
98# so prevent that from happening during PDK install. This will also
99# happen with PDK_ROOT, so avoid that as well.
100unexport PDKPATH
101unexport PDK_ROOT
102
103# If EF_STYLE is set to 1, then efabless naming conventions are
104# used, otherwise the generic naming conventions are used.
105# Mainly this has to do with where the technology LEF files are
106# put (libs.tech/lef/ vs. libs.ref/techLEF).
107
108# EF_STYLE = 0 | 1
109EF_STYLE = @EF_STYLE@
110
111# Normally it's fine to keep the staging path in a local directory,
112# although /tmp or a dedicated staging area are also fine, as long
113# as the install process can write to the path.
114
115STAGING_PATH = $(shell pwd)
116
117SHARED_PDKS_PATH ?= $(datadir)/pdk
118
119# If LINK_TARGETS is set to "none", then files are copied
120# from the SkyWater sources to the target. If set to "source",
121# symbolic links are made in the target directories pointing
122# back to the SkyWater sources. If set to the name of another
123# PDK (e.g, "sky130A"), then symbolic links are made to the
124# same files in that PDK, where they exist, and are copied
125# from source, where they don't.
126#
127# Behavior is to let the link targets for variant A follow the
128# configuration option. Link targets for variant B will always
129# be the files of variant A (which may end up being symbolic
130# links to symbolic links if "source" was chosen for link-targets
131# in the configuration).
132
133# LINK_TARGETS = source | none | gf180mcuA
134LINK_TARGETS_A = @GF180MCU_LINK_TARGETS@
135LINK_TARGETS_B = gf180mcuA
136LINK_TARGETS_C = gf180mcuA
Tim Edwards815863e2023-02-24 11:17:46 -0500137LINK_TARGETS_D = gf180mcuA
Tim Edwardscc0029b2022-08-01 18:11:30 -0400138
Tim Edwards920c1db2023-02-14 11:11:17 -0500139# ENABLED_VARIANTS = all | A | B | C | D
Tim Edwardscc0029b2022-08-01 18:11:30 -0400140ENABLED_VARIANTS = @GF180MCU_ENABLED_VARIANTS@
141ifeq (${ENABLED_VARIANTS},)
Tim Edwards920c1db2023-02-14 11:11:17 -0500142 VARIANTS += A B C D
Tim Edwardscc0029b2022-08-01 18:11:30 -0400143else
144 ifeq (${ENABLED_VARIANTS}, all)
Tim Edwards920c1db2023-02-14 11:11:17 -0500145 VARIANTS += A B C D
Tim Edwardscc0029b2022-08-01 18:11:30 -0400146 else
147 VARIANTS += ${ENABLED_VARIANTS}
148 endif
149endif
150
151# Paths:
152
153# Path to GF180MCU open PDK sources. If this is specified, then all
154# library repositories must be subdirectories of this path.
155GF180MCU_PR_PATH = @GF180MCU_FD_PR_PATH@
Tim Edwards7ddd4132023-02-28 11:53:08 -0500156GF180MCU_PV_PATH = @GF180MCU_FD_PV_PATH@
Tim Edwardscc0029b2022-08-01 18:11:30 -0400157GF180MCU_IO_PATH = @GF180MCU_FD_IO_PATH@
158GF180MCU_SC_7T5V0_PATH = @GF180MCU_FD_SC_MCU7T5V0_PATH@
159GF180MCU_SC_9T5V0_PATH = @GF180MCU_FD_SC_MCU9T5V0_PATH@
160GF180MCU_SRAM_PATH = @GF180MCU_FD_IP_SRAM_PATH@
Tim Edwards44c77292022-09-29 15:12:59 -0400161GF180MCU_OSU_SC_PATH = @GF180MCU_OSU_SC_PATH@
Tim Edwardscc0029b2022-08-01 18:11:30 -0400162
Tim Edwards2f7032e2022-12-16 17:51:45 -0500163USE_REFERENCE = @USE_REFERENCE@
164
Tim Edwardsc74daac2023-01-05 15:38:30 -0500165ifeq (${USE_REFERENCE}, 1)
166 REFERENCE_JSON = ${TECH}.json
167else
168 REFERENCE_JSON =
169endif
170
Tim Edwardscc0029b2022-08-01 18:11:30 -0400171# Path to GF180MCU library sources
172PDK_URL = https://github.com/google
Tim Edwards44c77292022-09-29 15:12:59 -0400173OSU_URL = https://github.com/stineje
R. Timothy Edwardsa2915c92025-05-08 21:26:13 -0400174FOSSI_URL = https://github.com/fossi-foundation
Tim Edwardscc0029b2022-08-01 18:11:30 -0400175
176# Names of library repositories
Tim Edwardsb9a8d052022-11-23 10:56:52 -0500177# NOTE: Switching PDK_LIB_PR and PDK_LIB_SC_7T5V0 to Efabless versions
178# having "quick fixes" under development.
R. Timothy Edwardsa2915c92025-05-08 21:26:13 -0400179PDK_LIB_PR = ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_pr
180PDK_LIB_PV = ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_pv
181PDK_LIB_IO = ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_io
182PDK_LIB_SC_7T5V0 = ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_sc_mcu7t5v0
183PDK_LIB_SC_9T5V0 = ${FOSSI_URL}/globalfoundries-pdk-libs-gf180mcu_fd_sc_mcu9t5v0
Tim Edwardscc0029b2022-08-01 18:11:30 -0400184PDK_LIB_SRAM = ${PDK_URL}/globalfoundries-pdk-ip-gf180mcu_fd_ip_sram
Tim Edwards44c77292022-09-29 15:12:59 -0400185PDK_LIB_OSU_SC = ${OSU_URL}/globalfoundries-pdk-libs-gf180mcu_osu_sc
Tim Edwardscc0029b2022-08-01 18:11:30 -0400186
187# NOTE: Install destination is the git repository of the technology platform.
188# Once updated in git, the git project can be distributed to all hosts.
189#
190ifeq (${EF_STYLE}, 1)
191 CONFIG_DIR = .ef-config
192 REV_DIR = ${REVISION}
193else
194 CONFIG_DIR = .config
195 REV_DIR = .
196endif
197
198# Process nodes created from the master sources
199GF180MCUA = gf180mcuA
200GF180MCUB = gf180mcuB
201GF180MCUC = gf180mcuC
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900202GF180MCUD = gf180mcuD
Tim Edwardscc0029b2022-08-01 18:11:30 -0400203
204DIST_LINK_TARGETS_A = ${LINK_TARGETS_A}
205DIST_LINK_TARGETS_B = ${SHARED_PDKS_PATH}/${LINK_TARGETS_B}
206DIST_LINK_TARGETS_C = ${SHARED_PDKS_PATH}/${LINK_TARGETS_C}
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900207DIST_LINK_TARGETS_D = ${SHARED_PDKS_PATH}/${LINK_TARGETS_D}
Tim Edwardscc0029b2022-08-01 18:11:30 -0400208
209# Basic definitions for each process node
210GF180MCUA_DEFS = -DTECHNAME=gf180mcuA -DREVISION=${REVISION}
211GF180MCUB_DEFS = -DTECHNAME=gf180mcuB -DREVISION=${REVISION}
212GF180MCUC_DEFS = -DTECHNAME=gf180mcuC -DREVISION=${REVISION}
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900213GF180MCUD_DEFS = -DTECHNAME=gf180mcuD -DREVISION=${REVISION}
Tim Edwardscc0029b2022-08-01 18:11:30 -0400214
215# Module definitions for each process node (see top)
216GF180MCUA_DEFS += -DMETALS3 -DMIM -DTHICKMET3P0 -DHRPOLY1K
217GF180MCUB_DEFS += -DMETALS4 -DMIM -DTHICKMET1P1 -DHRPOLY1K
218GF180MCUC_DEFS += -DMETALS5 -DMIM -DTHICKMET0P9 -DHRPOLY1K
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900219GF180MCUD_DEFS += -DMETALS5 -DMIM -DTHICKMET1P1 -DHRPOLY1K
Tim Edwardscc0029b2022-08-01 18:11:30 -0400220
221# Add staging path
222GF180MCUA_DEFS += -DSTAGING_PATH=${STAGING_PATH}
223GF180MCUB_DEFS += -DSTAGING_PATH=${STAGING_PATH}
224GF180MCUC_DEFS += -DSTAGING_PATH=${STAGING_PATH}
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900225GF180MCUD_DEFS += -DSTAGING_PATH=${STAGING_PATH}
Tim Edwardscc0029b2022-08-01 18:11:30 -0400226
227# Get the timestamp of the open_pdks commit to use for stamping layouts.
228OPEN_PDKS_TIMESTAMP = $(shell git log -1 --format="%ad" --date=raw | cut -d' ' -f1)
229TIMESTAMP_OPT = -timestamp ${OPEN_PDKS_TIMESTAMP}
230
231# Record commit numbers for the nodeinfo.json file
232OPEN_PDKS_COMMIT = $(shell git rev-parse HEAD)
233ifeq (${OPEN_PDKS_COMMIT},)
234 COMMIT_DEFS = -DOPEN_PDKS_COMMIT=${REVISION}
235else
236 COMMIT_DEFS = -DOPEN_PDKS_COMMIT=${OPEN_PDKS_COMMIT}
237endif
238
239ifeq (${GF180MCU_SC_9T5V0_PATH},)
240 COMMIT_DEFS += -DFD_SC_MCU9T5V0_COMMIT="unknown"
241else
242 COMMIT_DEFS += -DFD_SC_MCU9T5V0_COMMIT=$(shell cd ${GF180MCU_SC_9T5V0_PATH} ; git rev-parse HEAD)
243endif
244ifeq (${GF180MCU_SC_7T5V0_PATH},)
245 COMMIT_DEFS += -DFD_SC_MCU7T5V0_COMMIT="unknown"
246else
247 COMMIT_DEFS += -DFD_SC_MCU7T5V0_COMMIT=$(shell cd ${GF180MCU_SC_7T5V0_PATH} ; git rev-parse HEAD)
248endif
249ifeq (${GF180MCU_PR_PATH},)
250 COMMIT_DEFS += -DFD_PR_COMMIT="unknown"
251else
252 COMMIT_DEFS += -DFD_PR_COMMIT=$(shell cd ${GF180MCU_PR_PATH} ; git rev-parse HEAD)
253endif
Tim Edwards7ddd4132023-02-28 11:53:08 -0500254ifeq (${GF180MCU_PV_PATH},)
255 COMMIT_DEFS += -DFD_PV_COMMIT="unknown"
256else
257 COMMIT_DEFS += -DFD_PV_COMMIT=$(shell cd ${GF180MCU_PV_PATH} ; git rev-parse HEAD)
258endif
Tim Edwardscc0029b2022-08-01 18:11:30 -0400259ifeq (${GF180MCU_IO_PATH},)
260 COMMIT_DEFS += -DFD_IO_COMMIT="unknown"
261else
262 COMMIT_DEFS += -DFD_IO_COMMIT=$(shell cd ${GF180MCU_IO_PATH} ; git rev-parse HEAD)
263endif
264ifeq (${GF180MCU_SRAM_PATH},)
265 COMMIT_DEFS += -DFD_IP_SRAM_COMMIT="unknown"
266else
267 COMMIT_DEFS += -DFD_IP_SRAM_COMMIT=$(shell cd ${GF180MCU_SRAM_PATH} ; git rev-parse HEAD)
268endif
Tim Edwardsc74daac2023-01-05 15:38:30 -0500269ifeq (${GF180MCU_OSU_SC_PATH},)
270 COMMIT_DEFS += -DOSU_SC_COMMIT="unknown"
271else
272 COMMIT_DEFS += -DOSU_SC_COMMIT=$(shell cd ${GF180MCU_OSU_SC_PATH} ; git rev-parse HEAD)
273endif
Tim Edwardscc0029b2022-08-01 18:11:30 -0400274
275COMMIT_DEFS += -DMAGIC_COMMIT=$(shell magic -dnull -noconsole --commit)
276COMMIT_DEFS += -DMAGIC_VERSION=$(shell magic -dnull -noconsole --version)
277COMMIT_DEFS += -DOPEN_PDKS_VERSION=$(shell cat ${SCRIPTSDIR}/VERSION)
278
279ifeq (${EF_STYLE}, 1)
280 EF_FORMAT = -ef_format
281 GF180MCUA_DEFS += -DEF_FORMAT
282 GF180MCUB_DEFS += -DEF_FORMAT
283 GF180MCUC_DEFS += -DEF_FORMAT
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900284 GF180MCUD_DEFS += -DEF_FORMAT
Tim Edwardscc0029b2022-08-01 18:11:30 -0400285else
286 EF_FORMAT = -std_format
287endif
288
289MAGICTOP = libs.tech/magic
290NETGENTOP = libs.tech/netgen
291QFLOWTOP = libs.tech/qflow
292IRSIMTOP = libs.tech/irsim
293KLAYOUTTOP = libs.tech/klayout
294OPENLANETOP = libs.tech/openlane
295XSCHEMTOP = libs.tech/xschem
296XCIRCUITTOP = libs.tech/xcircuit
297NGSPICETOP = libs.tech/ngspice
298
299ifeq (${EF_STYLE}, 1)
300 MAGICPATH = ${MAGICTOP}/${REVISION}
301 MAGIC_CURRENT = ${MAGICTOP}/current
302else
303 MAGICPATH = ${MAGICTOP}
304 MAGIC_CURRENT = ${MAGICTOP}
305endif
306
307NETGENPATH = ${NETGENTOP}
308IRSIMPATH = ${IRSIMTOP}
309QFLOWPATH = ${QFLOWTOP}
310KLAYOUTPATH = ${KLAYOUTTOP}
311OPENLANEPATH = ${OPENLANETOP}
312XSCHEMPATH = ${XSCHEMTOP}
313XCIRCUITPATH = ${XCIRCUITTOP}
314NGSPICEPATH = ${NGSPICETOP}
315
316MAGICTOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${MAGICTOP}
317NETGENTOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${NETGENTOP}
318IRSIMTOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${IRSIMTOP}
319QFLOWTOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${QFLOWTOP}
320KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${KLAYOUTTOP}
321OPENLANETOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${OPENLANETOP}
322XSCHEMTOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${XSCHEMTOP}
323XCIRCUITTOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${XCIRCUITTOP}
324NGSPICETOP_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${NGSPICETOP}
325
326MAGIC_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${MAGICPATH}
327NETGEN_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${NETGENPATH}
328IRSIM_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${IRSIMPATH}
329QFLOW_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${QFLOWPATH}
330KLAYOUT_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${KLAYOUTPATH}
331OPENLANE_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${OPENLANEPATH}
332XSCHEM_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${XSCHEMPATH}
333XCIRCUIT_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${XCIRCUITPATH}
334NGSPICE_STAGING_A = ${STAGING_PATH}/${GF180MCUA}/${NGSPICEPATH}
335
336MAGICTOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${MAGICTOP}
337NETGENTOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${NETGENTOP}
338IRSIMTOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${IRSIMTOP}
339QFLOWTOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${QFLOWTOP}
340KLAYOUTTOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${KLAYOUTTOP}
341OPENLANETOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${OPENLANETOP}
342XSCHEMTOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${XSCHEMTOP}
343XCIRCUITTOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${XCIRCUITTOP}
344NGSPICETOP_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${NGSPICETOP}
345
346MAGIC_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${MAGICPATH}
347NETGEN_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${NETGENPATH}
348IRSIM_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${IRSIMPATH}
349QFLOW_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${QFLOWPATH}
350KLAYOUT_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${KLAYOUTPATH}
351OPENLANE_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${OPENLANEPATH}
352XSCHEM_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${XSCHEMPATH}
353XCIRCUIT_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${XCIRCUITPATH}
354NGSPICE_STAGING_B = ${STAGING_PATH}/${GF180MCUB}/${NGSPICEPATH}
355
356MAGICTOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${MAGICTOP}
357NETGENTOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${NETGENTOP}
358IRSIMTOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${IRSIMTOP}
359QFLOWTOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${QFLOWTOP}
360KLAYOUTTOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${KLAYOUTTOP}
361OPENLANETOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${OPENLANETOP}
362XSCHEMTOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${XSCHEMTOP}
363XCIRCUITTOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${XCIRCUITTOP}
364NGSPICETOP_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${NGSPICETOP}
365
366MAGIC_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${MAGICPATH}
367NETGEN_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${NETGENPATH}
368IRSIM_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${IRSIMPATH}
369QFLOW_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${QFLOWPATH}
370KLAYOUT_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${KLAYOUTPATH}
371OPENLANE_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${OPENLANEPATH}
372XSCHEM_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${XSCHEMPATH}
373XCIRCUIT_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${XCIRCUITPATH}
374NGSPICE_STAGING_C = ${STAGING_PATH}/${GF180MCUC}/${NGSPICEPATH}
375
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900376MAGICTOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${MAGICTOP}
377NETGENTOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${NETGENTOP}
378IRSIMTOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${IRSIMTOP}
379QFLOWTOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${QFLOWTOP}
380KLAYOUTTOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${KLAYOUTTOP}
381OPENLANETOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${OPENLANETOP}
382XSCHEMTOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${XSCHEMTOP}
383XCIRCUITTOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${XCIRCUITTOP}
384NGSPICETOP_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${NGSPICETOP}
385
386MAGIC_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${MAGICPATH}
387NETGEN_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${NETGENPATH}
388IRSIM_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${IRSIMPATH}
389QFLOW_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${QFLOWPATH}
390KLAYOUT_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${KLAYOUTPATH}
391OPENLANE_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${OPENLANEPATH}
392XSCHEM_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${XSCHEMPATH}
393XCIRCUIT_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${XCIRCUITPATH}
394NGSPICE_STAGING_D = ${STAGING_PATH}/${GF180MCUD}/${NGSPICEPATH}
395
Tim Edwardscc0029b2022-08-01 18:11:30 -0400396GF180MCUA_DEFS += -DMAGIC_CURRENT=${MAGIC_CURRENT}
397GF180MCUB_DEFS += -DMAGIC_CURRENT=${MAGIC_CURRENT}
398GF180MCUC_DEFS += -DMAGIC_CURRENT=${MAGIC_CURRENT}
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900399GF180MCUD_DEFS += -DMAGIC_CURRENT=${MAGIC_CURRENT}
Tim Edwardscc0029b2022-08-01 18:11:30 -0400400
401# These definitions are used by the build recipes
402A_STACK = 3lm
403B_STACK = 4lm
404C_STACK = 5lm
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900405D_STACK = 5lm
Tim Edwardscc0029b2022-08-01 18:11:30 -0400406
407# These definitions are used by the build recipes for the tech LEF
408A_FULLSTACK = 3LM_1TM_30K
409B_FULLSTACK = 4LM_1TM_11K
410C_FULLSTACK = 5LM_1TM_9K
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900411D_FULLSTACK = 5LM_1TM_11K
Tim Edwardscc0029b2022-08-01 18:11:30 -0400412
413# Openlane has a number of files that are common to all digital
414# standard cell libraries, so these are collected in one definition
415# here:
416OPENLANE_COMMON = config.tcl tracks.info no_synth.cells drc_exclude.cells
417
418# Where cpp syntax is followed, this is equivalent to cpp, but it does not
419# mangle non-C source files under the belief that they are actually C code.
420CPP = ${SCRIPTSDIR}/common/preproc.py
421
422# The following script in the ${SCRIPTSDIR}/common directory does most of the work of
423# copying or linking the foundry vendor files to the target directory.
424STAGE = set -f ; ${SCRIPTSDIR}/common/foundry_install.py ${EF_FORMAT} ${TIMESTAMP_OPT}
425ifneq ($(DESTDIR), )
426INSTALL = ${SCRIPTSDIR}/common/staging_install.py -writeto $(DESTDIR) ${EF_FORMAT}
427else
428INSTALL = ${SCRIPTSDIR}/common/staging_install.py ${EF_FORMAT}
429endif
430
Tim Edwardsb6627272023-07-03 16:53:00 -0400431# The script(s) below are used for custom changes to the vendor PDK files
432PORTORDER = ../common/port_order.py ${EF_FORMAT}
433ADDPROP = ../common/insert_property.py ${EF_FORMAT}
Tim Edwards9b4fbeb2023-07-30 17:23:47 -0400434ADDLAYER = ../common/insert_layer.py ${EF_FORMAT}
Tim Edwards64be4f92023-07-29 14:35:42 -0400435REMOVELAB = ../common/remove_label.py ${EF_FORMAT}
Tim Edwardsb6627272023-07-03 16:53:00 -0400436
Tim Edwardscc0029b2022-08-01 18:11:30 -0400437# List the EDA tools to install local setup files for
438TOOLS =
439
440# KLAYOUT_DISABLED = 0 | 1
441KLAYOUT_DISABLED = @KLAYOUT_DISABLED@
442ifneq (${KLAYOUT_DISABLED}, 1)
443 TOOLS += klayout
444endif
445
446# OPENLANE_DISABLED = 0 | 1
447OPENLANE_DISABLED = @OPENLANE_DISABLED@
448ifneq (${OPENLANE_DISABLED}, 1)
449 TOOLS += openlane
450endif
451
452# QFLOW_DISABLED = 0 | 1
453QFLOW_DISABLED = @QFLOW_DISABLED@
454ifneq (${QFLOW_DISABLED}, 1)
455 TOOLS += qflow
456endif
457
458# MAGIC_DISABLED = 0 | 1
459MAGIC_DISABLED = @MAGIC_DISABLED@
460ifneq (${MAGIC_DISABLED}, 1)
461 TOOLS += magic
462endif
463
464# NETGEN_DISABLED = 0 | 1
465NETGEN_DISABLED = @NETGEN_DISABLED@
466ifneq (${NETGEN_DISABLED}, 1)
467 TOOLS += netgen
468endif
469
470# IRSIM_DISABLED = 0 | 1
471IRSIM_DISABLED = @IRSIM_DISABLED@
472ifneq (${IRSIM_DISABLED}, 1)
473 TOOLS += irsim
474endif
475
476# XSCHEM_DISABLED = 0 | 1
477XSCHEM_DISABLED = @XSCHEM_DISABLED@
478ifneq (${XSCHEM_DISABLED}, 1)
479 TOOLS += xschem
480endif
481
482# XCIRCUIT_DISABLED = 0 | 1
483XCIRCUIT_DISABLED = @XCIRCUIT_DISABLED@
484ifneq (${XCIRCUIT_DISABLED}, 1)
485 TOOLS += xcircuit
486endif
487
Tim Edwards1a32c192023-08-01 17:30:16 -0400488# This definition depends on the setting of EF_STYLE
489ifeq (${EF_STYLE}, 1)
490 IO_GDS = gds/gf180mcu_fd_io
491else
492 IO_GDS = gf180mcu_fd_io/gds
493endif
494
Tim Edwards2f7032e2022-12-16 17:51:45 -0500495all: $(foreach var, ${VARIANTS}, all-$(var))
496
Tim Edwardscc0029b2022-08-01 18:11:30 -0400497reference: ${TECH}.json
498 # Rewrite the ${TECH}.json file to change the commit values in
499 # "reference" to reflect the state of the system when "make
500 # reference" was run. This is then committed to the open_pdks
501 # repository to create a known reference configuration of all
502 # tools.
503 ../common/save_commit_refs.py ${COMMIT_DEFS} ${TECH}.json
504
Tim Edwardscc0029b2022-08-01 18:11:30 -0400505# Handle prerequisites
Tim Edwards7ddd4132023-02-28 11:53:08 -0500506prerequisites: pr-repo pv-repo io-repo sc-7t-repo sc-9t-repo sram-repo osu-sc-repo
Tim Edwardscc0029b2022-08-01 18:11:30 -0400507
508pr-repo:
Tim Edwardsc74daac2023-01-05 15:38:30 -0500509 if test "x${REFERENCE_JSON}" != "x"; then \
Tim Edwards8c6e6942023-05-09 11:57:36 -0400510 FD_PR_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_fd_pr | grep -v COMMIT | cut -d'"' -f4` ; \
kareefardic1e21182023-05-10 12:51:47 +0300511 fi ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400512 if test "x${GF180MCU_PR_PATH}" != "x" ; then \
513 if test -d "${GF180MCU_PR_PATH}" ; then \
514 echo "Using existing installation of primitive library from ${GF180MCU_PR_PATH}" ; \
515 else \
516 echo "Downloading primitive library from ${GF180MCU_PR_PATH}" ; \
kareefardic1e21182023-05-10 12:51:47 +0300517 ../scripts/download.sh ${PDK_LIB_PR} ${GF180MCU_PR_PATH} $${FD_PR_COMMIT}; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400518 fi ; \
519 fi
520
Tim Edwards7ddd4132023-02-28 11:53:08 -0500521pv-repo:
522 if test "x${REFERENCE_JSON}" != "x"; then \
Tim Edwards8c6e6942023-05-09 11:57:36 -0400523 FD_PV_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_fd_pv | grep -v COMMIT | cut -d'"' -f4` ; \
kareefardic1e21182023-05-10 12:51:47 +0300524 fi ; \
Tim Edwards7ddd4132023-02-28 11:53:08 -0500525 if test "x${GF180MCU_PV_PATH}" != "x" ; then \
526 if test -d "${GF180MCU_PV_PATH}" ; then \
527 echo "Using existing installation of verification library from ${GF180MCU_PV_PATH}" ; \
528 else \
529 echo "Downloading verification library from ${GF180MCU_PV_PATH}" ; \
kareefardic1e21182023-05-10 12:51:47 +0300530 ../scripts/download.sh ${PDK_LIB_PV} ${GF180MCU_PV_PATH} $${FD_PV_COMMIT}; \
Tim Edwards7ddd4132023-02-28 11:53:08 -0500531 fi ; \
532 fi
533
Tim Edwardscc0029b2022-08-01 18:11:30 -0400534io-repo:
Tim Edwardsc74daac2023-01-05 15:38:30 -0500535 if test "x${REFERENCE_JSON}" != "x"; then \
Tim Edwards8c6e6942023-05-09 11:57:36 -0400536 FD_IO_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_fd_io | grep -v COMMIT | cut -d'"' -f4` ; \
kareefardic1e21182023-05-10 12:51:47 +0300537 fi ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400538 if test "x${GF180MCU_IO_PATH}" != "x" ; then \
539 if test -d "${GF180MCU_IO_PATH}" ; then \
540 echo "Using existing installation of I/O library from ${GF180MCU_IO_PATH}" ; \
541 else \
542 echo "Downloading I/O library from ${GF180MCU_IO_PATH}" ; \
kareefardic1e21182023-05-10 12:51:47 +0300543 ../scripts/download.sh ${PDK_LIB_IO} ${GF180MCU_IO_PATH} $${FD_IO_COMMIT}; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400544 fi ; \
545 fi
546
547sc-7t-repo:
Tim Edwardsc74daac2023-01-05 15:38:30 -0500548 if test "x${REFERENCE_JSON}" != "x"; then \
Tim Edwards8c6e6942023-05-09 11:57:36 -0400549 FD_SC_MCU7T5V0_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_fd_sc_mcu7t5v0 | grep -v COMMIT | cut -d'"' -f4` ; \
kareefardic1e21182023-05-10 12:51:47 +0300550 fi ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400551 if test "x${GF180MCU_SC_7T5V0_PATH}" != "x" ; then \
552 if test -d "${GF180MCU_SC_7T5V0_PATH}" ; then \
553 echo "Using existing installation of 7-track standard cell library from ${GF180MCU_SC_7T5V0_PATH}" ; \
554 else \
555 echo "Downloading 7-track standard cell library from ${GF180MCU_SC_7T5V0_PATH}" ; \
kareefardic1e21182023-05-10 12:51:47 +0300556 ../scripts/download.sh ${PDK_LIB_SC_7T5V0} ${GF180MCU_SC_7T5V0_PATH} $${FD_SC_MCU7T5V0_COMMIT}; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400557 fi ; \
558 fi
559
560sc-9t-repo:
Tim Edwardsc74daac2023-01-05 15:38:30 -0500561 if test "x${REFERENCE_JSON}" != "x"; then \
Tim Edwards8c6e6942023-05-09 11:57:36 -0400562 FD_SC_MCU9T5V0_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_fd_sc_mcu9t5v0 | grep -v COMMIT | cut -d'"' -f4` ; \
kareefardic1e21182023-05-10 12:51:47 +0300563 fi ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400564 if test "x${GF180MCU_SC_9T5V0_PATH}" != "x" ; then \
565 if test -d "${GF180MCU_SC_9T5V0_PATH}" ; then \
566 echo "Using existing installation of 9-track standard cell library from ${GF180MCU_SC_9T5V0_PATH}" ; \
567 else \
568 echo "Downloading 9-track standard cell library from ${GF180MCU_SC_9T5V0_PATH}" ; \
kareefardic1e21182023-05-10 12:51:47 +0300569 ../scripts/download.sh ${PDK_LIB_SC_9T5V0} ${GF180MCU_SC_9T5V0_PATH} $${FD_SC_MCU9T5V0_COMMIT}; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400570 fi ; \
571 fi
572
573sram-repo:
Tim Edwardsc74daac2023-01-05 15:38:30 -0500574 if test "x${REFERENCE_JSON}" != "x"; then \
Tim Edwards8c6e6942023-05-09 11:57:36 -0400575 FD_IP_SRAM_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_fd_ip_sram | grep -v COMMIT | cut -d'"' -f4` ; \
kareefardic1e21182023-05-10 12:51:47 +0300576 fi ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400577 if test "x${GF180MCU_SRAM_PATH}" != "x" ; then \
578 if test -d "${GF180MCU_SRAM_PATH}" ; then \
579 echo "Using existing installation of primitive library from ${GF180MCU_SRAM_PATH}" ; \
580 else \
581 echo "Downloading primitive library from ${GF180MCU_SRAM_PATH}" ; \
kareefardic1e21182023-05-10 12:51:47 +0300582 ../scripts/download.sh ${PDK_LIB_SRAM} ${GF180MCU_SRAM_PATH} $${FD_IP_SRAM_COMMIT}; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400583 fi ; \
584 fi
585
Tim Edwards44c77292022-09-29 15:12:59 -0400586osu-sc-repo:
Tim Edwardsc74daac2023-01-05 15:38:30 -0500587 if test "x${REFERENCE_JSON}" != "x"; then \
Tim Edwards8c6e6942023-05-09 11:57:36 -0400588 OSU_SC_COMMIT=`cat ${REFERENCE_JSON} | grep gf180mcu_osu_sc_gf12t3v3 | grep -v COMMIT | cut -d'"' -f4` ; \
kareefardic1e21182023-05-10 12:51:47 +0300589 fi ; \
Tim Edwards44c77292022-09-29 15:12:59 -0400590 if test "x${GF180MCU_OSU_SC_PATH}" != "x" ; then \
591 if test -d "${GF180MCU_OSU_SC_PATH}" ; then \
592 echo "Using existing installation of OSU 3.3V standard cell library from ${GF180MCU_OSU_SC_PATH}" ; \
593 else \
594 echo "Downloading OSU 3.3V standard cell library from ${GF180MCU_OSU_SC_PATH}" ; \
kareefardic1e21182023-05-10 12:51:47 +0300595 ../scripts/download.sh ${PDK_LIB_OSU_SC} ${GF180MCU_OSU_SC_PATH} $${OSU_SC_COMMIT} ; \
Tim Edwards44c77292022-09-29 15:12:59 -0400596 fi ; \
597 fi
598
Tim Edwardscc0029b2022-08-01 18:11:30 -0400599# Update prerequisites
Tim Edwards7ddd4132023-02-28 11:53:08 -0500600update: update-pr-repo update-pv-repo update-io-repo update-sc-7t-repo update-sc-9t-repo update-sram-repo update-osu-sc-repo
Tim Edwardscc0029b2022-08-01 18:11:30 -0400601
602update-pr-repo:
603 if test "x${GF180MCU_PR_PATH}" != "x" ; then \
604 echo "Updating GF180MCU primitive library from ${PDK_LIB_PR}" ; \
Tim Edwards44c77292022-09-29 15:12:59 -0400605 ../scripts/update.sh ${GF180MCU_PR_PATH} ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400606 fi
607
Tim Edwards7ddd4132023-02-28 11:53:08 -0500608update-pv-repo:
609 if test "x${GF180MCU_PV_PATH}" != "x" ; then \
610 echo "Updating GF180MCU verification library from ${PDK_LIB_PV}" ; \
611 ../scripts/update.sh ${GF180MCU_PV_PATH} ; \
612 fi
613
Tim Edwardscc0029b2022-08-01 18:11:30 -0400614update-io-repo:
615 if test "x${GF180MCU_IO_PATH}" != "x" ; then \
616 echo "Updating GF180MCU I/O library from ${PDK_LIB_IO}" ; \
Tim Edwards44c77292022-09-29 15:12:59 -0400617 ../scripts/update.sh ${GF180MCU_IO_PATH} ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400618 fi
619
620update-sc-7t-repo:
621 if test "x${GF180MCU_SC_7T5V0_PATH}" != "x" ; then \
622 echo "Updating GF180MCU 7-track standard cell library from ${PDK_LIB_SC_7T5V0}" ; \
Tim Edwards44c77292022-09-29 15:12:59 -0400623 ../scripts/update.sh ${GF180MCU_SC_7T5V0_PATH} ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400624 fi
625
626update-sc-9t-repo:
627 if test "x${GF180MCU_SC_9T5V0_PATH}" != "x" ; then \
628 echo "Updating GF180MCU 9-track standard cell library from ${PDK_LIB_SC_9T5V0}" ; \
Tim Edwards44c77292022-09-29 15:12:59 -0400629 ../scripts/update.sh ${GF180MCU_SC_9T5V0_PATH} ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400630 fi
631
632update-sram-repo:
633 if test "x${GF180MCU_SRAM_PATH}" != "x" ; then \
634 echo "Updating GF180MCU SRAM macro library from ${PDK_LIB_SRAM}" ; \
Tim Edwards44c77292022-09-29 15:12:59 -0400635 ../scripts/update.sh ${GF180MCU_SRAM_PATH} ; \
636 fi
637
638update-osu-sc-repo:
639 if test "x${GF180MCU_OSU_SC_PATH}" != "x" ; then \
640 echo "Updating GF180MCU OSU 3.3V standard cell library from ${PDK_LIB_OSU_SC}" ; \
641 ../scripts/update.sh ${GF180MCU_OSU_SC_PATH} ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400642 fi
643
644all-%: prerequisites
645 echo "Starting gf180mcu$* PDK staging on "`date` > ${GF180MCU$*}_make.log
646 ${MAKE} general-$*
647 ${MAKE} tools-$*
648 ${MAKE} vendor-$*
649 echo "Ended gf180mcu$* PDK staging on "`date` >> ${GF180MCU$*}_make.log
650
651general-%: ${TECH}.json
652 mkdir -p ${STAGING_PATH}/${GF180MCU$*}/${CONFIG_DIR}
653 rm -f ${STAGING_PATH}/${GF180MCU$*}/${CONFIG_DIR}/nodeinfo.json
654 ${CPP} ${GF180MCU$*_DEFS} ${COMMIT_DEFS} ${TECH}.json \
655 ${STAGING_PATH}/${GF180MCU$*}/${CONFIG_DIR}/nodeinfo.json
656
657tools-A: $(addsuffix -A, $(TOOLS))
658
659tools-B: $(addsuffix -B, $(TOOLS))
660
661tools-C: $(addsuffix -C, $(TOOLS))
662
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900663tools-D: $(addsuffix -D, $(TOOLS))
664
Tim Edwardscc0029b2022-08-01 18:11:30 -0400665magic-%: magic/${TECH}.tech magic/${TECH}gds.tech magic/${TECH}.magicrc magic/${TECH}.tcl
666 mkdir -p ${MAGICTOP_STAGING_$*}
667 mkdir -p ${MAGIC_STAGING_$*}
668 rm -f ${MAGICTOP_STAGING_$*}/current
669 rm -f ${MAGIC_STAGING_$*}/${GF180MCU$*}.tech
670 rm -f ${MAGIC_STAGING_$*}/${GF180MCU$*}-GDS.tech
671 rm -f ${MAGIC_STAGING_$*}/${GF180MCU$*}.tcl
672 rm -f ${MAGIC_STAGING_$*}/${GF180MCU$*}-BindKeys
673 rm -f ${MAGIC_STAGING_$*}/magicrc
674 if test "${EF_STYLE}" == "1" ; then \
Tim Edwardsb6627272023-07-03 16:53:00 -0400675 (cd ${MAGICTOP_STAGING_$*} ; ln -f -s ${REV_DIR} current) ; \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400676 fi
677
678 ${CPP} ${GF180MCU$*_DEFS} magic/${TECH}.tech \
679 ${MAGIC_STAGING_$*}/${GF180MCU$*}.tech
680 ${CPP} ${GF180MCU$*_DEFS} magic/${TECH}gds.tech \
681 ${MAGIC_STAGING_$*}/${GF180MCU$*}-GDS.tech
682 ${CPP} ${GF180MCU$*_DEFS} magic/${TECH}.magicrc \
683 ${MAGIC_STAGING_$*}/${GF180MCU$*}.magicrc
684 ${CPP} ${GF180MCU$*_DEFS} ${SCRIPTSDIR}/common/pdk.bindkeys \
685 ${MAGIC_STAGING_$*}/${GF180MCU$*}-BindKeys
686 ${CPP} ${GF180MCU$*_DEFS} magic/${TECH}.tcl \
687 ${MAGIC_STAGING_$*}/${GF180MCU$*}.tcl
688 ${CPP} ${GF180MCU$*_DEFS} ${SCRIPTSDIR}/common/pdk.tcl >> \
689 ${MAGIC_STAGING_$*}/${GF180MCU$*}.tcl
690
691netgen-%: netgen/${TECH}_setup.tcl
692 mkdir -p ${NETGENTOP_STAGING_$*}
693 mkdir -p ${NETGEN_STAGING_$*}
694 rm -f ${NETGEN_STAGING_$*}/${GF180MCU$*}_setup.tcl
695 rm -f ${NETGEN_STAGING_$*}/setup.tcl
696 ${CPP} ${GF180MCU$*_DEFS} netgen/${TECH}_setup.tcl \
697 ${NETGEN_STAGING_$*}/${GF180MCU$*}_setup.tcl
Tim Edwardsb6627272023-07-03 16:53:00 -0400698 (cd ${NETGEN_STAGING_$*} ; ln -f -s ${GF180MCU$*}_setup.tcl setup.tcl)
Tim Edwardscc0029b2022-08-01 18:11:30 -0400699
700qflow-%: qflow/${TECH}.sh qflow/${TECH}.par
701 mkdir -p ${QFLOWTOP_STAGING_$*}
702 mkdir -p ${QFLOW_STAGING_$*}
703 rm -f ${QFLOW_STAGING_$*}/gf180mcu_fd_sc_mcu7t5v0.sh
704 rm -f ${QFLOW_STAGING_$*}/gf180mcu_fd_sc_mcu7t5v0.par
705 rm -f ${QFLOW_STAGING_$*}/gf180mcu_fd_sc_mcu9t5v0.sh
706 rm -f ${QFLOW_STAGING_$*}/gf180mcu_fd_sc_mcu9t5v0.par
707 ${CPP} ${GF180MCU$*_DEFS} -DLIBRARY=gf180mcu_fd_sc_mcu7t5v0 \
708 qflow/${TECH}.sh ${QFLOW_STAGING_$*}/gf180mcu_fd_sc_mcu7t5v0.sh
709 ${CPP} ${GF180MCU$*_DEFS} -DLIBRARY=gf180mcu_fd_sc_mcu9t5v0 \
710 qflow/${TECH}.sh ${QFLOW_STAGING_$*}/gf180mcu_fd_sc_mcu9t5v0.sh
711 ${CPP} ${GF180MCU$*_DEFS} qflow/${TECH}.par \
712 ${QFLOW_STAGING_$*}/gf180mcu_fd_sc_mcu7t5v0.par
713 ${CPP} ${GF180MCU$*_DEFS} qflow/${TECH}.par \
714 ${QFLOW_STAGING_$*}/gf180mcu_fd_sc_mcu9t5v0.par
715
716irsim-%:
717 mkdir -p ${IRSIMTOP_STAGING_$*}
718 mkdir -p ${IRSIM_STAGING_$*}
719
Tim Edwards7ddd4132023-02-28 11:53:08 -0500720klayout-%: ${GF180MCU_PV_PATH} ${GF180MCU_PR_PATH}
Tim Edwardscc0029b2022-08-01 18:11:30 -0400721 mkdir -p ${KLAYOUTTOP_STAGING_$*}
722 mkdir -p ${KLAYOUT_STAGING_$*}
723 rm -rf ${KLAYOUT_STAGING_$*}/drc
724 rm -rf ${KLAYOUT_STAGING_$*}/lvs
725 rm -rf ${KLAYOUT_STAGING_$*}/tech
726 rm -rf ${KLAYOUT_STAGING_$*}/pymacros
727 mkdir ${KLAYOUT_STAGING_$*}/drc
728 mkdir ${KLAYOUT_STAGING_$*}/lvs
729 mkdir ${KLAYOUT_STAGING_$*}/tech
730 mkdir ${KLAYOUT_STAGING_$*}/pymacros
731
Tim Edwards7ddd4132023-02-28 11:53:08 -0500732 cp -rp ${GF180MCU_PV_PATH}/klayout/drc/* \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400733 ${KLAYOUT_STAGING_$*}/drc
Johan Euphrosine02bf3612023-06-02 15:27:32 +0900734 cp -rp ${GF180MCU_PV_PATH}/klayout/lvs/* \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400735 ${KLAYOUT_STAGING_$*}/lvs
736 cp -rp ${GF180MCU_PR_PATH}/cells/klayout/pymacros/cells/* \
737 ${KLAYOUT_STAGING_$*}/pymacros
738 cp -rp ${GF180MCU_PR_PATH}/tech/klayout/* \
739 ${KLAYOUT_STAGING_$*}/tech
740 cp -rp ${GF180MCU_PR_PATH}/cells/klayout/pymacros/*.lym \
741 ${KLAYOUT_STAGING_$*}/tech
742
743xcircuit-%:
744 rm -rf ${XCIRCUIT_STAGING_$*}
745 mkdir -p ${XCIRCUITTOP_STAGING_$*}
746 mkdir -p ${XCIRCUIT_STAGING_$*}
747
748xschem-%: ${GF180MCU_PR_PATH}
749 rm -rf ${XSCHEM_STAGING_$*}
750 mkdir -p ${XSCHEMTOP_STAGING_$*}
751 mkdir -p ${XSCHEM_STAGING_$*}
752 cp -rp ${GF180MCU_PR_PATH}/cells/xschem/symbols ${XSCHEM_STAGING_$*}
753 cp -rp ${GF180MCU_PR_PATH}/cells/xschem/tests ${XSCHEM_STAGING_$*}
754 cp -rp ${GF180MCU_PR_PATH}/cells/xschem/xschemrc ${XSCHEM_STAGING_$*}
Tim Edwards559a1172023-10-24 15:31:46 -0400755 # Make open_pdks-specific modifications to the xschemrc file
756 ./custom/scripts/fix_xschemrc.py ${XSCHEM_STAGING_$*}/xschemrc \
757 ${GF180MCU$*} 2>&1 | tee -a ${GF180MCU$*}_make.log || true
Tim Edwardscc0029b2022-08-01 18:11:30 -0400758
759openlane-%: openlane/config.tcl openlane/gf180mcu_fd_sc_mcu7t5v0/config.tcl openlane/gf180mcu_fd_sc_mcu9t5v0/config.tcl
760 mkdir -p ${OPENLANETOP_STAGING_$*}
761 mkdir -p ${OPENLANE_STAGING_$*}
762 rm -rf ${OPENLANE_STAGING_$*}/gf180mcu_fd_sc_mcu7t5v0
763 rm -rf ${OPENLANE_STAGING_$*}/gf180mcu_fd_sc_mcu9t5v0
764 mkdir ${OPENLANE_STAGING_$*}/gf180mcu_fd_sc_mcu7t5v0
765 mkdir ${OPENLANE_STAGING_$*}/gf180mcu_fd_sc_mcu9t5v0
766 for file in ${OPENLANE_COMMON} ; do \
767 rm -f ${OPENLANE_STAGING_$*}/gf180mcu_fd_sc_mcu7t5v0/$$file ; \
768 done
769 for file in ${OPENLANE_COMMON} ; do \
770 rm -f ${OPENLANE_STAGING_$*}/gf180mcu_fd_sc_mcu9t5v0/$$file ; \
771 done
772 ${CPP} ${GF180MCU$*_DEFS} openlane/config.tcl ${OPENLANE_STAGING_$*}/config.tcl
773
774 for file in ${OPENLANE_COMMON} ; do \
775 ${CPP} -quiet ${GF180MCU$*_DEFS} openlane/gf180mcu_fd_sc_mcu7t5v0/$$file \
776 ${OPENLANE_STAGING_$*}/gf180mcu_fd_sc_mcu7t5v0/$$file ; \
777 done
778 for file in ${OPENLANE_COMMON} ; do \
779 ${CPP} -quiet ${GF180MCU$*_DEFS} openlane/gf180mcu_fd_sc_mcu9t5v0/$$file \
780 ${OPENLANE_STAGING_$*}/gf180mcu_fd_sc_mcu9t5v0/$$file ; \
781 done
782
Tim Edwards35c72652022-11-25 10:33:20 -0500783 rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.min.*
784 rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.nom.*
785 rm -f ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.max.*
Tim Edwardscc0029b2022-08-01 18:11:30 -0400786
787 if test -f openlane/rules.openrcx.gf180mcu$*.min.magic ; then \
788 ${CPP} ${GF180MCU$*_DEFS} openlane/rules.openrcx.gf180mcu$*.min.magic \
789 ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.min.magic ;\
790 fi
791 if test -f openlane/rules.openrcx.gf180mcu$*.nom.magic ; then \
792 ${CPP} ${GF180MCU$*_DEFS} openlane/rules.openrcx.gf180mcu$*.nom.magic \
793 ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.nom.magic ;\
794 fi
795 if test -f openlane/rules.openrcx.gf180mcu$*.max.magic ; then \
796 ${CPP} ${GF180MCU$*_DEFS} openlane/rules.openrcx.gf180mcu$*.max.magic \
797 ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.max.magic ;\
798 fi
Tim Edwards35c72652022-11-25 10:33:20 -0500799 if test -f openlane/rules.openrcx.gf180mcu$*.min ; then \
800 ${CPP} ${GF180MCU$*_DEFS} openlane/rules.openrcx.gf180mcu$*.min \
801 ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.min ;\
802 fi
803 if test -f openlane/rules.openrcx.gf180mcu$*.nom ; then \
804 ${CPP} ${GF180MCU$*_DEFS} openlane/rules.openrcx.gf180mcu$*.nom \
805 ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.nom ;\
806 fi
807 if test -f openlane/rules.openrcx.gf180mcu$*.max ; then \
808 ${CPP} ${GF180MCU$*_DEFS} openlane/rules.openrcx.gf180mcu$*.max \
809 ${OPENLANE_STAGING_$*}/rules.openrcx.gf180mcu$*.max ;\
810 fi
Tim Edwardscc0029b2022-08-01 18:11:30 -0400811
Tim Edwards44c77292022-09-29 15:12:59 -0400812vendor-A: primitive-build-A digital-7t5v0-build-A digital-9t5v0-build-A io-build-A sram-build-A digital-osu-build-A
Tim Edwardscc0029b2022-08-01 18:11:30 -0400813
Tim Edwards44c77292022-09-29 15:12:59 -0400814vendor-B: primitive-build-B digital-7t5v0-build-B digital-9t5v0-build-B io-build-B sram-build-B digital-osu-build-B
Tim Edwardscc0029b2022-08-01 18:11:30 -0400815
Tim Edwards44c77292022-09-29 15:12:59 -0400816vendor-C: primitive-build-C digital-7t5v0-build-C digital-9t5v0-build-C io-build-C sram-build-C digital-osu-build-C
Tim Edwardscc0029b2022-08-01 18:11:30 -0400817
Johan Euphrosined905a6a2023-02-14 14:18:36 +0900818vendor-D: primitive-build-D digital-7t5v0-build-D digital-9t5v0-build-D io-build-D sram-build-D digital-osu-build-D
819
Tim Edwardscc0029b2022-08-01 18:11:30 -0400820primitive-build-%:
Tim Edwards970c60d2023-08-07 15:11:30 -0400821 if test "x${GF180MCU_PR_PATH}" != "x" ; then \
822 if test -d ${GF180MCU_PR_PATH} ; then \
823 echo "Building primitives library and simulation models" ;\
824 make primitive-$* ;\
825 fi ;\
Tim Edwardscc0029b2022-08-01 18:11:30 -0400826 fi
827
828io-build-%:
Tim Edwards970c60d2023-08-07 15:11:30 -0400829 if test "x${GF180MCU_IO_PATH}" != "x" ; then \
830 if test -d ${GF180MCU_IO_PATH} ; then \
831 echo "Building padframe I/O libraries" ;\
832 make io-$* ;\
833 fi ;\
Tim Edwardscc0029b2022-08-01 18:11:30 -0400834 fi
835
836digital-9t5v0-build-%:
Tim Edwards970c60d2023-08-07 15:11:30 -0400837 if test "x${GF180MCU_SC_9T5V0_PATH}" != "x" ; then \
838 if test -d ${GF180MCU_SC_9T5V0_PATH} ; then \
839 echo "Building 5V 9-track digital standard cell libraries" ;\
840 make digital-9t5v0-$* ;\
841 fi ;\
Tim Edwardscc0029b2022-08-01 18:11:30 -0400842 fi
843
844digital-7t5v0-build-%:
Tim Edwards970c60d2023-08-07 15:11:30 -0400845 if test "x${GF180MCU_SC_7T5V0_PATH}" != "x" ; then \
846 if test -d ${GF180MCU_SC_7T5V0_PATH} ; then \
847 echo "Building 5V 7-track digital standard cell libraries" ;\
848 make digital-7t5v0-$* ;\
849 fi ;\
Tim Edwardscc0029b2022-08-01 18:11:30 -0400850 fi
851
852sram-build-%:
Tim Edwards970c60d2023-08-07 15:11:30 -0400853 if test "x${GF180MCU_SRAM_PATH}" != "x" ; then \
854 if test -d ${GF180MCU_SRAM_PATH} ; then \
855 echo "Building SRAM libraries" ;\
856 make sram-$* ;\
857 fi ;\
Tim Edwardscc0029b2022-08-01 18:11:30 -0400858 fi
859
Tim Edwards44c77292022-09-29 15:12:59 -0400860digital-osu-build-%:
Tim Edwards970c60d2023-08-07 15:11:30 -0400861 if test "x${GF180MCU_OSU_SC_PATH}" != "x" ; then \
862 if test -d ${GF180MCU_OSU_SC_PATH} ; then \
863 echo "Building OSU 3.3V digital standard cell libraries" ;\
864 make digital-osu-$* ;\
865 fi ;\
Tim Edwards44c77292022-09-29 15:12:59 -0400866 fi
867
Tim Edwardscc0029b2022-08-01 18:11:30 -0400868primitive-%:
869 # Install tech LEF and primitive devices from vendor files
870 ${STAGE} -source ${GF180MCU_PR_PATH} \
871 -target ${STAGING_PATH}/${GF180MCU$*} \
872 -ngspice models/ngspice/*.ngspice \
873 -xyce models/xyce/*.xyce \
874 2>&1 | tee -a ${GF180MCU$*}_make.log
Tim Edwardsb6627272023-07-03 16:53:00 -0400875 # Install primitive device fixed layout cells from GDS
876 ${STAGE} -source ${GF180MCU_PR_PATH} \
877 -target ${STAGING_PATH}/${GF180MCU$*} \
878 -gds cells/klayout/pymacros/cells/*/*.gds noextract \
879 -library primitive gf180mcu_fd_pr \
880 2>&1 | tee -a ${GF180MCU$*}_make.log
881 # The klayout GUI prefers that drc/ and lvs/ exist under tech/,
882 # so make symbolic links.
883 (cd ${STAGING_PATH}/${GF180MCU$*}/libs.tech/klayout/tech ; \
884 ln -f -s ../lvs ; ln -f -s ../drc)
885 # Add "device primitive" property to the bipolar devices and
886 # order the ports correctly to match the subcircuit model. This
887 # ensures that the bipolar layouts extract correctly.
888 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
889 npn_00p54x02p00 "device primitive"
890 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
891 npn_00p54x02p00 I1_default_C I1_default_B I1_default_E I1_default_S
892 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
893 npn_00p54x04p00 "device primitive"
894 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
895 npn_00p54x04p00 I1_default_C I1_default_B I1_default_E I1_default_S
896 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
897 npn_00p54x08p00 "device primitive"
898 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
899 npn_00p54x08p00 I1_default_C I1_default_B I1_default_E I1_default_S
900 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
901 npn_00p54x16p00 "device primitive"
902 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
903 npn_00p54x16p00 I1_default_C I1_default_B I1_default_E I1_default_S
904 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
905 npn_05p00x05p00 "device primitive"
906 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
907 npn_05p00x05p00 I1_default_C I1_default_B I1_default_E I1_default_S
908 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
909 npn_10p00x10p00 "device primitive"
910 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
911 npn_10p00x10p00 I1_default_C I1_default_B I1_default_E I1_default_S
912 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
913 pnp_05p00x00p42 "device primitive"
914 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
915 pnp_05p00x00p42 I1_default_C I1_default_B I1_default_E
916 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
917 pnp_05p00x05p00 "device primitive"
918 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
919 pnp_05p00x05p00 I1_default_C I1_default_B I1_default_E
920 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
921 pnp_10p00x10p00 "device primitive"
922 ${PORTORDER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
923 pnp_10p00x10p00 I1_default_C I1_default_B I1_default_E
Tim Edwardse53f6412023-07-19 17:18:56 -0400924 # Cells which have a different cell name than the device name
925 # should replace the "gencell" property with the device name.
926 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
927 efuse_cell "gencell efuse"
928 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
929 npn_00p54x02p00_0 "gencell npn_00p54x02p00"
930 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
931 npn_00p54x04p00_0 "gencell npn_00p54x04p00"
932 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
933 npn_00p54x08p00_0 "gencell npn_00p54x08p00"
934 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
935 npn_00p54x16p00_0 "gencell npn_00p54x16p00"
936 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
937 npn_05p00x05p00_0 "gencell npn_05p00x05p00"
938 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
939 npn_10p00x10p00_0 "gencell npn_10p00x10p00"
940 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
941 pnp_05p00x00p42_0 "gencell pnp_05p00x00p42"
942 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
943 pnp_05p00x05p00_0 "gencell pnp_05p00x05p00"
944 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
945 pnp_10p00x00p42_0 "gencell pnp_10p00x00p42"
946 ${ADDPROP} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_pr \
947 pnp_10p00x10p00_0 "gencell pnp_10p00x10p00"
Tim Edwardscc0029b2022-08-01 18:11:30 -0400948
949digital-9t5v0-%:
950 # Install 5V 9-track digital standard cells from vendor files
951 ${STAGE} -source ${GF180MCU_SC_9T5V0_PATH} \
952 -target ${STAGING_PATH}/${GF180MCU$*} \
953 -techlef tech/gf180mcu_${$*_FULLSTACK}_9t_tech.lef \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500954 filter=custom/scripts/fix_techlef.py \
955 rename=gf180mcu_fd_sc_mcu9t5v0__nom.tlef \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400956 -cdl cells/*/*.cdl compile-only noconvert \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500957 -lib cells/*/*_ff_125C_1v98.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500958 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400959 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ff_125C_1v98.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400960 rename=gf180mcu_fd_sc_mcu9t5v0__ff_125C_1v98 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500961 -lib cells/*/*_ff_n40C_1v98.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500962 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400963 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ff_n40C_1v98.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400964 rename=gf180mcu_fd_sc_mcu9t5v0__ff_n40C_1v98 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500965 -lib cells/*/*_ff_125C_3v60.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500966 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400967 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ff_125C_3v60.lib \
968 rename=gf180mcu_fd_sc_mcu9t5v0__ff_125C_3v60 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500969 -lib cells/*/*_ff_n40C_3v60.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500970 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400971 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ff_n40C_3v60.lib \
972 rename=gf180mcu_fd_sc_mcu9t5v0__ff_n40C_3v60 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500973 -lib cells/*/*_ff_125C_5v50.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500974 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400975 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ff_125C_5v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400976 rename=gf180mcu_fd_sc_mcu9t5v0__ff_125C_5v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500977 -lib cells/*/*_ff_n40C_5v50.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500978 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400979 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ff_n40C_5v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400980 rename=gf180mcu_fd_sc_mcu9t5v0__ff_n40C_5v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500981 -lib cells/*/*_ss_125C_1v62.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500982 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400983 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ss_125C_1v62.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400984 rename=gf180mcu_fd_sc_mcu9t5v0__ss_125C_1v62 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500985 -lib cells/*/*_ss_n40C_1v62.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500986 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400987 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ss_n40C_1v62.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400988 rename=gf180mcu_fd_sc_mcu9t5v0__ss_n40C_1v62 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500989 -lib cells/*/*_ss_125C_3v00.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500990 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400991 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ss_125C_3v00.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400992 rename=gf180mcu_fd_sc_mcu9t5v0__ss_125C_3v00 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500993 -lib cells/*/*_ss_n40C_3v00.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500994 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400995 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ss_n40C_3v00.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -0400996 rename=gf180mcu_fd_sc_mcu9t5v0__ss_n40C_3v00 \
Tim Edwardscbfa5922023-12-11 15:03:51 -0500997 -lib cells/*/*_ss_125C_4v50.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -0500998 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -0400999 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ss_125C_4v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001000 rename=gf180mcu_fd_sc_mcu9t5v0__ss_125C_4v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001001 -lib cells/*/*_ss_n40C_4v50.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001002 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001003 header=liberty/gf180mcu_fd_sc_mcu9t5v0__ss_n40C_4v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001004 rename=gf180mcu_fd_sc_mcu9t5v0__ss_n40C_4v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001005 -lib cells/*/*_tt_025C_1v80.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001006 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001007 header=liberty/gf180mcu_fd_sc_mcu9t5v0__tt_025C_1v80.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001008 rename=gf180mcu_fd_sc_mcu9t5v0__tt_025C_1v80 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001009 -lib cells/*/*_tt_025C_3v30.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001010 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001011 header=liberty/gf180mcu_fd_sc_mcu9t5v0__tt_025C_3v30.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001012 rename=gf180mcu_fd_sc_mcu9t5v0__tt_025C_3v30 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001013 -lib cells/*/*_tt_025C_5v00.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001014 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001015 header=liberty/gf180mcu_fd_sc_mcu9t5v0__tt_025C_5v00.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001016 rename=gf180mcu_fd_sc_mcu9t5v0__tt_025C_5v00 \
Tim Edwards2f7032e2022-12-16 17:51:45 -05001017 -spice cells/*/*.cdl compile-only \
1018 filter=custom/scripts/convert_sc_cdl.py \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001019 -gds cells/*/*.gds compile-only \
Tim Edwardsf25e1202022-12-02 11:08:03 -05001020 options=custom/scripts/gds_import_sc.tcl \
Tim Edwards21a8ac62022-12-01 13:05:48 -05001021 filter=custom/scripts/fix_stdcell_gds.py \
Tim Edwards053d9172022-12-02 17:23:01 -05001022 -lef cells/*/*.lef annotate compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001023 filter=custom/scripts/fix_digital_lef.py \
1024 -verilog models/*/*.v compile-only rename=primitives \
Tim Edwards405227f2023-07-25 16:48:31 -04001025 -verilog cells/*/*.v exclude=*.*.v,primitives.v \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001026 compile-only filter=custom/scripts/inc_verilog.py \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001027 -library digital gf180mcu_fd_sc_mcu9t5v0 2>&1 | \
1028 tee -a ${GF180MCU$*}_make.log
Tim Edwards9c6fd952022-11-29 22:34:36 -05001029 # Create minimum/maximum technology LEF files
1030 ./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${GF180MCU$*} \
1031 -library=9t5v0 2>&1 | tee -a ${GF180MCU$*}_make.log || true
Tim Edwards2f7032e2022-12-16 17:51:45 -05001032
Tim Edwardscc0029b2022-08-01 18:11:30 -04001033digital-7t5v0-%:
1034 # Install 5V 7-track digital standard cells from vendor files
1035 ${STAGE} -source ${GF180MCU_SC_7T5V0_PATH} \
1036 -target ${STAGING_PATH}/${GF180MCU$*} \
1037 -techlef tech/gf180mcu_${$*_FULLSTACK}_7t_tech.lef \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001038 filter=custom/scripts/fix_techlef.py \
1039 rename=gf180mcu_fd_sc_mcu7t5v0__nom.tlef \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001040 -cdl cells/*/*.cdl compile-only noconvert \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001041 -lib cells/*/*_ff_125C_1v98.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001042 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001043 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ff_125C_1v98.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001044 rename=gf180mcu_fd_sc_mcu7t5v0__ff_125C_1v98 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001045 -lib cells/*/*_ff_n40C_1v98.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001046 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001047 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ff_n40C_1v98.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001048 rename=gf180mcu_fd_sc_mcu7t5v0__ff_n40C_1v98 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001049 -lib cells/*/*_ff_125C_3v60.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001050 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001051 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ff_125C_3v60.lib \
1052 rename=gf180mcu_fd_sc_mcu7t5v0__ff_125C_3v60 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001053 -lib cells/*/*_ff_n40C_3v60.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001054 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001055 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ff_n40C_3v60.lib \
1056 rename=gf180mcu_fd_sc_mcu7t5v0__ff_n40C_3v60 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001057 -lib cells/*/*_ff_125C_5v50.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001058 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001059 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ff_125C_5v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001060 rename=gf180mcu_fd_sc_mcu7t5v0__ff_125C_5v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001061 -lib cells/*/*_ff_n40C_5v50.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001062 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001063 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ff_n40C_5v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001064 rename=gf180mcu_fd_sc_mcu7t5v0__ff_n40C_5v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001065 -lib cells/*/*_ss_125C_1v62.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001066 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001067 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ss_125C_1v62.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001068 rename=gf180mcu_fd_sc_mcu7t5v0__ss_125C_1v62 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001069 -lib cells/*/*_ss_n40C_1v62.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001070 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001071 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ss_n40C_1v62.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001072 rename=gf180mcu_fd_sc_mcu7t5v0__ss_n40C_1v62 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001073 -lib cells/*/*_ss_125C_3v00.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001074 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001075 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ss_125C_3v00.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001076 rename=gf180mcu_fd_sc_mcu7t5v0__ss_125C_3v00 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001077 -lib cells/*/*_ss_n40C_3v00.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001078 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001079 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ss_n40C_3v00.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001080 rename=gf180mcu_fd_sc_mcu7t5v0__ss_n40C_3v00 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001081 -lib cells/*/*_ss_125C_4v50.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001082 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001083 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ss_125C_4v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001084 rename=gf180mcu_fd_sc_mcu7t5v0__ss_125C_4v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001085 -lib cells/*/*_ss_n40C_4v50.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001086 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001087 header=liberty/gf180mcu_fd_sc_mcu7t5v0__ss_n40C_4v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001088 rename=gf180mcu_fd_sc_mcu7t5v0__ss_n40C_4v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001089 -lib cells/*/*_tt_025C_1v80.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001090 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001091 header=liberty/gf180mcu_fd_sc_mcu7t5v0__tt_025C_1v80.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001092 rename=gf180mcu_fd_sc_mcu7t5v0__tt_025C_1v80 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001093 -lib cells/*/*_tt_025C_3v30.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001094 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001095 header=liberty/gf180mcu_fd_sc_mcu7t5v0__tt_025C_3v30.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001096 rename=gf180mcu_fd_sc_mcu7t5v0__tt_025C_3v30 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001097 -lib cells/*/*_tt_025C_5v00.lib compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001098 filter=custom/scripts/fix_related_bias_pins.py \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001099 header=liberty/gf180mcu_fd_sc_mcu7t5v0__tt_025C_5v00.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001100 rename=gf180mcu_fd_sc_mcu7t5v0__tt_025C_5v00 \
Tim Edwards2f7032e2022-12-16 17:51:45 -05001101 -spice cells/*/*.cdl compile-only \
1102 filter=custom/scripts/convert_sc_cdl.py \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001103 -gds cells/*/*.gds compile-only \
Tim Edwardsf25e1202022-12-02 11:08:03 -05001104 options=custom/scripts/gds_import_sc.tcl \
Tim Edwards21a8ac62022-12-01 13:05:48 -05001105 filter=custom/scripts/fix_stdcell_gds.py \
Tim Edwards053d9172022-12-02 17:23:01 -05001106 -lef cells/*/*.lef annotate compile-only \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001107 filter=custom/scripts/fix_digital_lef.py \
1108 -verilog models/*/*.v compile-only rename=primitives \
Tim Edwards405227f2023-07-25 16:48:31 -04001109 -verilog cells/*/*.v exclude=*.*.v,primitives.v \
Tim Edwards9c6fd952022-11-29 22:34:36 -05001110 compile-only filter=custom/scripts/inc_verilog.py \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001111 -library digital gf180mcu_fd_sc_mcu7t5v0 2>&1 | \
1112 tee -a ${GF180MCU$*}_make.log
Tim Edwards9c6fd952022-11-29 22:34:36 -05001113 # Create minimum/maximum technology LEF files
1114 ./custom/scripts/make_minmax_techlef.py ${EF_FORMAT} -variant=${GF180MCU$*} \
1115 -library=7t5v0 2>&1 | tee -a ${GF180MCU$*}_make.log || true
Tim Edwardscc0029b2022-08-01 18:11:30 -04001116
Tim Edwards44c77292022-09-29 15:12:59 -04001117digital-osu-%:
1118 # Install OSU 3.3V digital standard cells from vendor files
1119 # NOTE: Work in progress (to be completed)
Tim Edwards2f7032e2022-12-16 17:51:45 -05001120 ${STAGE} -source ${GF180MCU_OSU_SC_PATH}/gf180mcu_osu_sc_gp9t3v3 \
Tim Edwards44c77292022-09-29 15:12:59 -04001121 -target ${STAGING_PATH}/${GF180MCU$*} \
R. Timothy Edwards84db6ca2025-04-24 16:17:42 -04001122 -techlef tlef/gf180mcu_osu_sc_gp9t3v3.tlef \
1123 rename=gf180mcu_osu_sc_gp9t3v3__nom.tlef \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001124 -lib lib/gf180mcu_osu_sc_gp9t3v3_TT_3P3_25C.ccs.lib \
Tim Edwards2f7032e2022-12-16 17:51:45 -05001125 rename=gf180mcu_osu_sc_gp9t3v3__tt_025C_3v30 \
1126 -verilog cells/*/*.v compile-only \
1127 -lef cells/*/*.lef compile-only \
1128 -gds cells/*/*.gds compile-only \
1129 -spice cells/*/*.spice compile-only \
1130 -xschem cells/*/*.sch \
1131 -library digital gf180mcu_osu_sc_gp9t3v3 2>&1 | \
Tim Edwards44c77292022-09-29 15:12:59 -04001132 tee -a ${GF180MCU$*}_make.log
1133
Tim Edwards2f7032e2022-12-16 17:51:45 -05001134 ${STAGE} -source ${GF180MCU_OSU_SC_PATH}/gf180mcu_osu_sc_gp12t3v3 \
Tim Edwards44c77292022-09-29 15:12:59 -04001135 -target ${STAGING_PATH}/${GF180MCU$*} \
R. Timothy Edwards84db6ca2025-04-24 16:17:42 -04001136 -techlef tlef/gf180mcu_osu_sc_gp12t3v3.tlef \
1137 rename=gf180mcu_osu_sc_gp12t3v3__nom.tlef \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001138 -lib lib/gf180mcu_osu_sc_gp12t3v3_TT_25C.ccs.lib \
Tim Edwards2f7032e2022-12-16 17:51:45 -05001139 rename=gf180mcu_osu_sc_gp12t3v3__tt_025C_3v30 \
1140 -verilog cells/*/*.v compile-only \
1141 -lef cells/*/*.lef compile-only \
1142 -gds cells/*/*.gds compile-only \
1143 -spice cells/*/*.spice compile-only \
1144 -xschem cells/*/*.sch \
1145 -library digital gf180mcu_osu_sc_gp12t3v3 2>&1 | \
Tim Edwards44c77292022-09-29 15:12:59 -04001146 tee -a ${GF180MCU$*}_make.log
1147
Tim Edwardscc0029b2022-08-01 18:11:30 -04001148io-%:
Tim Edwardscbfa5922023-12-11 15:03:51 -05001149 # Install custom additions to the I/O pad library
1150 ${STAGE} -source ./custom -target ${STAGING_PATH}/${GF180MCU$*} \
1151 -verilog %l/verilog/*.v compile-only rename=gf180mcu_ef_io \
1152 -spice %l/spice/*.spice compile-only rename=gf180mcu_ef_io \
1153 -lib %l/lib/*.lib \
1154 -gds %l/gds/*_${$*_STACK}.gds compile-only \
1155 rename=gf180mcu_ef_io \
1156 options=custom/scripts/gds_import_io.tcl \
1157 -lef %l/lef/*_${$*_STACK}.lef \
1158 annotate lefopts=-hide \
1159 -library general gf180mcu_fd_io 2>&1 | \
1160 tee -a ${GF180MCU$*}_make.log
1161
Tim Edwardscc0029b2022-08-01 18:11:30 -04001162 # Install I/O cells from vendor files
1163 # Note: Do not use GF LEF views. Annotate only. LEF is being renamed
1164 # back to the original, although eventually all files will be changed
1165 # to canonical names.
1166
1167 ${STAGE} -source ${GF180MCU_IO_PATH} \
1168 -target ${STAGING_PATH}/${GF180MCU$*} \
1169 -cdl cells/*/*.cdl compile-only noconvert \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001170 -lib cells/*/*_ff_125C_2v75.lib compile-only \
1171 include=custom/gf180mcu_fd_io/lib/*_ff_125C_2v75.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001172 header=liberty/gf180mcu_fd_io__ff_125C_2v75.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001173 rename=gf180mcu_fd_io__ff_125C_2v75 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001174 -lib cells/*/*_ff_n40C_2v75.lib compile-only \
1175 include=custom/gf180mcu_fd_io/lib/*_ff_n40C_2v75.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001176 header=liberty/gf180mcu_fd_io__ff_n40C_2v75.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001177 rename=gf180mcu_fd_io__ff_n40C_2v75 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001178 -lib cells/*/*_ff_125C_3v63.lib compile-only \
1179 include=custom/gf180mcu_fd_io/lib/*_ff_125C_3v63.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001180 header=liberty/gf180mcu_fd_io__ff_125C_3v63.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001181 rename=gf180mcu_fd_io__ff_125C_3v63 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001182 -lib cells/*/*_ff_n40C_3v63.lib compile-only \
1183 include=custom/gf180mcu_fd_io/lib/*_ff_n40C_3v63.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001184 header=liberty/gf180mcu_fd_io__ff_n40C_3v63.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001185 rename=gf180mcu_fd_io__ff_n40C_3v63 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001186 -lib cells/*/*_ff_125C_5v50.lib compile-only \
1187 include=custom/gf180mcu_fd_io/lib/*_ff_125C_5v50.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001188 header=liberty/gf180mcu_fd_io__ff_125C_5v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001189 rename=gf180mcu_fd_io__ff_125C_5v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001190 -lib cells/*/*_ff_n40C_5v50.lib compile-only \
1191 include=custom/gf180mcu_fd_io/lib/*_ff_n40C_5v50.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001192 header=liberty/gf180mcu_fd_io__ff_n40C_5v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001193 rename=gf180mcu_fd_io__ff_n40C_5v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001194 -lib cells/*/*_ss_125C_2v25.lib compile-only \
1195 include=custom/gf180mcu_fd_io/lib/*_ss_125C_2v20.lib \
Tim Edwards2f7032e2022-12-16 17:51:45 -05001196 header=liberty/gf180mcu_fd_io__ss_125C_2v25.lib \
1197 rename=gf180mcu_fd_io__ss_125C_2v25 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001198 -lib cells/*/*_ss_125C_2v97.lib compile-only \
1199 include=custom/gf180mcu_fd_io/lib/*_ss_125C_2v97.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001200 header=liberty/gf180mcu_fd_io__ss_125C_2v97.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001201 rename=gf180mcu_fd_io__ss_125C_2v97 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001202 -lib cells/*/*_ss_125C_4v50.lib compile-only \
1203 include=custom/gf180mcu_fd_io/lib/*_ss_125C_4v50.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001204 header=liberty/gf180mcu_fd_io__ss_125C_4v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001205 rename=gf180mcu_fd_io__ss_125C_4v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001206 -lib cells/*/*_tt_025C_2v50.lib compile-only \
1207 include=custom/gf180mcu_fd_io/lib/*_tt_025C_2v50.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001208 header=liberty/gf180mcu_fd_io__tt_025C_2v50.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001209 rename=gf180mcu_fd_io__tt_025C_2v50 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001210 -lib cells/*/*_tt_025C_3v30.lib compile-only \
1211 include=custom/gf180mcu_fd_io/lib/*_tt_025C_3v30.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001212 header=liberty/gf180mcu_fd_io__tt_025C_3v30.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001213 rename=gf180mcu_fd_io__tt_025C_3v30 \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001214 -lib cells/*/*_tt_025C_5v00.lib compile-only \
1215 include=custom/gf180mcu_fd_io/lib/*_tt_025C_5v00.lib \
Tim Edwards8efe4d12022-08-25 22:03:06 -04001216 header=liberty/gf180mcu_fd_io__tt_025C_5v00.lib \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001217 rename=gf180mcu_fd_io__tt_025C_5v00 \
Tim Edwardse4959cd2022-12-14 15:59:06 -05001218 -spice cells/*/*.cdl compile-only \
1219 filter=custom/scripts/convert_io_cdl.py \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001220 -gds cells/*/*_${$*_STACK}.gds compile-only \
1221 options=custom/scripts/gds_import_io.tcl \
Tim Edwards559a1172023-10-24 15:31:46 -04001222 filter=custom/scripts/fix_io_cor_gds.py \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001223 -lef cells/*/*_${$*_STACK}.lef \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001224 annotate lefopts=-hide \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001225 filter=custom/scripts/fix_io_lef.py \
1226 -verilog cells/*/*.v compile-only \
1227 -library general gf180mcu_fd_io 2>&1 | tee -a ${GF180MCU$*}_make.log
1228
1229sram-%:
1230 # Install SRAM macros from vendor files
1231 ${STAGE} -source ${GF180MCU_SRAM_PATH} \
1232 -target ${STAGING_PATH}/${GF180MCU$*} \
1233 -cdl cells/*/*.cdl noconvert \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001234 -lib cells/*/*.lib \
Tim Edwards2f7032e2022-12-16 17:51:45 -05001235 -spice cells/*/*.cdl \
1236 filter=custom/scripts/convert_sram_cdl.py \
1237 rename=*.spice \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001238 -gds cells/*/*.gds \
Tim Edwardsb8c61292022-12-04 22:34:47 -05001239 options=custom/scripts/gds_import_sram.tcl \
1240 filter=custom/scripts/fix_sram_gds.py \
Tim Edwardscbfa5922023-12-11 15:03:51 -05001241 -lef cells/*/*.lef annotate lefopts="-hide 5um" \
Tim Edwardscc0029b2022-08-01 18:11:30 -04001242 -verilog cells/*/*.v \
1243 -library general gf180mcu_fd_ip_sram 2>&1 | tee -a ${GF180MCU$*}_make.log
Tim Edwards64be4f92023-07-29 14:35:42 -04001244 # Remove "BL" labels from the rarray4_* cells, otherwise extraction
1245 # of the SRAMs without using "extract unique" will fail.
1246 ${REMOVELAB} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_ip_sram \
1247 rarray4_\* BL\* -mag
Tim Edwardscc0029b2022-08-01 18:11:30 -04001248
1249install: $(foreach var, ${VARIANTS}, install-$(var))
1250
1251install-A:
1252 echo "Starting GF180MCU PDK migration on "`date` > ${GF180MCUA}_install.log
1253 ${INSTALL} \
1254 -source ${STAGING_PATH}/${GF180MCUA} \
1255 -finalpath ${SHARED_PDKS_PATH}/${GF180MCUA} \
1256 -variable PDKPATH \
1257 -link_from ${DIST_LINK_TARGETS_A} 2>&1 | tee -a ${GF180MCUA}_install.log
1258 echo "Ended GF180MCU PDK migration on "`date` >> ${GF180MCUA}_install.log
1259
1260install-B: install-A
1261 echo "Starting GF180MCU PDK migration on "`date` > ${GF180MCUB}_install.log
1262 ${INSTALL} \
1263 -source ${STAGING_PATH}/${GF180MCUB} \
1264 -finalpath ${SHARED_PDKS_PATH}/${GF180MCUB} \
1265 -variable PDKPATH \
1266 -link_from ${DIST_LINK_TARGETS_B} 2>&1 | tee -a ${GF180MCUB}_install.log
1267 echo "Ended GF180MCU PDK migration on "`date` >> ${GF180MCUB}_install.log
1268
1269install-C: install-A
1270 echo "Starting GF180MCU PDK migration on "`date` > ${GF180MCUC}_install.log
1271 ${INSTALL} \
1272 -source ${STAGING_PATH}/${GF180MCUC} \
1273 -finalpath ${SHARED_PDKS_PATH}/${GF180MCUC} \
1274 -variable PDKPATH \
1275 -link_from ${DIST_LINK_TARGETS_C} 2>&1 | tee -a ${GF180MCUC}_install.log
1276 echo "Ended GF180MCU PDK migration on "`date` >> ${GF180MCUC}_install.log
1277
Johan Euphrosined905a6a2023-02-14 14:18:36 +09001278install-D: install-A
1279 echo "Starting GF180MCU PDK migration on "`date` > ${GF180MCUD}_install.log
1280 ${INSTALL} \
1281 -source ${STAGING_PATH}/${GF180MCUD} \
1282 -finalpath ${SHARED_PDKS_PATH}/${GF180MCUD} \
1283 -variable PDKPATH \
1284 -link_from ${DIST_LINK_TARGETS_C} 2>&1 | tee -a ${GF180MCUD}_install.log
1285 echo "Ended GF180MCU PDK migration on "`date` >> ${GF180MCUD}_install.log
1286
Tim Edwardscc0029b2022-08-01 18:11:30 -04001287uninstall: $(foreach var, ${VARIANTS}, uninstall-$(var))
1288
1289uninstall-A:
1290 echo "Uninstalling GF180MCU PDK from ${SHARED_PDKS_PATH}"
1291 if test "x${SHARED_PDKS_PATH}" != "x" ; then \
1292 ${RM} -rf ${SHARED_PDKS_PATH}/${GF180MCUA} ; \
1293 fi
1294 echo "Finished GF180MCU PDK uninstall"
1295
1296uninstall-B:
1297 echo "Uninstalling GF180MCU PDK from ${SHARED_PDKS_PATH}"
1298 if test "x${SHARED_PDKS_PATH}" != "x" ; then \
1299 ${RM} -rf ${SHARED_PDKS_PATH}/${GF180MCUB} ; \
1300 fi
1301 echo "Finished GF180MCU PDK uninstall"
1302
1303uninstall-C:
1304 echo "Uninstalling GF180MCU PDK from ${SHARED_PDKS_PATH}"
1305 if test "x${SHARED_PDKS_PATH}" != "x" ; then \
1306 ${RM} -rf ${SHARED_PDKS_PATH}/${GF180MCUC} ; \
1307 fi
1308 echo "Finished GF180MCU PDK uninstall"
1309
Johan Euphrosined905a6a2023-02-14 14:18:36 +09001310uninstall-D:
1311 echo "Uninstalling GF180MCU PDK from ${SHARED_PDKS_PATH}"
1312 if test "x${SHARED_PDKS_PATH}" != "x" ; then \
1313 ${RM} -rf ${SHARED_PDKS_PATH}/${GF180MCUD} ; \
1314 fi
1315 echo "Finished GF180MCU PDK uninstall"
1316
Tim Edwardscc0029b2022-08-01 18:11:30 -04001317clean: $(foreach var, ${VARIANTS}, clean-$(var))
1318
1319clean-A:
1320 ${STAGE} -target ${STAGING_PATH}/${GF180MCUA} -clean
1321
1322clean-B:
1323 ${STAGE} -target ${STAGING_PATH}/${GF180MCUB} -clean
1324
1325clean-C:
1326 ${STAGE} -target ${STAGING_PATH}/${GF180MCUC} -clean
1327
Johan Euphrosined905a6a2023-02-14 14:18:36 +09001328clean-D:
1329 ${STAGE} -target ${STAGING_PATH}/${GF180MCUD} -clean
1330
Tim Edwardscc0029b2022-08-01 18:11:30 -04001331veryclean: $(foreach var, ${VARIANTS}, veryclean-$(var))
1332
1333veryclean-A: clean-A
1334 ${RM} ${GF180MCUA}_make.log
1335 ${RM} ${GF180MCUA}_install.log
1336
1337veryclean-B: clean-B
1338 ${RM} ${GF180MCUB}_make.log
1339 ${RM} ${GF180MCUB}_install.log
1340
1341veryclean-C: clean-C
1342 ${RM} ${GF180MCUC}_make.log
1343 ${RM} ${GF180MCUC}_install.log
1344
Johan Euphrosined905a6a2023-02-14 14:18:36 +09001345veryclean-D: clean-D
1346 ${RM} ${GF180MCUD}_make.log
1347 ${RM} ${GF180MCUD}_install.log
1348
Tim Edwardscc0029b2022-08-01 18:11:30 -04001349