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 | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 17 | # --with-sky130-source-path=<path> |
| 18 | # where <path> is the location of the Google/Skywater repository |
| 19 | # cloned from https://github.com/google/skywater-pdk. This |
| 20 | # option is mandatory and has no default. |
| 21 | # |
| 22 | # --with-sky130-local-path=<path> |
| 23 | # where <path> is the run-time location of the installed PDK |
| 24 | # files generated by open_pdks. This option is mandatory and |
| 25 | # has no default. |
| 26 | # |
| 27 | # --with-sky130-dist-path=<path> |
| 28 | # where <path> is the install-time location of the installed |
| 29 | # PDK files generated by open_pdks, with the expectation that |
| 30 | # <path> is something like a git repository that is then |
| 31 | # distributed across a system. If this option is not specified, |
| 32 | # then files are installed to the local path. |
| 33 | # |
| 34 | # --with-sky130-link-targets=<value> |
| 35 | # where <value> is one of "none" or "source". If set to "source", |
| 36 | # then where possible, the installed files are symbolic links |
| 37 | # back to the source, rather than copies of the source. The |
| 38 | # default value is "none" if the option is not specified. |
| 39 | # |
| 40 | # --with-ef-style |
| 41 | # If specified, then the installation uses the efabless style, |
| 42 | # which swaps the file hierarchy of file formats vs. IP libraries; |
| 43 | # e.g., "gds/sky130_fd_sc_hd/" with ef-style, vs. |
| 44 | # "sky130_fd_sc_hd/gds/" without it. |
| 45 | # |
| 46 | # The variables below are substituted from the configuration options: |
| 47 | # |
| 48 | # SKYWATER_PATH: points to vendor sources |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 49 | # EF_STYLE: 1 for efabless style, 0 otherwise |
| 50 | # LINK_TARGETS: link back to source or link to 1st PDK when possible |
| 51 | # DIST_PATH: install location for distributed install |
| 52 | # LOCAL_PATH: install location for local install or runtime location |
| 53 | # for distributed install |
| 54 | # |
| 55 | # Run "make" to stage the PDK for tool setup and vendor libraries |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 56 | # |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 57 | # Run "make install" to install all staged files. The installation is |
| 58 | # either local or distributed, depending on whether --with-sky130-dist-path |
| 59 | # has been set when running configure. |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 60 | # |
| 61 | # Run "make clean" to remove all staging files. |
| 62 | # |
| 63 | # Run "make veryclean" to remove all staging and install log files. |
| 64 | # |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 65 | # For the sake of simplicity, the "standard" installation can be done |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 66 | # with the usual |
| 67 | # |
| 68 | # make |
| 69 | # make install |
| 70 | # make clean |
| 71 | # |
| 72 | #-------------------------------------------------------------------- |
| 73 | # This Makefile contains bash-isms |
| 74 | SHELL = bash |
| 75 | |
Tim Edwards | 5c7924d | 2020-09-30 22:22:10 -0400 | [diff] [blame] | 76 | REVISION = 20200927 |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 77 | TECH = sky130 |
| 78 | |
| 79 | # If EF_STYLE is set to 1, then efabless naming conventions are |
| 80 | # used, otherwise the generic naming conventions are used. |
| 81 | # Mainly, the hierarchy of library names and file types is reversed |
| 82 | # (e.g., sky130_fd_sc_hd/lef vs. lef/sky130_fd_sc_hd). |
| 83 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 84 | # EF_STYLE = 0 | 1 |
| 85 | EF_STYLE = @EF_STYLE@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 86 | |
| 87 | # Normally it's fine to keep the staging path in a local directory, |
| 88 | # although /tmp or a dedicated staging area are also fine, as long |
| 89 | # as the install process can write to the path. |
| 90 | |
| 91 | STAGING_PATH = `pwd` |
| 92 | |
| 93 | # If LINK_TARGETS is set to "none", then files are copied |
| 94 | # from the SkyWater sources to the target. If set to "source", |
| 95 | # symbolic links are made in the target directories pointing |
| 96 | # back to the SkyWater sources. If set to the name of another |
| 97 | # PDK (e.g, "sky130A"), then symbolic links are made to the |
| 98 | # same files in that PDK, where they exist, and are copied |
| 99 | # from source, where they don't. |
| 100 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 101 | # LINK_TARGETS = source | none | sky130A |
| 102 | LINK_TARGETS = @SKY130_LINK_TARGETS@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 103 | |
| 104 | # Paths: |
| 105 | |
| 106 | # Path to skywater_pdk (to be changed to public repo; work in progress) |
| 107 | # Version below comes from foss-eda-tools.googlesource.com |
| 108 | # SKYWATER_PATH = ~/gits/skywater-pdk-scratch/skywater-pdk/libraries |
| 109 | # Version below is also from foss-eda-tools and is more recent than |
| 110 | # the scratch repo above. |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 111 | SKYWATER_PATH = @SKY130_SOURCE_PATH@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 112 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 113 | # Path to OSU standard cell library sources (to be added to configuration options). |
Tim Edwards | 31a2adf | 2020-07-07 21:47:30 -0400 | [diff] [blame] | 114 | OSU_PATH = ~/gits/osu_130_pdk |
| 115 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 116 | # NOTE: Install destination is the git repository of the technology platform. |
| 117 | # Once updated in git, the git project can be distributed to all hosts. |
| 118 | # |
| 119 | ifeq (${EF_STYLE}, 1) |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 120 | LOCAL_PATH = @SKY130_LOCAL_PATH@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 121 | CONFIG_DIR = .ef-config |
| 122 | REV_DIR = ${REVISION} |
| 123 | else |
| 124 | # LOCAL_PATH = /usr/local/share/vlsi/SkyWater |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 125 | LOCAL_PATH = @SKY130_LOCAL_PATH@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 126 | CONFIG_DIR = .config |
| 127 | REV_DIR = . |
| 128 | endif |
| 129 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 130 | # DIST_PATH = ~/gits/ef-skywater-${TECH} |
| 131 | DIST_PATH = @SKY130_DIST_PATH@ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 132 | |
| 133 | # EF process nodes created from the master sources |
| 134 | SKY130A = sky130A |
| 135 | |
| 136 | ifeq (${LINK_TARGETS}, ${SKY130A}) |
| 137 | DIST_LINK_TARGETS = ${LOCAL_PATH}/${LINK_TARGETS} |
| 138 | else |
| 139 | DIST_LINK_TARGETS = ${LINK_TARGETS} |
| 140 | endif |
| 141 | |
| 142 | # Basic definitions for each EF process node |
| 143 | SKY130A_DEFS = -DTECHNAME=sky130A -DREVISION=${REVISION} |
| 144 | |
| 145 | # Module definitions for each process node |
| 146 | # (Note that MOS is default and therefore not used anywhere) |
Tim Edwards | 0a0272b | 2020-07-28 14:40:10 -0400 | [diff] [blame] | 147 | SKY130A_DEFS += -DMETAL5 -DMIM -DREDISTRIBUTION |
| 148 | # SKY130A_DEFS += -DMETAL5 -DMIM |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 149 | |
| 150 | # Add staging path |
| 151 | SKY130A_DEFS += -DSTAGING_PATH=${STAGING_PATH} |
| 152 | |
| 153 | ifeq (${EF_STYLE}, 1) |
| 154 | EF_FORMAT = -ef_format |
| 155 | SKY130A_DEFS += -DEF_FORMAT |
| 156 | else |
| 157 | EF_FORMAT = -std_format |
| 158 | endif |
| 159 | |
| 160 | MAGICTOP = libs.tech/magic |
| 161 | NETGENTOP = libs.tech/netgen |
| 162 | QFLOWTOP = libs.tech/qflow |
| 163 | KLAYOUTTOP = libs.tech/klayout |
| 164 | OPENLANETOP = libs.tech/openlane |
| 165 | |
| 166 | ifeq (${EF_STYLE}, 1) |
| 167 | MAGICPATH = ${MAGICTOP}/${REVISION} |
| 168 | else |
| 169 | MAGICPATH = ${MAGICTOP} |
| 170 | endif |
| 171 | |
| 172 | # Currently, netgen, qflow, and klayout do not use revisioning (needs to change!) |
| 173 | NETGENPATH = ${NETGENTOP} |
| 174 | QFLOWPATH = ${QFLOWTOP} |
| 175 | KLAYOUTPATH = ${KLAYOUTTOP} |
| 176 | OPENLANEPATH = ${OPENLANETOP} |
| 177 | |
| 178 | MAGICTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICTOP} |
| 179 | NETGENTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENTOP} |
| 180 | QFLOWTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWTOP} |
| 181 | KLAYOUTTOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTTOP} |
| 182 | OPENLANETOP_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANETOP} |
| 183 | |
| 184 | MAGIC_STAGING_A = ${STAGING_PATH}/${SKY130A}/${MAGICPATH} |
| 185 | NETGEN_STAGING_A = ${STAGING_PATH}/${SKY130A}/${NETGENPATH} |
| 186 | QFLOW_STAGING_A = ${STAGING_PATH}/${SKY130A}/${QFLOWPATH} |
| 187 | KLAYOUT_STAGING_A = ${STAGING_PATH}/${SKY130A}/${KLAYOUTPATH} |
| 188 | OPENLANE_STAGING_A = ${STAGING_PATH}/${SKY130A}/${OPENLANEPATH} |
| 189 | |
| 190 | SKY130A_DEFS += -DMAGIC_CURRENT=${MAGICTOP}/current |
| 191 | |
| 192 | # Where cpp syntax is followed, this is equivalent to cpp, but it does not |
| 193 | # mangle non-C source files under the belief that they are actually C code. |
| 194 | CPP = ../common/preproc.py |
| 195 | |
| 196 | # The following script in the ../common directory does most of the work of |
| 197 | # copying or linking the foundry vendor files to the target directory. |
| 198 | STAGE = set -f ; ../common/foundry_install.py ${EF_FORMAT} |
| 199 | INSTALL = ../common/staging_install.py ${EF_FORMAT} |
| 200 | |
| 201 | # 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] | 202 | ADDPROP = ../common/insert_property.py ${EF_FORMAT} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 203 | |
| 204 | # List the EDA tools to install local setup files for |
| 205 | TOOLS = magic qflow netgen klayout openlane |
| 206 | |
| 207 | all: all-a |
| 208 | |
| 209 | all-a: |
| 210 | echo "Starting sky130A PDK staging on "`date` > ${SKY130A}_install.log |
| 211 | ${MAKE} tools-a |
| 212 | ${MAKE} vendor-a |
| 213 | echo "Ended sky130A PDK staging on "`date` >> ${SKY130A}_install.log |
| 214 | |
| 215 | tools-a: general-a magic-a qflow-a netgen-a klayout-a openlane-a |
| 216 | |
| 217 | general-a: ${TECH}.json |
| 218 | mkdir -p ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR} |
| 219 | rm -f ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json |
| 220 | ${CPP} ${SKY130A_DEFS} ${TECH}.json > \ |
| 221 | ${STAGING_PATH}/${SKY130A}/${CONFIG_DIR}/nodeinfo.json |
| 222 | |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 223 | 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] | 224 | mkdir -p ${MAGICTOP_STAGING_A} |
| 225 | mkdir -p ${MAGIC_STAGING_A} |
| 226 | rm -f ${MAGICTOP_STAGING_A}/current |
| 227 | rm -f ${MAGIC_STAGING_A}/${SKY130A}.tech |
| 228 | rm -f ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech |
| 229 | rm -f ${MAGIC_STAGING_A}/${SKY130A}.tcl |
| 230 | rm -f ${MAGIC_STAGING_A}/${SKY130A}-BindKeys |
| 231 | rm -f ${MAGIC_STAGING_A}/magicrc |
| 232 | (cd ${MAGICTOP_STAGING_A} ; ln -s ${REV_DIR} current) |
| 233 | cp -rp custom/scripts/seal_ring_generator ${MAGIC_STAGING_A}/. |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 234 | ${CPP} ${SKY130A_DEFS} magic/${TECH}.tech > ${MAGIC_STAGING_A}/${SKY130A}.tech |
| 235 | ${CPP} ${SKY130A_DEFS} magic/${TECH}gds.tech > ${MAGIC_STAGING_A}/${SKY130A}-GDS.tech |
| 236 | ${CPP} ${SKY130A_DEFS} magic/${TECH}.magicrc > ${MAGIC_STAGING_A}/${SKY130A}.magicrc |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 237 | ${CPP} ${SKY130A_DEFS} ../common/pdk.bindkeys > ${MAGIC_STAGING_A}/${SKY130A}-BindKeys |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 238 | ${CPP} ${SKY130A_DEFS} magic/${TECH}.tcl > ${MAGIC_STAGING_A}/${SKY130A}.tcl |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 239 | ${CPP} ${SKY130A_DEFS} ../common/pdk.tcl >> ${MAGIC_STAGING_A}/${SKY130A}.tcl |
| 240 | |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 241 | qflow-a: qflow/${TECH}.sh qflow/${TECH}.par |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 242 | mkdir -p ${QFLOWTOP_STAGING_A} |
| 243 | mkdir -p ${QFLOW_STAGING_A} |
| 244 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.sh |
| 245 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hd.par |
| 246 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.sh |
| 247 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hdll.par |
| 248 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.sh |
| 249 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hs.par |
| 250 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.sh |
| 251 | rm -f ${QFLOW_STAGING_A}/${SKY130A}hvl.par |
| 252 | rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.sh |
| 253 | rm -f ${QFLOW_STAGING_A}/${SKY130A}ls.par |
| 254 | rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.sh |
| 255 | rm -f ${QFLOW_STAGING_A}/${SKY130A}lp.par |
| 256 | rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.sh |
| 257 | rm -f ${QFLOW_STAGING_A}/${SKY130A}ms.par |
Tim Edwards | 7ec7697 | 2020-07-07 21:56:08 -0400 | [diff] [blame] | 258 | rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.sh |
| 259 | rm -f ${QFLOW_STAGING_A}/${SKY130A}osu.par |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 260 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hd qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 261 | ${QFLOW_STAGING_A}/${SKY130A}hd.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 262 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hdll qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 263 | ${QFLOW_STAGING_A}/${SKY130A}hdll.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 264 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hvl qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 265 | ${QFLOW_STAGING_A}/${SKY130A}hvl.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 266 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_hs qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 267 | ${QFLOW_STAGING_A}/${SKY130A}hs.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 268 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_lp qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 269 | ${QFLOW_STAGING_A}/${SKY130A}lp.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 270 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ls qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 271 | ${QFLOW_STAGING_A}/${SKY130A}ls.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 272 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_fd_sc_ms qflow/${TECH}.sh > \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 273 | ${QFLOW_STAGING_A}/${SKY130A}ms.sh |
Tim Edwards | 7ec7697 | 2020-07-07 21:56:08 -0400 | [diff] [blame] | 274 | ${CPP} ${SKY130A_DEFS} -DLIBRARY=sky130_osu_sc qflow/sky130osu.sh > \ |
| 275 | ${QFLOW_STAGING_A}/${SKY130A}osu.sh |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 276 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hd.par |
| 277 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hdll.par |
| 278 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hvl.par |
| 279 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}hs.par |
| 280 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ms.par |
| 281 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}lp.par |
| 282 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}ls.par |
| 283 | ${CPP} ${SKY130A_DEFS} qflow/${TECH}.par > ${QFLOW_STAGING_A}/${SKY130A}osu.par |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 284 | |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 285 | netgen-a: netgen/${TECH}_setup.tcl |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 286 | mkdir -p ${NETGENTOP_STAGING_A} |
| 287 | mkdir -p ${NETGEN_STAGING_A} |
| 288 | rm -f ${NETGEN_STAGING_A}/${SKY130A}_setup.tcl |
| 289 | rm -f ${NETGEN_STAGING_A}/setup.tcl |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 290 | ${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] | 291 | (cd ${NETGEN_STAGING_A} ; ln -s ${SKY130A}_setup.tcl setup.tcl) |
| 292 | |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 293 | klayout-a: klayout/${TECH}.lyp klayout/${TECH}.lyt |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 294 | mkdir -p ${KLAYOUTTOP_STAGING_A} |
| 295 | mkdir -p ${KLAYOUT_STAGING_A} |
| 296 | rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyp |
| 297 | rm -f ${KLAYOUT_STAGING_A}/${SKY130A}.lyt |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 298 | ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyp > ${KLAYOUT_STAGING_A}/${SKY130A}.lyp |
| 299 | ${CPP} ${SKY130A_DEFS} klayout/${TECH}.lyt > ${KLAYOUT_STAGING_A}/${SKY130A}.lyt |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 300 | |
Ahmed Ghazy | 8e84e5c | 2020-07-27 14:32:34 +0200 | [diff] [blame] | 301 | 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 |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 302 | mkdir -p ${OPENLANETOP_STAGING_A} |
| 303 | mkdir -p ${OPENLANE_STAGING_A} |
| 304 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hd |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 305 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hs |
Ahmed Ghazy | 8e84e5c | 2020-07-27 14:32:34 +0200 | [diff] [blame] | 306 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ls |
| 307 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_ms |
| 308 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll |
| 309 | mkdir -p ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 310 | rm -f ${OPENLANE_STAGING_A}/common_pdn.info |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 311 | rm -f ${OPENLANE_STAGING_A}/config.tcl |
| 312 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 313 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info |
| 314 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells |
| 315 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/sky130_fd_sc_hd__fakediode_2.gds |
| 316 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/config.tcl |
| 317 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/tracks.info |
| 318 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/no_synth.cells |
Ahmed Ghazy | 8e84e5c | 2020-07-27 14:32:34 +0200 | [diff] [blame] | 319 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/config.tcl |
| 320 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/tracks.info |
| 321 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/no_synth.cells |
| 322 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/config.tcl |
| 323 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/tracks.info |
| 324 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/no_synth.cells |
| 325 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/config.tcl |
| 326 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/tracks.info |
| 327 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/no_synth.cells |
| 328 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/config.tcl |
| 329 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/tracks.info |
| 330 | rm -f ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/no_synth.cells |
Tim Edwards | 5778c23 | 2020-07-07 16:57:52 -0400 | [diff] [blame] | 331 | ${CPP} ${SKY130A_DEFS} openlane/common_pdn.tcl > ${OPENLANE_STAGING_A}/common_pdn.tcl |
| 332 | ${CPP} ${SKY130A_DEFS} openlane/config.tcl > ${OPENLANE_STAGING_A}/config.tcl |
| 333 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/config.tcl |
| 334 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/tracks.info |
| 335 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hd/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/no_synth.cells |
| 336 | cp openlane/sky130_fd_sc_hd/sky130_fd_sc_hd__fakediode_2.gds ${OPENLANE_STAGING_A}/sky130_fd_sc_hd/sky130_fd_sc_hd__fakediode_2.gds |
| 337 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/config.tcl |
| 338 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/tracks.info |
| 339 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hs/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hs/no_synth.cells |
Ahmed Ghazy | 8e84e5c | 2020-07-27 14:32:34 +0200 | [diff] [blame] | 340 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/config.tcl |
| 341 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/tracks.info |
| 342 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ms/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_ms/no_synth.cells |
| 343 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/config.tcl |
| 344 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/tracks.info |
| 345 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_ls/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_ls/no_synth.cells |
| 346 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/config.tcl |
| 347 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/tracks.info |
| 348 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hdll/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hdll/no_synth.cells |
| 349 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/config.tcl > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/config.tcl |
| 350 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/tracks.info > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/tracks.info |
| 351 | ${CPP} ${SKY130A_DEFS} openlane/sky130_fd_sc_hvl/no_synth.cells > ${OPENLANE_STAGING_A}/sky130_fd_sc_hvl/no_synth.cells |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 352 | |
| 353 | vendor-a: |
Tim Edwards | 106e38b | 2020-09-20 13:07:54 -0400 | [diff] [blame] | 354 | # Install device subcircuits from vendor files |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 355 | ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 356 | -ngspice sky130_fd_pr/latest/models/* \ |
| 357 | filter=custom/scripts/rename_models.py \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 358 | |& tee -a ${SKY130A}_install.log |
| 359 | # Install base device library from vendor files |
| 360 | ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | 106e38b | 2020-09-20 13:07:54 -0400 | [diff] [blame] | 361 | -gds %l/latest/cells/*/*.gds compile-only \ |
| 362 | -cdl %l/latest/cells/*/*.cdl compile-only \ |
| 363 | -lef %l/latest/cells/*/*.magic.lef compile-only \ |
Tim Edwards | bfc8269 | 2020-09-20 21:33:08 -0400 | [diff] [blame] | 364 | -spice %l/latest/cells/*/*.spice filter=custom/scripts/rename_cells.py \ |
Tim Edwards | 106e38b | 2020-09-20 13:07:54 -0400 | [diff] [blame] | 365 | -library primitive sky130_fd_pr |& tee -a ${SKY130A}_install.log |
Tim Edwards | 42f79a3 | 2020-09-21 14:18:09 -0400 | [diff] [blame] | 366 | # Custom: Add "short" resistor model to the r+c models file |
| 367 | cat ./custom/models/short.spice >> \ |
| 368 | ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 369 | # Install SkyWater I/O pad library |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 370 | ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | 1134fbc | 2020-10-12 22:35:42 -0400 | [diff] [blame^] | 371 | -spice %l/latest/cells/*/*.spice compile-only \ |
| 372 | sort=custom/scripts/sort_pdkfiles.py \ |
| 373 | -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \ |
| 374 | sort=custom/scripts/sort_pdkfiles.py \ |
| 375 | -lef %l/latest/cells/*/*.magic.lef compile-only \ |
| 376 | sort=custom/scripts/sort_pdkfiles.py \ |
| 377 | -doc %l/latest/cells/*/*.pdf \ |
| 378 | -lib %l/latest/timing/*.lib \ |
| 379 | -gds %l/latest/cells/*/*.gds compile-only \ |
| 380 | sort=custom/scripts/sort_pdkfiles.py \ |
| 381 | -verilog %l/latest/cells/*/*.*.v \ |
| 382 | -verilog %l/latest/cells/*/*.v exclude=*.*.v \ |
| 383 | compile-only filter=custom/scripts/inc_verilog.py \ |
| 384 | sort=custom/scripts/sort_pdkfiles.py \ |
| 385 | -library general sky130_fd_io |& tee -a ${SKY130A}_install.log |
| 386 | # Remove the base verilog files which have already been included into |
| 387 | # the libraries |
| 388 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_io/verilog/*.*.v |
| 389 | # Install custom additions to I/O pad library |
| 390 | ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \ |
| 391 | -verilog %l/verilog/*.v \ |
| 392 | -cdl %l/cdl/*.cdl \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 393 | -library general sky130_fd_io |& tee -a ${SKY130A}_install.log |
Ahmed Ghazy | a285ff4 | 2020-07-27 17:52:14 +0200 | [diff] [blame] | 394 | # Install all SkyWater digital standard cells. |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 395 | ${STAGE} -source ${SKYWATER_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 396 | -techlef %l/latest/tech/*.tlef \ |
| 397 | -spice %l/latest/cells/*/*.spice compile-only \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 398 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 399 | -cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 400 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | 106e38b | 2020-09-20 13:07:54 -0400 | [diff] [blame] | 401 | -lef %l/latest/cells/*/*.magic.lef compile-only \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 402 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 403 | -doc %l/latest/cells/*/*.pdf \ |
| 404 | -lib %l/latest/timing/*.lib \ |
| 405 | -gds %l/latest/cells/*/*.gds compile-only \ |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 406 | sort=custom/scripts/sort_pdkfiles.py \ |
| 407 | -verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \ |
| 408 | rename=primitives filter=custom/scripts/inc_verilog.py \ |
| 409 | sort=custom/scripts/sort_pdkfiles.py \ |
| 410 | -verilog %l/latest/cells/*/*.*.v \ |
| 411 | -verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \ |
| 412 | compile-only filter=custom/scripts/inc_verilog.py \ |
| 413 | sort=custom/scripts/sort_pdkfiles.py \ |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 414 | -library digital sky130_fd_sc_hd \ |
| 415 | -library digital sky130_fd_sc_hdll \ |
| 416 | -library digital sky130_fd_sc_hvl \ |
| 417 | -library digital sky130_fd_sc_hs \ |
| 418 | -library digital sky130_fd_sc_ls \ |
| 419 | -library digital sky130_fd_sc_ms \ |
| 420 | -library digital sky130_fd_sc_lp |& tee -a ${SKY130A}_install.log |
Tim Edwards | 995c133 | 2020-09-25 15:33:58 -0400 | [diff] [blame] | 421 | # Remove the base verilog files which have already been included into |
| 422 | # the libraries |
| 423 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hd/verilog/*.*.v |
| 424 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hdll/verilog/*.*.v |
| 425 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hvl/verilog/*.*.v |
| 426 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_hs/verilog/*.*.v |
| 427 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ms/verilog/*.*.v |
| 428 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_ls/verilog/*.*.v |
| 429 | ${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/sky130_fd_sc_lp/verilog/*.*.v |
Tim Edwards | 31a2adf | 2020-07-07 21:47:30 -0400 | [diff] [blame] | 430 | # Install OSU digital standard cells. |
Ahmed Ghazy | 41c40c4 | 2020-07-27 17:00:22 +0200 | [diff] [blame] | 431 | # ${STAGE} -source ${OSU_PATH} -target ${STAGING_PATH}/${SKY130A} \ |
| 432 | # -techlef char/techfiles/scs8.lef rename sky130_osu_sc.tlef \ |
| 433 | # -spice lib/spice/*.spice compile-only \ |
| 434 | # -lef outputs/s8_osu130.lef rename sky130_osu_sc.lef \ |
| 435 | # -lib outputs/*.lib \ |
| 436 | # -gds lib/gds/*.gds compile-only \ |
| 437 | # -verilog outputs/VERILOG/*.v \ |
| 438 | # -library digital sky130_osu_sc |
Ahmed Ghazy | 41c40c4 | 2020-07-27 17:00:22 +0200 | [diff] [blame] | 439 | # # Add correct bounding boxes on Magic layouts |
| 440 | # ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_gpio_ovtv2 \ |
| 441 | # "FIXED_BBOX 0 407 28000 40000" |
| 442 | # ${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io_top_xres4v2 \ |
| 443 | # "FIXED_BBOX 0 407 15000 40000" |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 444 | |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 445 | install: |
Ahmed Ghazy | f45cbf3 | 2020-08-08 17:11:53 +0200 | [diff] [blame] | 446 | if test "x${DIST_PATH}" == "x" ; then \ |
| 447 | ${MAKE} install-local ; \ |
| 448 | else \ |
| 449 | ${MAKE} install-dist; \ |
Tim Edwards | 7cbaaba | 2020-08-05 12:19:18 -0400 | [diff] [blame] | 450 | fi |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 451 | |
| 452 | install-local: install-local-a |
| 453 | |
| 454 | install-local-a: |
| 455 | echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log |
| 456 | ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \ |
| 457 | -target ${LOCAL_PATH}/${SKY130A} \ |
| 458 | -link_from ${LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log |
| 459 | echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log |
| 460 | |
| 461 | install-dist: install-dist-a |
| 462 | |
| 463 | install-dist-a: |
| 464 | echo "Starting SKY130 PDK migration on "`date` > ${SKY130A}_migrate.log |
| 465 | ${INSTALL} -source ${STAGING_PATH}/${SKY130A} \ |
| 466 | -target ${DIST_PATH}/${SKY130A} \ |
| 467 | -local ${LOCAL_PATH}/${SKY130A} \ |
| 468 | -link_from ${DIST_LINK_TARGETS} |& tee -a ${SKY130A}_migrate.log |
| 469 | echo "Ended SKY130 PDK migration on "`date` >> ${SKY130A}_migrate.log |
| 470 | |
| 471 | clean: clean-a |
| 472 | |
| 473 | clean-a: |
| 474 | ${STAGE} -target ${STAGING_PATH}/${SKY130A} -clean |
| 475 | |
| 476 | veryclean: veryclean-a |
| 477 | |
| 478 | veryclean-a: clean-a |
| 479 | ${RM} ${SKY130A}_install.log |
| 480 | ${RM} ${SKY130A}_migrate.log |