Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 1 | # Makefile for efabless design kits for SkyWater Sky130: |
| 2 | # |
| 3 | # sky130A = 5-metal backend stack with dual MiM |
| 4 | # |
| 5 | # Written by Tim Edwards March 2019 |
| 6 | # efabless corporation |
| 7 | # updated October 2019 |
| 8 | # updated December 2019 (divide installation sections for individual tools) |
| 9 | # updated March 2020 (refactored the install process) |
| 10 | # updated May 2020 (changed to new process name Sky130) |
| 11 | # |
| 12 | # Instructions: |
| 13 | # |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 14 | # Run "configure" from the top level directory. Use the following |
| 15 | # configuration options to match your environment: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 16 | # |
Tim Edwards | c7ab1ea | 2020-12-24 17:04:36 -0500 | [diff] [blame] | 17 | # --enable-sky130-pdk[=<path>] |
Tim Edwards | 942a14f | 2020-12-24 16:20:31 -0500 | [diff] [blame] | 18 | # If enabled, install the skywater PDK. If <path> is specified, |
| 19 | # then the skywater PDK is expected to be found rooted at the |
| 20 | # given path. If not specified, then the skywater PDK will be |
| 21 | # downloaded and installed to <repo root>/pdks. |
| 22 | # If explicitly disabled, sky130 is skipped over entirely. |
| 23 | # |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 24 | # --with-sky130-local-path=<path> |
| 25 | # where <path> is the run-time location of the installed PDK |
| 26 | # files generated by open_pdks. This option is mandatory and |
| 27 | # has no default. |
| 28 | # |
| 29 | # --with-sky130-dist-path=<path> |
| 30 | # where <path> is the install-time location of the installed |
| 31 | # PDK files generated by open_pdks, with the expectation that |
| 32 | # <path> is something like a git repository that is then |
| 33 | # distributed across a system. If this option is not specified, |
| 34 | # then files are installed to the local path. |
| 35 | # |
| 36 | # --with-sky130-link-targets=<value> |
| 37 | # where <value> is one of "none" or "source". If set to "source", |
| 38 | # then where possible, the installed files are symbolic links |
| 39 | # back to the source, rather than copies of the source. The |
| 40 | # default value is "none" if the option is not specified. |
| 41 | # |
| 42 | # --with-ef-style |
| 43 | # If specified, then the installation uses the efabless style, |
| 44 | # which swaps the file hierarchy of file formats vs. IP libraries; |
| 45 | # e.g., "gds/sky130_fd_sc_hd/" with ef-style, vs. |
| 46 | # "sky130_fd_sc_hd/gds/" without it. |
| 47 | # |
Tim Edwards | 22fdb44 | 2020-12-02 12:40:03 -0500 | [diff] [blame] | 48 | # Enable/disable for specific libraries to be installed (and downloaded if |
| 49 | # needed). Libraries that are part of the open_pdks repository are enabled |
| 50 | # by default and must be disabled by passing an option to configure. Libraries |
| 51 | # that are not part of the open_pdks repository are disabled by default and |
| 52 | # must be enabled by passing an option to configure. |
| 53 | # |
| 54 | # Internal libraries and tool setups that can be disabled are the following: |
| 55 | # |
| 56 | # --disable-magic |
| 57 | # Do not install setup files for the magic layout tool. |
| 58 | # |
| 59 | # --disable-netgen |
| 60 | # Do not install setup files for the netgen LVS tool. |
| 61 | # |
Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 62 | # --disable-irsim |
| 63 | # Do not install setup files for the IRSIM simulation tool. |
| 64 | # |
Tim Edwards | 22fdb44 | 2020-12-02 12:40:03 -0500 | [diff] [blame] | 65 | # --disable-qflow |
| 66 | # Do not install setup files for the qflow synthesis flow. |
| 67 | # |
| 68 | # --disable-openlane |
| 69 | # Do not install setup files for the openlane sythesis flow. |
| 70 | # |
| 71 | # --disable-klayout |
| 72 | # Do not install setup files for the klayout layout tool. |
| 73 | # |
Tim Edwards | ccaea72 | 2020-12-24 10:59:42 -0500 | [diff] [blame] | 74 | # |
| 75 | # NOTE: The comments below are for features that have not yet been |
| 76 | # implemented. |
| 77 | # |
Tim Edwards | 9a17fca | 2021-02-11 17:44:04 -0500 | [diff] [blame] | 78 | # External (third-party) libraries and tool setups are the following (enabled |
| 79 | # by default): |
Tim Edwards | 22fdb44 | 2020-12-02 12:40:03 -0500 | [diff] [blame] | 80 | # |
| 81 | # --enable-alpha-lib[=<path>] |
Tim Edwards | bcf59aa | 2020-12-17 16:55:13 -0500 | [diff] [blame] | 82 | # If enabled, install the sky130_ml_xx_hd font library from |
| 83 | # Paul Schulz on github. If not specified, then the font |
| 84 | # library will be cloned from the git repository and installed. |
Tim Edwards | 22fdb44 | 2020-12-02 12:40:03 -0500 | [diff] [blame] | 85 | # |
| 86 | # --enable-xschem[=<path>] |
| 87 | # If enabled, install the Sky130 setup for the xschem schematic |
| 88 | # editor. If <path> is specified, then the xschem setup is |
| 89 | # expected to be found rooted at the given path. If not |
| 90 | # specified, then the xschem setup will be cloned from the |
| 91 | # repository and installed. |
| 92 | # |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 93 | # The variables below are substituted from the configuration options: |
| 94 | # |
| 95 | # SKYWATER_PATH: points to vendor sources |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 96 | # EF_STYLE: 1 for efabless style, 0 otherwise |
| 97 | # LINK_TARGETS: link back to source or link to 1st PDK when possible |
| 98 | # DIST_PATH: install location for distributed install |
| 99 | # LOCAL_PATH: install location for local install or runtime location |
| 100 | # for distributed install |
| 101 | # |
| 102 | # Run "make" to stage the PDK for tool setup and vendor libraries |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 103 | # |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 104 | # Run "make install" to install all staged files. The installation is |
| 105 | # either local or distributed, depending on whether --with-sky130-dist-path |
| 106 | # has been set when running configure. |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 107 | # |
| 108 | # Run "make clean" to remove all staging files. |
| 109 | # |
| 110 | # Run "make veryclean" to remove all staging and install log files. |
| 111 | # |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 112 | # For the sake of simplicity, the "standard" installation can be done |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 113 | # with the usual |
| 114 | # |
| 115 | # make |
| 116 | # make install |
| 117 | # make clean |
| 118 | # |
| 119 | #-------------------------------------------------------------------- |
| 120 | # This Makefile contains bash-isms |
| 121 | SHELL = bash |
Tristan Gingold | a585431 | 2020-10-15 18:28:16 +0200 | [diff] [blame] | 122 | MV = mv |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 123 | |
Tim Edwards | c3baf46 | 2020-11-16 12:40:24 -0500 | [diff] [blame] | 124 | REVISION = `git describe --long` |
Tim Edwards | ccaea72 | 2020-12-24 10:59:42 -0500 | [diff] [blame] | 125 | TECH = sky130 |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 126 | |
| 127 | # If EF_STYLE is set to 1, then efabless naming conventions are |
| 128 | # used, otherwise the generic naming conventions are used. |
| 129 | # Mainly, the hierarchy of library names and file types is reversed |
| 130 | # (e.g., sky130_fd_sc_hd/lef vs. lef/sky130_fd_sc_hd). |
| 131 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 132 | # EF_STYLE = 0 | 1 |
| 133 | EF_STYLE = @EF_STYLE@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 134 | |
| 135 | # Normally it's fine to keep the staging path in a local directory, |
| 136 | # although /tmp or a dedicated staging area are also fine, as long |
| 137 | # as the install process can write to the path. |
| 138 | |
| 139 | STAGING_PATH = `pwd` |
| 140 | |
| 141 | # If LINK_TARGETS is set to "none", then files are copied |
| 142 | # from the SkyWater sources to the target. If set to "source", |
| 143 | # symbolic links are made in the target directories pointing |
| 144 | # back to the SkyWater sources. If set to the name of another |
| 145 | # PDK (e.g, "sky130A"), then symbolic links are made to the |
| 146 | # same files in that PDK, where they exist, and are copied |
| 147 | # from source, where they don't. |
| 148 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 149 | # LINK_TARGETS = source | none | sky130A |
| 150 | LINK_TARGETS = @SKY130_LINK_TARGETS@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 151 | |
| 152 | # Paths: |
| 153 | |
agorararmard | 3ee5f11 | 2021-02-03 19:49:09 +0200 | [diff] [blame] | 154 | # Path to skywater_pdk |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 155 | SKYWATER_PATH = @SKY130_SOURCE_PATH@ |
Tim Edwards | 66e53e5 | 2021-01-24 21:21:36 -0500 | [diff] [blame] | 156 | ifneq ($(SKYWATER_PATH),) |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 157 | SKYWATER_LIBS_PATH = ${SKYWATER_PATH}/libraries |
| 158 | else |
| 159 | SKYWATER_LIBS_PATH = |
Tim Edwards | 66e53e5 | 2021-01-24 21:21:36 -0500 | [diff] [blame] | 160 | endif |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 161 | |
Tim Edwards | bcf59aa | 2020-12-17 16:55:13 -0500 | [diff] [blame] | 162 | # Path to independent library sources (to be added to configuration options). |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 163 | ALPHA_PATH = @SKY130_ML_XX_HD_PATH@ |
| 164 | XSCHEM_PATH = @XSCHEM_SKY130_PATH@ |
Tim Edwards | bcf59aa | 2020-12-17 16:55:13 -0500 | [diff] [blame] | 165 | |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 166 | PDK_URL = https://github.com/google/skywater-pdk |
| 167 | ALPHA_URL = https://github.com/PaulSchulz/sky130_pshulz_xx_hd/archive/master.tar.gz |
| 168 | XSCHEM_URL = https://github.com/StefanSchippers/xschem_sky130/archive/main.tar.gz |
| 169 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 170 | # NOTE: Install destination is the git repository of the technology platform. |
| 171 | # Once updated in git, the git project can be distributed to all hosts. |
| 172 | # |
| 173 | ifeq (${EF_STYLE}, 1) |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 174 | LOCAL_PATH = @SKY130_LOCAL_PATH@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 175 | CONFIG_DIR = .ef-config |
| 176 | REV_DIR = ${REVISION} |
| 177 | else |
| 178 | # LOCAL_PATH = /usr/local/share/vlsi/SkyWater |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 179 | LOCAL_PATH = @SKY130_LOCAL_PATH@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 180 | CONFIG_DIR = .config |
| 181 | REV_DIR = . |
| 182 | endif |
| 183 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 184 | # DIST_PATH = ~/gits/ef-skywater-${TECH} |
| 185 | DIST_PATH = @SKY130_DIST_PATH@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 186 | |
| 187 | # EF process nodes created from the master sources |
| 188 | SKY130A = sky130A |
| 189 | |
| 190 | ifeq (${LINK_TARGETS}, ${SKY130A}) |
| 191 | DIST_LINK_TARGETS = ${LOCAL_PATH}/${LINK_TARGETS} |
| 192 | else |
| 193 | DIST_LINK_TARGETS = ${LINK_TARGETS} |
| 194 | endif |
| 195 | |
| 196 | # Basic definitions for each EF process node |
| 197 | SKY130A_DEFS = -DTECHNAME=sky130A -DREVISION=${REVISION} |
| 198 | |
| 199 | # Module definitions for each process node |
| 200 | # (Note that MOS is default and therefore not used anywhere) |
Tim Edwards | 0a0272b | 2020-07-28 14:40:10 -0400 | [diff] [blame] | 201 | SKY130A_DEFS += -DMETAL5 -DMIM -DREDISTRIBUTION |
| 202 | # SKY130A_DEFS += -DMETAL5 -DMIM |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 203 | |
| 204 | # Add staging path |
| 205 | SKY130A_DEFS += -DSTAGING_PATH=${STAGING_PATH} |
| 206 | |
| 207 | ifeq (${EF_STYLE}, 1) |
| 208 | EF_FORMAT = -ef_format |
| 209 | SKY130A_DEFS += -DEF_FORMAT |
| 210 | else |
| 211 | EF_FORMAT = -std_format |
| 212 | endif |
| 213 | |
| 214 | MAGICTOP = libs.tech/magic |
| 215 | NETGENTOP = libs.tech/netgen |
Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 216 | IRSIMTOP = libs.tech/irsim |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 217 | QFLOWTOP = libs.tech/qflow |
| 218 | KLAYOUTTOP = libs.tech/klayout |
| 219 | OPENLANETOP = libs.tech/openlane |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 220 | XSCHEMTOP = libs.tech/xschem |
Tim Edwards | e4c4409 | 2021-02-12 10:18:56 -0500 | [diff] [blame^] | 221 | XCIRCUITTOP = libs.tech/xcircuit |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 222 | |
| 223 | ifeq (${EF_STYLE}, 1) |
| 224 | MAGICPATH = ${MAGICTOP}/${REVISION} |
| 225 | else |
| 226 | MAGICPATH = ${MAGICTOP} |
| 227 | endif |
| 228 | |
Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 229 | # Currently, netgen, qflow, irsim, and klayout do not use revisioning (needs to change!) |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 230 | NETGENPATH = ${NETGENTOP} |
Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 231 | IRSIMPATH = ${IRSIMTOP} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 232 | QFLOWPATH = ${QFLOWTOP} |
| 233 | KLAYOUTPATH = ${KLAYOUTTOP} |
| 234 | OPENLANEPATH = ${OPENLANETOP} |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 235 | XSCHEMPATH = ${XSCHEMTOP} |
Tim Edwards | e4c4409 | 2021-02-12 10:18:56 -0500 | [diff] [blame^] | 236 | XCIRCUITPATH = ${XCIRCUITTOP} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 237 | |
| 238 | MAGICTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICTOP} |
| 239 | NETGENTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENTOP} |
Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 240 | IRSIMTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${IRSIMTOP} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 241 | QFLOWTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWTOP} |
| 242 | KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTTOP} |
| 243 | OPENLANETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANETOP} |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 244 | XSCHEMTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XSCHEMTOP} |
Tim Edwards | e4c4409 | 2021-02-12 10:18:56 -0500 | [diff] [blame^] | 245 | XCIRCUITTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XCIRCUITTOP} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 246 | |
| 247 | MAGIC_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICPATH} |
| 248 | NETGEN_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENPATH} |
Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 249 | IRSIM_STAGING_A = ${STAGING_PATH}/${SKY130A}/${IRSIMPATH} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 250 | QFLOW_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWPATH} |
| 251 | KLAYOUT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTPATH} |
| 252 | OPENLANE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANEPATH} |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 253 | XSCHEM_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XSCHEMPATH} |
Tim Edwards | e4c4409 | 2021-02-12 10:18:56 -0500 | [diff] [blame^] | 254 | XCIRCUIT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${XCIRCUITPATH} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 255 | |
| 256 | SKY130A_DEFS += -DMAGIC_CURRENT=${MAGICTOP}/current |
| 257 | |
Tim Edwards | f8c7eb8 | 2021-02-10 09:07:54 -0500 | [diff] [blame] | 258 | # Openlane has a number of files that are common to all digital |
| 259 | # standard cell libraries, so these are collected in one definition |
| 260 | # here: |
agorararmard | 2ca4602 | 2021-02-11 21:43:51 +0200 | [diff] [blame] | 261 | OPENLANE_COMMON = config.tcl tracks.info no_synth.cells drc_exclude.cells |
Tim Edwards | f8c7eb8 | 2021-02-10 09:07:54 -0500 | [diff] [blame] | 262 | OPENLANE_COMMON += tribuff_map.v latch_map.v mux2_map.v mux4_map.v fa_map.v rca_map.v |
| 263 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 264 | # Where cpp syntax is followed, this is equivalent to cpp, but it does not |
| 265 | # mangle non-C source files under the belief that they are actually C code. |
| 266 | CPP = ../common/preproc.py |
| 267 | |
| 268 | # The following script in the ../common directory does most of the work of |
| 269 | # copying or linking the foundry vendor files to the target directory. |
| 270 | STAGE = set -f ; ../common/foundry_install.py ${EF_FORMAT} |
| 271 | INSTALL = ../common/staging_install.py ${EF_FORMAT} |
| 272 | |
| 273 | # The script(s) below are used for custom changes to the vendor PDK files |
Ahmed Ghazy | a285ff4 | 2020-07-27 17:52:14 +0200 | [diff] [blame] | 274 | ADDPROP = ../common/insert_property.py ${EF_FORMAT} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 275 | |
| 276 | # List the EDA tools to install local setup files for |
Tim Edwards | ccaea72 | 2020-12-24 10:59:42 -0500 | [diff] [blame] | 277 | TOOLS = |
| 278 | |
| 279 | # KLAYOUT_DISABLED = 0 | 1 |
| 280 | KLAYOUT_DISABLED = @KLAYOUT_DISABLED@ |
| 281 | ifneq (${KLAYOUT_DISABLED}, 1) |
| 282 | TOOLS += klayout |
| 283 | endif |
| 284 | |
| 285 | # OPENLANE_DISABLED = 0 | 1 |
| 286 | OPENLANE_DISABLED = @OPENLANE_DISABLED@ |
| 287 | ifneq (${OPENLANE_DISABLED}, 1) |
| 288 | TOOLS += openlane |
| 289 | endif |
| 290 | |
| 291 | # QFLOW_DISABLED = 0 | 1 |
| 292 | QFLOW_DISABLED = @QFLOW_DISABLED@ |
| 293 | ifneq (${QFLOW_DISABLED}, 1) |
| 294 | TOOLS += qflow |
| 295 | endif |
| 296 | |
| 297 | # MAGIC_DISABLED = 0 | 1 |
| 298 | MAGIC_DISABLED = @MAGIC_DISABLED@ |
| 299 | ifneq (${MAGIC_DISABLED}, 1) |
| 300 | TOOLS += magic |
| 301 | endif |
| 302 | |
| 303 | # NETGEN_DISABLED = 0 | 1 |
| 304 | NETGEN_DISABLED = @NETGEN_DISABLED@ |
| 305 | ifneq (${NETGEN_DISABLED}, 1) |
| 306 | TOOLS += netgen |
| 307 | endif |
| 308 | |
Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 309 | # IRSIM_DISABLED = 0 | 1 |
| 310 | IRSIM_DISABLED = @IRSIM_DISABLED@ |
| 311 | ifneq (${IRSIM_DISABLED}, 1) |
| 312 | TOOLS += irsim |
| 313 | endif |
| 314 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 315 | # XSCHEM_DISABLED = 0 | 1 |
| 316 | XSCHEM_DISABLED = @XSCHEM_DISABLED@ |
| 317 | ifneq (${XSCHEM_DISABLED}, 1) |
| 318 | TOOLS += xschem |
| 319 | endif |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 320 | |
Tim Edwards | e4c4409 | 2021-02-12 10:18:56 -0500 | [diff] [blame^] | 321 | # XCIRCUIT_DISABLED = 0 | 1 |
| 322 | XCIRCUIT_DISABLED = @XCIRCUIT_DISABLED@ |
| 323 | ifneq (${XCIRCUIT_DISABLED}, 1) |
| 324 | TOOLS += xcircuit |
| 325 | endif |
| 326 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 327 | all: all-a |
| 328 | |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 329 | # Handle prerequisites (fetch and install the PDK and requested libraries) |
| 330 | prerequisites: pdk-repo alpha-repo xschem-repo |
| 331 | |
| 332 | pdk-repo: |
| 333 | if test "x${SKYWATER_PATH}" != "x" ; then \ |
| 334 | if test -d "${SKYWATER_PATH}" ; then \ |
| 335 | echo "Using existing installation of SkyWater PDK from ${SKYWATER_PATH}" ; \ |
| 336 | else \ |
| 337 | echo "Downloading SkyWater PDK from ${PDK_URL}" ; \ |
| 338 | custom/scripts/pdk_download.sh ${PDK_URL} ${SKYWATER_PATH} ; \ |
| 339 | fi ; \ |
| 340 | fi |
| 341 | |
| 342 | alpha-repo: |
| 343 | if test "x${ALPHA_PATH}" != "x" ; then \ |
| 344 | if test -d "${ALPHA_PATH}" ; then \ |
| 345 | echo "Using existing installation of alphanumeric library from ${ALPHA_PATH}" ; \ |
| 346 | else \ |
| 347 | echo "Downloading alphanumeric library from ${ALPHA_URL}" ; \ |
| 348 | ../scripts/download.sh ${ALPHA_URL} ${ALPHA_PATH} ; \ |
| 349 | fi ; \ |
| 350 | fi |
| 351 | |
| 352 | xschem-repo: |
| 353 | if test "x${XSCHEM_PATH}" != "x" ; then \ |
| 354 | if test -d "${XSCHEM_PATH}" ; then \ |
| 355 | echo "Using existing installation of xschem setup from ${XSCHEM_PATH}" ; \ |
| 356 | else \ |
| 357 | echo "Downloading xschem setup from ${XSCHEM_URL}" ; \ |
| 358 | ../scripts/download.sh ${XSCHEM_URL} ${XSCHEM_PATH} ; \ |
| 359 | fi ; \ |
| 360 | fi |
| 361 | |
| 362 | all-a: prerequisites |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 363 | echo "Starting sky130A PDK staging on "`date` > ${SKY130A}_install.log |
| 364 | ${MAKE} tools-a |
| 365 | ${MAKE} vendor-a |
| 366 | echo "Ended sky130A PDK staging on "`date` >> ${SKY130A}_install.log |
| 367 | |
Tim Edwards | 942a14f | 2020-12-24 16:20:31 -0500 | [diff] [blame] | 368 | tools-a: $(addsuffix -a, $(TOOLS)) |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 369 | |
| 370 | general-a: ${TECH}.json |
| 371 | mkdir -p ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR} |
| 372 | rm -f ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json |
| 373 | ${CPP} ${SKY130A_DEFS} ${TECH}.json > \ |
| 374 | ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json |
| 375 | |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 376 | magic-a: magic/${TECH}.tech magic/${TECH}gds.tech magic/${TECH}.magicrc magic/${TECH}.tcl |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 377 | mkdir -p ${MAGICTOP_STAGING_A} |
| 378 | mkdir -p ${MAGIC_STAGING_A} |
| 379 | rm -f ${MAGICTOP_STAGING_A}/current |
| 380 | rm -f ${MAGIC_STAGING_A}/${SKY130A}.tech |
| 381 | rm -f ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech |
| 382 | rm -f ${MAGIC_STAGING_A}/${SKY130A}.tcl |
| 383 | rm -f ${MAGIC_STAGING_A}/${SKY130A}-BindKeys |
| 384 | rm -f ${MAGIC_STAGING_A}/magicrc |
| 385 | (cd ${MAGICTOP_STAGING_A} ; ln -s ${REV_DIR} current) |
| 386 | cp -rp custom/scripts/seal_ring_generator ${MAGIC_STAGING_A}/. |
Tim Edwards | 4d081b8 | 2021-01-27 14:30:03 -0500 | [diff] [blame] | 387 | cp -rp custom/scripts/bump_bond_generator ${MAGIC_STAGING_A}/. |
Tim Edwards | 4d46bac | 2020-12-29 16:23:22 -0500 | [diff] [blame] | 388 | cp custom/scripts/generate_fill.py ${MAGIC_STAGING_A}/. |
Tim Edwards | 113b083 | 2021-01-13 11:27:52 -0500 | [diff] [blame] | 389 | cp custom/scripts/check_density.py ${MAGIC_STAGING_A}/. |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 390 | ${CPP} ${SKY130A_DEFS} magic/${TECH}.tech > ${MAGIC_STAGING_A}/${SKY130A}.tech |
| 391 | ${CPP} ${SKY130A_DEFS} magic/${TECH}gds.tech > ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech |
| 392 | ${CPP} ${SKY130A_DEFS} magic/${TECH}.magicrc > ${MAGIC_STAGING_A}/${SKY130A}.magicrc |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 393 | ${CPP} ${SKY130A_DEFS} ../common/pdk.bindkeys > ${MAGIC_STAGING_A}/${SKY130A}-BindKeys |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 394 | ${CPP} ${SKY130A_DEFS} magic/${TECH}.tcl > ${MAGIC_STAGING_A}/${SKY130A}.tcl |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 395 | ${CPP} ${SKY130A_DEFS} ../common/pdk.tcl >> ${MAGIC_STAGING_A}/${SKY130A}.tcl |
| 396 | |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 397 | qflow-a: qflow/${TECH}.sh qflow/${TECH}.par |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 398 | mkdir -p ${QFLOWTOP_STAGING_A} |
| 399 | mkdir -p ${QFLOW_STAGING_A} |
| 400 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.sh |
| 401 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.par |
| 402 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.sh |
| 403 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.par |
| 404 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.sh |
| 405 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.par |
| 406 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.sh |
| 407 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.par |
| 408 | rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.sh |
| 409 | rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.par |
| 410 | rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.sh |
| 411 | rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.par |
| 412 | rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.sh |
| 413 | rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.par |
Tim Edwards | 7ec7697 | 2020-07-07 21:56:08 -0400 | [diff] [blame] | 414 | rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.sh |
| 415 | rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.par |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 416 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hd qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 417 | ${QFLOW_STAGING_A}/${SKY130A}hd.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 418 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hdll qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 419 | ${QFLOW_STAGING_A}/${SKY130A}hdll.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 420 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hvl qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 421 | ${QFLOW_STAGING_A}/${SKY130A}hvl.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 422 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hs qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 423 | ${QFLOW_STAGING_A}/${SKY130A}hs.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 424 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_lp qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 425 | ${QFLOW_STAGING_A}/${SKY130A}lp.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 426 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ls qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 427 | ${QFLOW_STAGING_A}/${SKY130A}ls.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 428 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ms qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 429 | ${QFLOW_STAGING_A}/${SKY130A}ms.sh |
Tristan Gingold | a585431 | 2020-10-15 18:28:16 +0200 | [diff] [blame] | 430 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_osu_sc_t18 qflow/sky130osu.sh > \ |
Tim Edwards | 7ec7697 | 2020-07-07 21:56:08 -0400 | [diff] [blame] | 431 | ${QFLOW_STAGING_A}/${SKY130A}osu.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 432 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hd.par |
| 433 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hdll.par |
| 434 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hvl.par |
| 435 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hs.par |
| 436 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ms.par |
| 437 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}lp.par |
| 438 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ls.par |
| 439 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}osu.par |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 440 | |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 441 | netgen-a: netgen/${TECH}_setup.tcl |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 442 | mkdir -p ${NETGENTOP_STAGING_A} |
| 443 | mkdir -p ${NETGEN_STAGING_A} |
| 444 | rm -f ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl |
| 445 | rm -f ${NETGEN_STAGING_A}/setup.tcl |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 446 | ${CPP} ${SKY130A_DEFS} netgen/${TECH}_setup.tcl > ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 447 | (cd ${NETGEN_STAGING_A} ; ln -s ${SKY130A}_setup.tcl setup.tcl) |
| 448 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 449 | irsim-a: irsim |
Tim Edwards | 367711e | 2021-01-27 10:35:12 -0500 | [diff] [blame] | 450 | mkdir -p ${IRSIMTOP_STAGING_A} |
| 451 | mkdir -p ${IRSIM_STAGING_A} |
| 452 | rm -f ${IRSIM_STAGING_A}/${SKY130A}_*.prm |
| 453 | cp irsim/${SKY130A}_*.prm ${IRSIM_STAGING_A}/ |
| 454 | |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 455 | klayout-a: klayout/${TECH}.lyp klayout/${TECH}.lyt |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 456 | mkdir -p ${KLAYOUTTOP_STAGING_A} |
| 457 | mkdir -p ${KLAYOUT_STAGING_A} |
| 458 | rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyp |
| 459 | rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyt |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 460 | ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyp > ${KLAYOUT_STAGING_A}/${SKY130A}.lyp |
| 461 | ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyt > ${KLAYOUT_STAGING_A}/${SKY130A}.lyt |
agorararmard | 1a6ece5 | 2021-01-15 18:50:43 +0200 | [diff] [blame] | 462 | cp klayout/${TECH}.lydrc ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc |
agorararmard | 2256158 | 2021-01-15 17:55:59 +0200 | [diff] [blame] | 463 | ./custom/scripts/gen_run_drc.py -l ${KLAYOUT_STAGING_A}/${SKY130A}.lydrc -o ${KLAYOUT_STAGING_A}/${SKY130A}.drc |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 464 | |
Tim Edwards | e4c4409 | 2021-02-12 10:18:56 -0500 | [diff] [blame^] | 465 | xcircuit-a: xcircuit/${TECH}.xcircuitrc |
| 466 | rm -rf ${XCIRCUIT_STAGING_A} |
| 467 | mkdir -p ${XCIRCUITTOP_STAGING_A} |
| 468 | mkdir -p ${XCIRCUIT_STAGING_A} |
| 469 | rm -f ${XCIRCUIT_STAGING_A}/*.lps |
| 470 | rm -f ${XCIRCUIT_STAGING_A}/${SKY130A}.xcircuitrc |
| 471 | ${CPP} xcircuit/sky130_fd_pr.lps > ${XCIRCUIT_STAGING_A}/sky130_fd_pr.lps |
| 472 | ${CPP} xcircuit/sky130_fd_sc_hd.lps > ${XCIRCUIT_STAGING_A}/sky130_fd_sc_hd.lps |
| 473 | ${CPP} xcircuit/ngspice.lps > ${XCIRCUIT_STAGING_A}/ngspice.lps |
| 474 | cp xcircuit/${TECH}_*.lps ${XCIRCUIT_STAGING_A}/ |
| 475 | ${CPP} ${SKY130A_DEFS} xcircuit/${TECH}.xcircuitrc > ${XCIRCUIT_STAGING_A}/${SKY130A}.xcircuitrc |
| 476 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 477 | xschem-a: ${XSCHEM_PATH} |
| 478 | rm -rf ${XSCHEM_STAGING_A} |
| 479 | mkdir -p ${XSCHEMTOP_STAGING_A} |
| 480 | mkdir -p ${XSCHEM_STAGING_A} |
| 481 | # Copy the entire repository (other than .git, if it exists) |
| 482 | if test "x${XSCHEM_PATH}" != "x" ; then \ |
| 483 | cp -rp ${XSCHEM_PATH}/* ${XSCHEM_STAGING_A} ; \ |
| 484 | fi |
Tim Edwards | 9a17fca | 2021-02-11 17:44:04 -0500 | [diff] [blame] | 485 | # Re-copy the xschemrc, with one change to add the PDK install path as |
| 486 | # a component of XSCHEM_LIBRARY_PATH |
| 487 | cat ${XSCHEM_PATH}/xschemrc | \ |
| 488 | sed -e "/PWD/aappend XSCHEM_LIBRARY_PATH :${XSCHEM_STAGING_A}" | \ |
| 489 | sed -e "/sky130_models.tcl/s#scripts#${XSCHEM_STAGING_A}/scripts#" \ |
| 490 | > ${XSCHEM_STAGING_A}/xschemrc |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 491 | |
Tristan Gingold | a585431 | 2020-10-15 18:28:16 +0200 | [diff] [blame] | 492 | openlane-a: openlane/common_pdn.tcl openlane/config.tcl openlane/sky130_fd_sc_hd/config.tcl openlane/sky130_fd_sc_hs/config.tcl openlane/sky130_fd_sc_ms/config.tcl openlane/sky130_fd_sc_ls/config.tcl openlane/sky130_fd_sc_hdll/config.tcl openlane/sky130_osu_sc_t18/config.tcl |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 493 | mkdir -p ${OPENLANETOP_STAGING_A} |
| 494 | mkdir -p ${OPENLANE_STAGING_A} |
Tim Edwards | 3c1dd9a | 2020-11-27 13:49:58 -0500 | [diff] [blame] | 495 | rm -rf ${OPENLANE_STAGING_A}/custom_cells/* |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 496 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hd |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 497 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hs |
Ahmed Ghazy | 8e84e5c | 2020-07-27 14:32:34 +0200 | [diff] [blame] | 498 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ls |
| 499 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ms |
| 500 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll |
| 501 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl |
Tristan Gingold | a585431 | 2020-10-15 18:28:16 +0200 | [diff] [blame] | 502 | mkdir -p ${OPENLANE_STAGING_A}/sky130_osu_sc_t18 |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 503 | rm -f ${OPENLANE_STAGING_A}/common_pdn.info |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 504 | rm -f ${OPENLANE_STAGING_A}/config.tcl |
Tim Edwards | f8c7eb8 | 2021-02-10 09:07:54 -0500 | [diff] [blame] | 505 | for file in ${OPENLANE_COMMON} ; do \ |
| 506 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/$$file ; \ |
| 507 | done |
| 508 | for file in ${OPENLANE_COMMON} ; do \ |
| 509 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/$$file ; \ |
| 510 | done |
| 511 | for file in ${OPENLANE_COMMON} ; do \ |
| 512 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/$$file ; \ |
| 513 | done |
| 514 | for file in ${OPENLANE_COMMON} ; do \ |
| 515 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/$$file ; \ |
| 516 | done |
| 517 | for file in ${OPENLANE_COMMON} ; do \ |
| 518 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/$$file ; \ |
| 519 | done |
| 520 | for file in ${OPENLANE_COMMON} ; do \ |
| 521 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/$$file ; \ |
| 522 | done |
| 523 | for file in ${OPENLANE_COMMON} ; do \ |
| 524 | rm -f ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/$$file ; \ |
| 525 | done |
| 526 | |
Ahmed Ghazy | 5fd61d2 | 2020-11-24 21:44:28 +0200 | [diff] [blame] | 527 | cp -r openlane/custom_cells ${OPENLANE_STAGING_A} |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 528 | ${CPP} ${SKY130A_DEFS} openlane/common_pdn.tcl > ${OPENLANE_STAGING_A}/common_pdn.tcl |
| 529 | ${CPP} ${SKY130A_DEFS} openlane/config.tcl > ${OPENLANE_STAGING_A}/config.tcl |
Tim Edwards | f8c7eb8 | 2021-02-10 09:07:54 -0500 | [diff] [blame] | 530 | |
| 531 | for file in ${OPENLANE_COMMON} ; do \ |
| 532 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/$$file > \ |
| 533 | ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/$$file ; \ |
| 534 | done |
| 535 | for file in ${OPENLANE_COMMON} ; do \ |
| 536 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/$$file > \ |
| 537 | ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/$$file ; \ |
| 538 | done |
| 539 | for file in ${OPENLANE_COMMON} ; do \ |
| 540 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/$$file > \ |
| 541 | ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/$$file ; \ |
| 542 | done |
| 543 | for file in ${OPENLANE_COMMON} ; do \ |
| 544 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/$$file > \ |
| 545 | ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/$$file ; \ |
| 546 | done |
| 547 | for file in ${OPENLANE_COMMON} ; do \ |
| 548 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/$$file > \ |
| 549 | ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/$$file ; \ |
| 550 | done |
| 551 | for file in ${OPENLANE_COMMON} ; do \ |
| 552 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/$$file > \ |
| 553 | ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/$$file ; \ |
| 554 | done |
| 555 | |
Tristan Gingold | a585431 | 2020-10-15 18:28:16 +0200 | [diff] [blame] | 556 | ${CPP} ${SKY130A_DEFS} openlane/sky130_osu_sc_t18/config.tcl > ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/config.tcl |
| 557 | ${CPP} ${SKY130A_DEFS} openlane/sky130_osu_sc_t18/tracks.info > ${OPENLANE_STAGING_A}/sky130_osu_sc_t18/tracks.info |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 558 | |
| 559 | vendor-a: |
agorararmard | 14a276b | 2020-10-07 20:40:48 +0200 | [diff] [blame] | 560 | # Modify the LEF files to update hs and ms libraries |
Tim Edwards | 106e38b | 2020-09-20 13:07:54 -0400 | [diff] [blame] | 561 | # Install device subcircuits from vendor files |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 562 | ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 563 | -ngspice sky130_fd_pr/latest/models/* \ |
| 564 | filter=custom/scripts/rename_models.py \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 565 | |& tee -a ${SKY130A}_install.log |
| 566 | # Install base device library from vendor files |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 567 | ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | 106e38b | 2020-09-20 13:07:54 -0400 | [diff] [blame] | 568 | -gds %l/latest/cells/*/*.gds compile-only \ |
| 569 | -cdl %l/latest/cells/*/*.cdl compile-only \ |
| 570 | -lef %l/latest/cells/*/*.magic.lef compile-only \ |
Tim Edwards | bfc8269 | 2020-09-20 21:33:08 -0400 | [diff] [blame] | 571 | -spice %l/latest/cells/*/*.spice filter=custom/scripts/rename_cells.py \ |
Tim Edwards | 106e38b | 2020-09-20 13:07:54 -0400 | [diff] [blame] | 572 | -library primitive sky130_fd_pr |& tee -a ${SKY130A}_install.log |
Tim Edwards | e60b486 | 2020-11-23 16:56:52 -0500 | [diff] [blame] | 573 | # Custom: Add "short" resistor model and subcircuit to the r+c models file |
Tim Edwards | 42f79a3 | 2020-09-21 14:18:09 -0400 | [diff] [blame] | 574 | cat ./custom/models/short.spice >> \ |
agorararmard | 3ee5f11 | 2021-02-03 19:49:09 +0200 | [diff] [blame] | 575 | ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice |
Tim Edwards | e60b486 | 2020-11-23 16:56:52 -0500 | [diff] [blame] | 576 | # Custom: Add diodes as subcircuits to the r+c models file |
| 577 | cat ./custom/models/diode.spice >> \ |
agorararmard | 3ee5f11 | 2021-02-03 19:49:09 +0200 | [diff] [blame] | 578 | ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice |
Tim Edwards | e60b486 | 2020-11-23 16:56:52 -0500 | [diff] [blame] | 579 | |
Ahmed Ghazy | 59370ab | 2020-10-29 02:04:45 +0200 | [diff] [blame] | 580 | # Install custom additions to I/O pad library |
| 581 | ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \ |
| 582 | -verilog %l/verilog/*.v \ |
| 583 | -cdl %l/cdl/*.cdl \ |
| 584 | -gds %l/gds/*.gds \ |
| 585 | -lef %l/lef/*.lef compile-only rename=sky130_ef_io \ |
| 586 | -library general sky130_fd_io |& tee -a ${SKY130A}_install.log |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 587 | # Install SkyWater I/O pad library |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 588 | ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | 1134fbc | 2020-10-12 22:35:42 -0400 | [diff] [blame] | 589 | -spice %l/latest/cells/*/*.spice compile-only \ |
| 590 | sort=custom/scripts/sort_pdkfiles.py \ |
| 591 | -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \ |
| 592 | sort=custom/scripts/sort_pdkfiles.py \ |
| 593 | -lef %l/latest/cells/*/*.magic.lef compile-only \ |
| 594 | sort=custom/scripts/sort_pdkfiles.py \ |
| 595 | -doc %l/latest/cells/*/*.pdf \ |
| 596 | -lib %l/latest/timing/*.lib \ |
| 597 | -gds %l/latest/cells/*/*.gds compile-only \ |
| 598 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | 26ab496 | 2021-01-03 14:22:54 -0500 | [diff] [blame] | 599 | options=custom/scripts/sky130_fd_io_import.tcl \ |
Tim Edwards | 1134fbc | 2020-10-12 22:35:42 -0400 | [diff] [blame] | 600 | -verilog %l/latest/cells/*/*.*.v \ |
| 601 | -verilog %l/latest/cells/*/*.v exclude=*.*.v \ |
| 602 | compile-only filter=custom/scripts/inc_verilog.py \ |
| 603 | sort=custom/scripts/sort_pdkfiles.py \ |
| 604 | -library general sky130_fd_io |& tee -a ${SKY130A}_install.log |
| 605 | # Remove the base verilog files which have already been included into |
| 606 | # the libraries |
| 607 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_io/verilog/*.*.v |
Ahmed Ghazy | 5fd61d2 | 2020-11-24 21:44:28 +0200 | [diff] [blame] | 608 | # Install custom additions to standard cell libraries |
| 609 | ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \ |
| 610 | -gds %l/gds/*.gds \ |
| 611 | -lef %l/lef/*.lef \ |
Tim Edwards | bb8ab29 | 2021-01-22 10:19:40 -0500 | [diff] [blame] | 612 | -verilog %l/verilog/*.v \ |
Ahmed Ghazy | 5fd61d2 | 2020-11-24 21:44:28 +0200 | [diff] [blame] | 613 | -library digital sky130_fd_sc_hd |& tee -a ${SKY130A}_install.log |
Tim Edwards | d14571f | 2021-01-06 14:49:27 -0500 | [diff] [blame] | 614 | # Add a maskhint set for the GPIO pad .mag view to prevent problems writing |
| 615 | # when writing HVI to GDS during hierarchical adjustments. |
| 616 | ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io__top_gpiov2 \ |
| 617 | "MASKHINTS_HVI 1346 17198 5828 19224 13700 1890 15920 2360 24 17522 1778 20612" -mag |
Ahmed Ghazy | a285ff4 | 2020-07-27 17:52:14 +0200 | [diff] [blame] | 618 | # Install all SkyWater digital standard cells. |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 619 | ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 620 | -techlef %l/latest/tech/*.tlef \ |
| 621 | -spice %l/latest/cells/*/*.spice compile-only \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 622 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 623 | -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 624 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | 106e38b | 2020-09-20 13:07:54 -0400 | [diff] [blame] | 625 | -lef %l/latest/cells/*/*.magic.lef compile-only \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 626 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 627 | -doc %l/latest/cells/*/*.pdf \ |
| 628 | -lib %l/latest/timing/*.lib \ |
| 629 | -gds %l/latest/cells/*/*.gds compile-only \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 630 | sort=custom/scripts/sort_pdkfiles.py \ |
| 631 | -verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \ |
| 632 | rename=primitives filter=custom/scripts/inc_verilog.py \ |
| 633 | sort=custom/scripts/sort_pdkfiles.py \ |
| 634 | -verilog %l/latest/cells/*/*.*.v \ |
| 635 | -verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \ |
| 636 | compile-only filter=custom/scripts/inc_verilog.py \ |
| 637 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 638 | -library digital sky130_fd_sc_hd \ |
| 639 | -library digital sky130_fd_sc_hdll \ |
| 640 | -library digital sky130_fd_sc_hvl \ |
| 641 | -library digital sky130_fd_sc_hs \ |
| 642 | -library digital sky130_fd_sc_ls \ |
| 643 | -library digital sky130_fd_sc_ms \ |
| 644 | -library digital sky130_fd_sc_lp |& tee -a ${SKY130A}_install.log |
Tim Edwards | 16a9caa | 2021-01-08 13:10:06 -0500 | [diff] [blame] | 645 | # Add a maskhint set for the tap cell .ag view to prevent problems writing |
| 646 | # when writing NSDM and PSDM to GDS during hierarchical adjustments. |
| 647 | ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_sc_hd sky130_fd_sc_hd__tapvpwrvgnd_1 \ |
| 648 | "MASKHINTS_PSDM 0 38 92 196" -mag |
| 649 | ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_sc_hd sky130_fd_sc_hd__tapvpwrvgnd_1 \ |
| 650 | "MASKHINTS_NSDM 0 280 92 506" -mag |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 651 | # Remove the base verilog files which have already been included into |
| 652 | # the libraries |
| 653 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hd/verilog/*.*.v |
| 654 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hdll/verilog/*.*.v |
| 655 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hvl/verilog/*.*.v |
| 656 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hs/verilog/*.*.v |
| 657 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ms/verilog/*.*.v |
| 658 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ls/verilog/*.*.v |
| 659 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_lp/verilog/*.*.v |
Ahmed Ghazy | 7875f1e | 2021-01-19 18:15:30 +0200 | [diff] [blame] | 660 | # Apply extra PDK patches until they get fixed properly in the source |
| 661 | patch -p1 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hd/techlef \ |
| 662 | < custom/patches/hd_minenclosed.squeaky.patch || true |
| 663 | patch -p1 -f -d ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hdll/techlef \ |
| 664 | < custom/patches/hdll_minenclosed.squeaky.patch || true |
Tim Edwards | bcf59aa | 2020-12-17 16:55:13 -0500 | [diff] [blame] | 665 | # Install alphanumeric library. |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 666 | ${STAGE} -source ${ALPHA_PATH}/.. -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | 88bd42e | 2020-12-18 15:29:48 -0500 | [diff] [blame] | 667 | -mag %l/mag/*.mag filter=custom/scripts/text2m5.py \ |
Tim Edwards | bcf59aa | 2020-12-17 16:55:13 -0500 | [diff] [blame] | 668 | -library general sky130_ml_xx_hd |& tee -a ${SKY130A}_install.log |
| 669 | # Install text2mag.py script for alphanumeric library |
| 670 | mkdir -p ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_ml_xx_hd/scripts |
| 671 | cp custom/scripts/text2mag.py \ |
| 672 | ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_ml_xx_hd/scripts |
Tristan Gingold | a585431 | 2020-10-15 18:28:16 +0200 | [diff] [blame] | 673 | # Install OSU digital standard cells. |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 674 | ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | bbab9f6 | 2020-11-02 10:12:20 -0500 | [diff] [blame] | 675 | -techlef %l/latest/lef/sky130_osu_sc.tlef rename=sky130_osu_sc_t18.tlef \ |
Tristan Gingold | a585431 | 2020-10-15 18:28:16 +0200 | [diff] [blame] | 676 | -cdl %l/latest/cdl/*.cdl ignore=topography compile-only \ |
| 677 | -lef %l/latest/lef/*.lef compile-only \ |
| 678 | -lib %l/latest/lib/*.lib \ |
| 679 | -gds %l/latest/gds/*.gds compile-only \ |
| 680 | -library digital sky130_osu_sc_t18 |& tee -a ${SKY130A}_install.log |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 681 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 682 | install: |
Ahmed Ghazy | f45cbf3 | 2020-08-08 17:11:53 +0200 | [diff] [blame] | 683 | if test "x${DIST_PATH}" == "x" ; then \ |
| 684 | ${MAKE} install-local ; \ |
| 685 | else \ |
| 686 | ${MAKE} install-dist; \ |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 687 | fi |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 688 | |
| 689 | install-local: install-local-a |
| 690 | |
| 691 | install-local-a: |
| 692 | echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log |
| 693 | ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \ |
| 694 | -target ${LOCAL_PATH}/${SKY130A} \ |
Tim Edwards | b184e85 | 2020-12-04 15:30:05 -0500 | [diff] [blame] | 695 | -variable PDKPATH \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 696 | -link_from ${LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log |
| 697 | echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log |
| 698 | |
| 699 | install-dist: install-dist-a |
| 700 | |
| 701 | install-dist-a: |
| 702 | echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log |
| 703 | ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \ |
| 704 | -target ${DIST_PATH}/${SKY130A} \ |
Tim Edwards | b184e85 | 2020-12-04 15:30:05 -0500 | [diff] [blame] | 705 | -variable PDKPATH \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 706 | -local ${LOCAL_PATH}/${SKY130A} \ |
| 707 | -link_from ${DIST_LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log |
| 708 | echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log |
| 709 | |
| 710 | clean: clean-a |
| 711 | |
| 712 | clean-a: |
| 713 | ${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean |
| 714 | |
| 715 | veryclean: veryclean-a |
| 716 | |
| 717 | veryclean-a: clean-a |
| 718 | ${RM} ${SKY130A}_install.log |
| 719 | ${RM} ${SKY130A}_migrate.log |
Tim Edwards | 6ee1153 | 2021-02-11 12:29:33 -0500 | [diff] [blame] | 720 | |