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 | This is mandatory for specifying that the installation |
| 139 | is for the SKY130 PDK. If the path is specified, then |
| 140 | the PDK is assumed to already be downloaded and installed. |
| 141 | If not, then the PDK will be downloaded automatically |
| 142 | from github and installed. Note that the PDK repository |
| 143 | is very large, contains submodules, and the submodules |
| 144 | need to compile the liberty timing files, which can |
| 145 | take a very long time. Be patient. |
| 146 | |
| 147 | --with-ef-style |
| 148 | Select this for an efabless-style file structure. |
| 149 | The default is "no". There are some differences in |
| 150 | these two styles, the most important of which being |
| 151 | that the order of directories for the IP libraries |
| 152 | is <file_format>/<library_name> instead of |
| 153 | <library_name>/<file_format>. Other differences |
| 154 | include version tracking of the Magic setup files |
| 155 | and the location of the technology LEF file. |
| 156 | |
| 157 | --with-sky130-link-targets=none|source |
| 158 | "none" copies files from the source directories to |
| 159 | the target. "source" makes symbolic links to the source |
| 160 | directories. Use "source" only if doing a local install, |
| 161 | and the source foundry data will not be deleted. For |
| 162 | distribution installations, the value must be set to |
| 163 | "none". |
| 164 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 165 | --enable-alpha-sky130[=<path>] |
| 166 | The path to the sky130_ml_xx_hd library, a third-party |
| 167 | library containing layouts of alphanumeric characters |
Tim Edwards | 7e0a644 | 2021-02-11 15:37:42 -0500 | [diff] [blame] | 168 | for adding text to layout. If the configuration option |
| 169 | or the path is not specified, then the library will be |
| 170 | downloaded from github automatically. To disable this |
| 171 | package, use "--disable-alpha-sky130". |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 172 | |
| 173 | --enable-xschem-sky130[=<path>] |
| 174 | The path to the SKY130 setup for the xschem schematic |
Tim Edwards | 7e0a644 | 2021-02-11 15:37:42 -0500 | [diff] [blame] | 175 | entry/schematic capture tool. If the configuration |
| 176 | option or the path is not specified, then the library |
| 177 | will be downloaded from github automatically. To disable |
| 178 | this package, use "--disable-xschem-sky130". |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 179 | |
Tim Edwards | ba45dee | 2021-04-28 11:09:39 -0400 | [diff] [blame] | 180 | --enable-sram-sky130[=<path>] |
| 181 | This 3rd party library contains pre-compiled and verified |
| 182 | memory blocks from the OpenRAM open source memory compiler. |
| 183 | It is disabled by default due to the length of time |
| 184 | required to install, but it is recommended if you will be |
| 185 | using SRAM in a design. |
| 186 | |
Anton Blanchard | 2e33ddf | 2021-12-21 20:37:37 +1100 | [diff] [blame] | 187 | --enable-osu-t12-sky130[=<path>] |
Tim Edwards | ba45dee | 2021-04-28 11:09:39 -0400 | [diff] [blame] | 188 | This 3rd party library is a set of open-source digital |
| 189 | standard cells at 12 track pitch height. |
| 190 | |
Anton Blanchard | 2e33ddf | 2021-12-21 20:37:37 +1100 | [diff] [blame] | 191 | --enable-osu-t15-sky130[=<path>] |
Tim Edwards | ba45dee | 2021-04-28 11:09:39 -0400 | [diff] [blame] | 192 | This 3rd party library is a set of open-source digital |
| 193 | standard cells at 15 track pitch height. |
| 194 | |
Anton Blanchard | 2e33ddf | 2021-12-21 20:37:37 +1100 | [diff] [blame] | 195 | --enable-osu-t18-sky130[=<path>] |
Tim Edwards | ba45dee | 2021-04-28 11:09:39 -0400 | [diff] [blame] | 196 | This 3rd party library is a set of open-source digital |
| 197 | standard cells at 18 track pitch height. |
| 198 | |
Tim Edwards | 421daef | 2021-12-21 11:59:36 -0500 | [diff] [blame] | 199 | --prefix=<path> |
| 200 | This redirects the installation destination. open_pdks |
| 201 | installs into ${prefix}/share/pdk/, and by default |
| 202 | ${prefix} is /usr/local. Be advised that Makefile |
| 203 | automatically adds the "share/" path regardless. To |
| 204 | install in a different location, pass these (optional) |
| 205 | environment variables to "make": |
| 206 | |
| 207 | SHARED_PDKS_PATH = <path> |
| 208 | Overrides ${prefix}/share/pdk/ and installs |
| 209 | directly into the specified <path> |
| 210 | |
| 211 | DESTDIR = <path> |
| 212 | When defined, then "make install" installs into |
| 213 | the specified <path>. However, all references |
| 214 | to files in the PDK will reference SHARED_PDKS_PATH. |
| 215 | Use DESTDIR if you want to install into a temporary |
| 216 | location such as a git repository or tarball that |
| 217 | will eventually be distributed and placed at |
| 218 | SHARED_PDKS_PATH on the target systems. |
| 219 | |
Tim Edwards | 60b4f62 | 2020-08-02 10:49:17 -0400 | [diff] [blame] | 220 | Step 2: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 221 | Run: |
| 222 | |
| 223 | make |
| 224 | |
| 225 | This will pre-process the setup files to create the PDK-specific files |
| 226 | for the SKY130A PDK, and process all vendor files, and place everything |
| 227 | in a local staging area. |
| 228 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 229 | Step 3: |
| 230 | Run: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 231 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 232 | make install |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 233 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 234 | The behavior of installation depends on whether or not |
| 235 | --with-<pdk>-dist-path=<path> has been set (e.g., |
| 236 | --with-sky130-dist-path). If only the local path |
| 237 | (--with-<pdk>-local-path=<path>) has been set, then "make |
| 238 | install" copies all files from the staging area into the |
| 239 | destination. All pointers to absolute paths in the files |
| 240 | are changed to match the local path. |
| 241 | |
| 242 | If --with-<pdk>-dist-path=<path> has been set, then "make |
| 243 | install" copies all files from the staging area into the |
| 244 | destination as specified by the value of <path>. All |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 245 | pointers to absolute paths in the files are changed to match |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 246 | the local path value. The assumption is that the distribution |
| 247 | path is a repository (such as a git repo) that is cloned to |
| 248 | multiple hosts, and the destination on the hosts where it is |
| 249 | distributed is the local path. |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 250 | |
| 251 | ------------------------------------------------------------------------------- |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 252 | Summary of the installation directories: |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 253 | |
| 254 | The Makefile script takes the source files and generates files for local |
| 255 | PDK names "SKY130A", "SKY130B", etc. (Note there is currently only one |
| 256 | PDK variant "A".) |
| 257 | |
| 258 | The definition of each PDK is made in the Makefile using defines; e.g., |
| 259 | -DMETAL5, etc. |
| 260 | |
| 261 | The make script makes use of the python script "preproc.py" (in the ../common |
| 262 | directory) to parse each source file for "#ifdef ..."-type macros. The syntax |
| 263 | is similar to that used by the C preprocessor (cpp) but does not assume C |
| 264 | language syntax in the input file, so is generally better to use than cpp |
| 265 | (has less unexpected/unintentional behavior). See comments in the preproc.py |
| 266 | script for a full list of macros that it accepts (short list: #ifdef, #ifndef, |
| 267 | #define, #include, and boolean operators ||, &&, and !). |
| 268 | |
| 269 | Files generated: |
| 270 | .tech techfile for magic (full DRC, extract, GDS) |
| 271 | -GDS.tech techfile for magic, vendor mask layers |
| 272 | .tcl PDK script for magic |
| 273 | -BindKeys key binding script for magic partly matching Cadence defaults |
| 274 | .magicrc magic startup script (copy to local directory as .magicrc) |
| 275 | _setup.tcl netgen setup script for LVS |
| 276 | .sh qflow master setup script, standard 1.8V digital |
| 277 | .par graywolf setup file, standard 1.8V digital |
| 278 | |
| 279 | The installation directory below LOCAL_PATH is the name of the PDK; e.g., |
| 280 | |
| 281 | sky130A/ 5-metal stack with MiM cap and redistribution layer |
| 282 | |
| 283 | The installation directory hierarchy below the PDK name looks like the following: |
| 284 | |
| 285 | libs.tech/ technology and setup files |
| 286 | |
| 287 | magic/ magic techfiles, startup file, PDK script, |
| 288 | and key binding script. |
| 289 | netgen/ netgen setup file |
| 290 | qflow/ qflow scripts and graywolf setup files. |
| 291 | klayout/ setup files for klayout |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 292 | openlane/ setup and supplementary files for openlane |
Tim Edwards | f8c7eb8 | 2021-02-10 09:07:54 -0500 | [diff] [blame] | 293 | ngspice/ base model files and libraries for ngspice |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 294 | xschem/ setup files for xschem |
| 295 | irsim/ setup and parameter files for IRSIM |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 296 | |
| 297 | libs.ref/ foundry data |
| 298 | |
| 299 | cdl/ CDL netlists |
| 300 | doc/ Foundry documentation |
| 301 | gds/ GDS files |
| 302 | lef/ LEF macro files |
| 303 | lib/ Timing files |
| 304 | mag/ Magic files derived from GDS |
| 305 | maglef/ Magic files derived from LEF macros |
| 306 | spice/ SPICE netlists (ngspice compatible) |
| 307 | techlef/ LEF technology files |
| 308 | verilog/ verilog modules |
| 309 | |
| 310 | Each subdirectory of libs.ref is further divided into sections based on the |
| 311 | IP type. The section names are largely foundry-dependent. For SkyWater Sky130, |
| 312 | these sections include one or more of: |
| 313 | |
| 314 | sky130_fd_sc_hd/ 1.8V digital logic (high density) |
| 315 | sky130_fd_sc_hdll/ 1.8V digital logic (high density low leakage) |
Tim Edwards | 5e28be3 | 2020-07-08 20:33:53 -0400 | [diff] [blame] | 316 | sky130_fd_sc_hs/ 1.8V digital logic (high speed) |
| 317 | sky130_fd_sc_hvl/ 3.3V digital logic |
| 318 | sky130_fd_sc_lp/ 1.8V digital logic (low power) |
| 319 | sky130_fd_sc_ls/ 1.8V digital logic (low speed) |
| 320 | sky130_fd_sc_ms/ 3.3V digital logic (medium speed) |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 321 | |
| 322 | sky130_fd_io/ Standard I/O |
| 323 | |
Tim Edwards | f8c7eb8 | 2021-02-10 09:07:54 -0500 | [diff] [blame] | 324 | sky130_fd_pr/ Primitive devices w/fixed layout |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 325 | |
Tim Edwards | 1168a8b | 2021-02-10 22:06:54 -0500 | [diff] [blame] | 326 | sky130_ml_xx_hd/ Library of alphanumeric layouts |
| 327 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 328 | The target installation destinations assume the directory structure above. Changing |
| 329 | this requires editing the source files. |
| 330 | |