Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 1 | ------------------------------------ |
| 2 | open_pdks |
| 3 | ---------------------------------------- |
| 4 | Master PDK generator for SkyWater Sky130 |
| 5 | Hybrid 180nm / 130nm foundry process |
| 6 | for open source EDA tools |
| 7 | ---------------------------------------- |
| 8 | |
| 9 | ------------------------------------------------------------------------------- |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 10 | Quick summary (TL;DR): |
| 11 | |
Tim Edwards | 1f33129 | 2021-02-11 12:37:37 -0500 | [diff] [blame] | 12 | Prerequisites: |
| 13 | |
| 14 | sudo apt-get install python3 |
| 15 | |
| 16 | The Magic VLSI layout tool is used often by the installation. If you do |
| 17 | not have it, then obtain it and install with the following: |
| 18 | |
| 19 | sudo apt-get install m4 tcsh tcl-dev tk-dev |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 20 | |
| 21 | git clone https://github.com/RTimothyEdwards/magic |
| 22 | cd magic |
| 23 | ./configure |
| 24 | make |
| 25 | sudo make install |
| 26 | |
| 27 | Open_PDKs SKY130 Installation: Most people will want to run the following |
| 28 | for PDK installation: |
| 29 | |
Tim Edwards | 7e0a644 | 2021-02-11 15:37:42 -0500 | [diff] [blame] | 30 | ./configure --enable-sky130-pdk |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 31 | make |
| 32 | sudo make install |
| 33 | |
| 34 | This will download and install the SkyWater SKY130 PDK, the SKY130 setup |
| 35 | files for xschem, and a third-party library containing alphanumeric layouts. |
Tim Edwards | 7e0a644 | 2021-02-11 15:37:42 -0500 | [diff] [blame] | 36 | If you prefer an installation in your user space, then use configure option |
| 37 | "--with-sky130-local-path=<path>" with <path> being some alternative like |
| 38 | ~/pdks, and "make install" does not need to be run sudo. |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 39 | |
Tim Edwards | 1f33129 | 2021-02-11 12:37:37 -0500 | [diff] [blame] | 40 | With he above configuration line, the PDK files will be installed into |
| 41 | the path |
| 42 | /usr/share/pdks/sky130A/ |
| 43 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 44 | ------------------------------------------------------------------------------- |
| 45 | Detailed instructions for the patient reader: |
| 46 | ------------------------------------------------------------------------------- |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 47 | Prerequisites: |
| 48 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 49 | 1. EDA tools: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 50 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 51 | For installing files to use with the Magic layout tool, Magic must be installed. |
| 52 | Obtain Magic from: |
| 53 | |
| 54 | https://github.com/RTimothyEdwards/magic |
| 55 | |
| 56 | No other tools are required for installation, although open_pdks will |
| 57 | generate and install the setup files for a number of tools. |
| 58 | |
| 59 | 2. Foundry source files [optional]: |
| 60 | |
| 61 | If you do not have the foundry source files, the latest version will |
| 62 | be downloaded from github, built, and installed locally in the |
| 63 | open_pdks/sources/ directory. If you have the foundry source files, |
| 64 | then you can pass the location to the open_pdks configure script. In |
| 65 | that case, the sources will need to be completely built. The |
| 66 | instructions below are needed ONLY if you intend to download and |
| 67 | install the PDK sources outside of open_pdks. Instructions below |
| 68 | are only valid for the SkyWater SKY130 process. If additional |
| 69 | open-source PDKs become available, instructions will be added as |
| 70 | needed. |
| 71 | |
| 72 | Obtain sources for the SkyWater sky130 130nm process from the git repository |
| 73 | at the following location: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 74 | |
| 75 | https://github.com/google/skywater-pdk |
| 76 | |
| 77 | This repository may go in any convenient location. The Makefile suggests |
| 78 | the target location ~/projects/foundry/skywater-pdk but any location will |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 79 | do as long as the --enable-sky130-pdk= configuration option value is set |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 80 | appropriately. |
| 81 | |
| 82 | So cd to the target location parent directory (e.g., "cd ~/projects/foundry") |
| 83 | and run the following command: |
| 84 | |
| 85 | git clone https://github.com/google/skywater-pdk |
| 86 | |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 87 | Note that many of the files in the PDK are too large for a single git |
| 88 | repository, and so each IP library in the PDK has been placed in a |
| 89 | submodule. There are multiple versions of each library, and it is |
| 90 | nearly certain that you will only want to deal with the "latest" version |
| 91 | of each. To make sure you have the submodules for the latest version of |
| 92 | each supported IP library, do: |
| 93 | |
| 94 | cd skywater-pdk |
Tim Edwards | c31a41f | 2020-11-11 10:40:03 -0500 | [diff] [blame] | 95 | git submodule init libraries/sky130_fd_io/latest |
| 96 | git submodule init libraries/sky130_fd_pr/latest |
Tim Edwards | df0e1de | 2020-07-11 17:34:56 -0400 | [diff] [blame] | 97 | git submodule init libraries/sky130_fd_sc_hd/latest |
Tim Edwards | df0e1de | 2020-07-11 17:34:56 -0400 | [diff] [blame] | 98 | git submodule init libraries/sky130_fd_sc_hvl/latest |
Tim Edwards | ba45dee | 2021-04-28 11:09:39 -0400 | [diff] [blame] | 99 | [git submodule init libraries/sky130_fd_sc_hdll/latest] |
| 100 | [git submodule init libraries/sky130_fd_sc_hs/latest] |
| 101 | [git submodule init libraries/sky130_fd_sc_ms/latest] |
| 102 | [git submodule init libraries/sky130_fd_sc_ls/latest] |
| 103 | [git submodule init libraries/sky130_fd_sc_lp/latest] |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 104 | git submodule update |
| 105 | |
| 106 | The liberty (.lib) files are the largest of all and so individual files |
| 107 | are too large for the git repo and need to be assembled by script. To |
| 108 | do that, do: |
| 109 | |
| 110 | make timing |
| 111 | |
Tim Edwards | ba45dee | 2021-04-28 11:09:39 -0400 | [diff] [blame] | 112 | That installs all of the Google/Skywater files. To keep the overhead low, |
| 113 | you may initialize only the submodules that you need. At a minimum, the |
| 114 | I/O library, primitive devices, and the high density and high voltage |
| 115 | digital standard cell libraries should be installed. The remaining standard |
| 116 | cell libraries are optional, as needed for low-leakage, high speed, low power, |
| 117 | etc., applications. |
Tim Edwards | fd5136b | 2020-07-08 22:57:04 -0400 | [diff] [blame] | 118 | |
| 119 | Then follow the instructions below for generating the additional files |
| 120 | for supporting the open source EDA tool flows. |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 121 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 122 | PDK Installation: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 123 | |
| 124 | There are two methods for installation: Local and Distribution. Use Local |
| 125 | installation if you are installing on a single host computer. Use Distribution |
| 126 | installation if you are installing into a respository (such as git) that will |
| 127 | be distributed to multiple hosts. |
| 128 | |
| 129 | Step 1: |
| 130 | |
Tim Edwards | 60b4f62 | 2020-08-02 10:49:17 -0400 | [diff] [blame] | 131 | Run "configure" to set the paths to the Google/SkyWater source |
| 132 | repository and to set the path to the install location. Note that |
| 133 | the configure script is located in the open_pdks top level directory, |
| 134 | not in the foundry subdirctory, and must be run from the top level |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 135 | directory. The mandatory configure options are as follows: |
Tim Edwards | 60b4f62 | 2020-08-02 10:49:17 -0400 | [diff] [blame] | 136 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 137 | --enable-sky130-pdk[=/path/to/sky130/pdk/source] |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 138 | |
| 139 | See below for details. |
Tim Edwards | 60b4f62 | 2020-08-02 10:49:17 -0400 | [diff] [blame] | 140 | |
| 141 | NOTE: The intention of the configure file is to not have to hand-edit |
| 142 | the Makefile. However, the development of the configure script is |
| 143 | currently ongoing and unfinished, so for now the Makefile should be |
| 144 | checked and edited after running configure. |
| 145 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 146 | --enable-sky130-pdk[=/path/to/sky130/pdk/source] |
| 147 | This is mandatory for specifying that the installation |
| 148 | is for the SKY130 PDK. If the path is specified, then |
| 149 | the PDK is assumed to already be downloaded and installed. |
| 150 | If not, then the PDK will be downloaded automatically |
| 151 | from github and installed. Note that the PDK repository |
| 152 | is very large, contains submodules, and the submodules |
| 153 | need to compile the liberty timing files, which can |
| 154 | take a very long time. Be patient. |
| 155 | |
| 156 | --with-ef-style |
| 157 | Select this for an efabless-style file structure. |
| 158 | The default is "no". There are some differences in |
| 159 | these two styles, the most important of which being |
| 160 | that the order of directories for the IP libraries |
| 161 | is <file_format>/<library_name> instead of |
| 162 | <library_name>/<file_format>. Other differences |
| 163 | include version tracking of the Magic setup files |
| 164 | and the location of the technology LEF file. |
| 165 | |
| 166 | --with-sky130-link-targets=none|source |
| 167 | "none" copies files from the source directories to |
| 168 | the target. "source" makes symbolic links to the source |
| 169 | directories. Use "source" only if doing a local install, |
| 170 | and the source foundry data will not be deleted. For |
| 171 | distribution installations, the value must be set to |
| 172 | "none". |
| 173 | |
| 174 | --with-sky130-local-path=<path> |
| 175 | The path to the target install directory. This is used |
| 176 | in both the local and distribution installations. For |
| 177 | a distribution installation, this is the local name of |
| 178 | the path to the PDK after it has been distributed to |
| 179 | the host computers (This should have been set by the |
Tim Edwards | 7e0a644 | 2021-02-11 15:37:42 -0500 | [diff] [blame] | 180 | option --with-local-path= passed to configure). If not |
| 181 | specified, then the default <path> is /usr/share/pdks/, |
| 182 | so the PDK will be installed as /usr/share/pdks/sky130A/. |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 183 | |
| 184 | --with-sky130-dist-path=<path> |
| 185 | The path to the location of the installed files prior to |
| 186 | distribution. This will most likely be a git or similar |
| 187 | repo. This path should NOT be specified for a single- |
| 188 | machine installation. |
| 189 | |
| 190 | --enable-alpha-sky130[=<path>] |
| 191 | The path to the sky130_ml_xx_hd library, a third-party |
| 192 | library containing layouts of alphanumeric characters |
Tim Edwards | 7e0a644 | 2021-02-11 15:37:42 -0500 | [diff] [blame] | 193 | for adding text to layout. If the configuration option |
| 194 | or the path is not specified, then the library will be |
| 195 | downloaded from github automatically. To disable this |
| 196 | package, use "--disable-alpha-sky130". |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 197 | |
| 198 | --enable-xschem-sky130[=<path>] |
| 199 | The path to the SKY130 setup for the xschem schematic |
Tim Edwards | 7e0a644 | 2021-02-11 15:37:42 -0500 | [diff] [blame] | 200 | entry/schematic capture tool. If the configuration |
| 201 | option or the path is not specified, then the library |
| 202 | will be downloaded from github automatically. To disable |
| 203 | this package, use "--disable-xschem-sky130". |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 204 | |
Tim Edwards | ba45dee | 2021-04-28 11:09:39 -0400 | [diff] [blame] | 205 | --enable-sram-sky130[=<path>] |
| 206 | This 3rd party library contains pre-compiled and verified |
| 207 | memory blocks from the OpenRAM open source memory compiler. |
| 208 | It is disabled by default due to the length of time |
| 209 | required to install, but it is recommended if you will be |
| 210 | using SRAM in a design. |
| 211 | |
| 212 | --enable-osu-sky130[=<path>] |
| 213 | This 3rd party library is a set of open-source digital |
| 214 | standard cells. |
| 215 | |
| 216 | --enable-osu-t12--sky130[=<path>] |
| 217 | This 3rd party library is a set of open-source digital |
| 218 | standard cells at 12 track pitch height. |
| 219 | |
| 220 | --enable-osu-t15--sky130[=<path>] |
| 221 | This 3rd party library is a set of open-source digital |
| 222 | standard cells at 15 track pitch height. |
| 223 | |
| 224 | --enable-osu-t18--sky130[=<path>] |
| 225 | This 3rd party library is a set of open-source digital |
| 226 | standard cells at 18 track pitch height. |
| 227 | |
Tim Edwards | 60b4f62 | 2020-08-02 10:49:17 -0400 | [diff] [blame] | 228 | Step 2: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 229 | Run: |
| 230 | |
| 231 | make |
| 232 | |
| 233 | This will pre-process the setup files to create the PDK-specific files |
| 234 | for the SKY130A PDK, and process all vendor files, and place everything |
| 235 | in a local staging area. |
| 236 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 237 | Step 3: |
| 238 | Run: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 239 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 240 | make install |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 241 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 242 | The behavior of installation depends on whether or not |
| 243 | --with-<pdk>-dist-path=<path> has been set (e.g., |
| 244 | --with-sky130-dist-path). If only the local path |
| 245 | (--with-<pdk>-local-path=<path>) has been set, then "make |
| 246 | install" copies all files from the staging area into the |
| 247 | destination. All pointers to absolute paths in the files |
| 248 | are changed to match the local path. |
| 249 | |
| 250 | If --with-<pdk>-dist-path=<path> has been set, then "make |
| 251 | install" copies all files from the staging area into the |
| 252 | destination as specified by the value of <path>. All |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 253 | pointers to absolute paths in the files are changed to match |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 254 | the local path value. The assumption is that the distribution |
| 255 | path is a repository (such as a git repo) that is cloned to |
| 256 | multiple hosts, and the destination on the hosts where it is |
| 257 | distributed is the local path. |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 258 | |
| 259 | ------------------------------------------------------------------------------- |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 260 | Summary of the installation directories: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 261 | |
| 262 | The Makefile script takes the source files and generates files for local |
| 263 | PDK names "SKY130A", "SKY130B", etc. (Note there is currently only one |
| 264 | PDK variant "A".) |
| 265 | |
| 266 | The definition of each PDK is made in the Makefile using defines; e.g., |
| 267 | -DMETAL5, etc. |
| 268 | |
| 269 | The make script makes use of the python script "preproc.py" (in the ../common |
| 270 | directory) to parse each source file for "#ifdef ..."-type macros. The syntax |
| 271 | is similar to that used by the C preprocessor (cpp) but does not assume C |
| 272 | language syntax in the input file, so is generally better to use than cpp |
| 273 | (has less unexpected/unintentional behavior). See comments in the preproc.py |
| 274 | script for a full list of macros that it accepts (short list: #ifdef, #ifndef, |
| 275 | #define, #include, and boolean operators ||, &&, and !). |
| 276 | |
| 277 | Files generated: |
| 278 | .tech techfile for magic (full DRC, extract, GDS) |
| 279 | -GDS.tech techfile for magic, vendor mask layers |
| 280 | .tcl PDK script for magic |
| 281 | -BindKeys key binding script for magic partly matching Cadence defaults |
| 282 | .magicrc magic startup script (copy to local directory as .magicrc) |
| 283 | _setup.tcl netgen setup script for LVS |
| 284 | .sh qflow master setup script, standard 1.8V digital |
| 285 | .par graywolf setup file, standard 1.8V digital |
| 286 | |
| 287 | The installation directory below LOCAL_PATH is the name of the PDK; e.g., |
| 288 | |
| 289 | sky130A/ 5-metal stack with MiM cap and redistribution layer |
| 290 | |
| 291 | The installation directory hierarchy below the PDK name looks like the following: |
| 292 | |
| 293 | libs.tech/ technology and setup files |
| 294 | |
| 295 | magic/ magic techfiles, startup file, PDK script, |
| 296 | and key binding script. |
| 297 | netgen/ netgen setup file |
| 298 | qflow/ qflow scripts and graywolf setup files. |
| 299 | klayout/ setup files for klayout |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 300 | openlane/ setup and supplementary files for openlane |
Tim Edwards | f8c7eb8 | 2021-02-10 09:07:54 -0500 | [diff] [blame] | 301 | ngspice/ base model files and libraries for ngspice |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 302 | xschem/ setup files for xschem |
| 303 | irsim/ setup and parameter files for IRSIM |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 304 | |
| 305 | libs.ref/ foundry data |
| 306 | |
| 307 | cdl/ CDL netlists |
| 308 | doc/ Foundry documentation |
| 309 | gds/ GDS files |
| 310 | lef/ LEF macro files |
| 311 | lib/ Timing files |
| 312 | mag/ Magic files derived from GDS |
| 313 | maglef/ Magic files derived from LEF macros |
| 314 | spice/ SPICE netlists (ngspice compatible) |
| 315 | techlef/ LEF technology files |
| 316 | verilog/ verilog modules |
| 317 | |
| 318 | Each subdirectory of libs.ref is further divided into sections based on the |
| 319 | IP type. The section names are largely foundry-dependent. For SkyWater Sky130, |
| 320 | these sections include one or more of: |
| 321 | |
| 322 | sky130_fd_sc_hd/ 1.8V digital logic (high density) |
| 323 | sky130_fd_sc_hdll/ 1.8V digital logic (high density low leakage) |
Tim Edwards | 5e28be3 | 2020-07-08 20:33:53 -0400 | [diff] [blame] | 324 | sky130_fd_sc_hs/ 1.8V digital logic (high speed) |
| 325 | sky130_fd_sc_hvl/ 3.3V digital logic |
| 326 | sky130_fd_sc_lp/ 1.8V digital logic (low power) |
| 327 | sky130_fd_sc_ls/ 1.8V digital logic (low speed) |
| 328 | sky130_fd_sc_ms/ 3.3V digital logic (medium speed) |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 329 | |
| 330 | sky130_fd_io/ Standard I/O |
| 331 | |
Tim Edwards | f8c7eb8 | 2021-02-10 09:07:54 -0500 | [diff] [blame] | 332 | sky130_fd_pr/ Primitive devices w/fixed layout |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 333 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 334 | sky130_ml_xx_hd/ Library of alphanumeric layouts |
| 335 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 336 | The target installation destinations assume the directory structure above. Changing |
| 337 | this requires editing the source files. |
| 338 | |