blob: 74b20bee84ca6d41cbc78b854e69c27cbf2c7413 [file] [log] [blame]
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001------------------------------------
2open_pdks
3----------------------------------------
4Master PDK generator for SkyWater Sky130
5Hybrid 180nm / 130nm foundry process
6for open source EDA tools
7----------------------------------------
8
9-------------------------------------------------------------------------------
Tim Edwards1168a8b2021-02-10 22:06:54 -050010Quick summary (TL;DR):
11
Tim Edwards1f331292021-02-11 12:37:37 -050012 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 Edwards1168a8b2021-02-10 22:06:54 -050020
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 Edwards7e0a6442021-02-11 15:37:42 -050030 ./configure --enable-sky130-pdk
Tim Edwards1168a8b2021-02-10 22:06:54 -050031 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 Edwards7e0a6442021-02-11 15:37:42 -050036 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 Edwards1168a8b2021-02-10 22:06:54 -050039
Tim Edwards1f331292021-02-11 12:37:37 -050040 With he above configuration line, the PDK files will be installed into
41 the path
42 /usr/share/pdks/sky130A/
43
Tim Edwards1168a8b2021-02-10 22:06:54 -050044-------------------------------------------------------------------------------
45Detailed instructions for the patient reader:
46-------------------------------------------------------------------------------
Tim Edwards55f4d0e2020-07-05 15:41:02 -040047Prerequisites:
48
Tim Edwards1168a8b2021-02-10 22:06:54 -0500491. EDA tools:
Tim Edwards55f4d0e2020-07-05 15:41:02 -040050
Tim Edwards1168a8b2021-02-10 22:06:54 -050051 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
592. 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 Edwards55f4d0e2020-07-05 15:41:02 -040074
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 Edwards1168a8b2021-02-10 22:06:54 -050079 do as long as the --enable-sky130-pdk= configuration option value is set
Tim Edwards55f4d0e2020-07-05 15:41:02 -040080 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 Edwardsfd5136b2020-07-08 22:57:04 -040087 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 Edwardsc31a41f2020-11-11 10:40:03 -050095 git submodule init libraries/sky130_fd_io/latest
96 git submodule init libraries/sky130_fd_pr/latest
Tim Edwardsdf0e1de2020-07-11 17:34:56 -040097 git submodule init libraries/sky130_fd_sc_hd/latest
Tim Edwardsdf0e1de2020-07-11 17:34:56 -040098 git submodule init libraries/sky130_fd_sc_hvl/latest
Tim Edwardsba45dee2021-04-28 11:09:39 -040099 [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 Edwardsfd5136b2020-07-08 22:57:04 -0400104 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 Edwardsba45dee2021-04-28 11:09:39 -0400112 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 Edwardsfd5136b2020-07-08 22:57:04 -0400118
119 Then follow the instructions below for generating the additional files
120 for supporting the open source EDA tool flows.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400121
Tim Edwards1168a8b2021-02-10 22:06:54 -0500122PDK Installation:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400123
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
129Step 1:
130
Tim Edwards60b4f622020-08-02 10:49:17 -0400131 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 Edwards1168a8b2021-02-10 22:06:54 -0500135 directory. The mandatory configure options are as follows:
Tim Edwards60b4f622020-08-02 10:49:17 -0400136
Tim Edwards1168a8b2021-02-10 22:06:54 -0500137 --enable-sky130-pdk[=/path/to/sky130/pdk/source]
Tim Edwards1168a8b2021-02-10 22:06:54 -0500138
139 See below for details.
Tim Edwards60b4f622020-08-02 10:49:17 -0400140
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 Edwards1168a8b2021-02-10 22:06:54 -0500146 --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
Tim Edwards1168a8b2021-02-10 22:06:54 -0500174 --enable-alpha-sky130[=<path>]
175 The path to the sky130_ml_xx_hd library, a third-party
176 library containing layouts of alphanumeric characters
Tim Edwards7e0a6442021-02-11 15:37:42 -0500177 for adding text to layout. If the configuration option
178 or the path is not specified, then the library will be
179 downloaded from github automatically. To disable this
180 package, use "--disable-alpha-sky130".
Tim Edwards1168a8b2021-02-10 22:06:54 -0500181
182 --enable-xschem-sky130[=<path>]
183 The path to the SKY130 setup for the xschem schematic
Tim Edwards7e0a6442021-02-11 15:37:42 -0500184 entry/schematic capture tool. If the configuration
185 option or the path is not specified, then the library
186 will be downloaded from github automatically. To disable
187 this package, use "--disable-xschem-sky130".
Tim Edwards1168a8b2021-02-10 22:06:54 -0500188
Tim Edwardsba45dee2021-04-28 11:09:39 -0400189 --enable-sram-sky130[=<path>]
190 This 3rd party library contains pre-compiled and verified
191 memory blocks from the OpenRAM open source memory compiler.
192 It is disabled by default due to the length of time
193 required to install, but it is recommended if you will be
194 using SRAM in a design.
195
Anton Blanchard2e33ddf2021-12-21 20:37:37 +1100196 --enable-osu-t12-sky130[=<path>]
Tim Edwardsba45dee2021-04-28 11:09:39 -0400197 This 3rd party library is a set of open-source digital
198 standard cells at 12 track pitch height.
199
Anton Blanchard2e33ddf2021-12-21 20:37:37 +1100200 --enable-osu-t15-sky130[=<path>]
Tim Edwardsba45dee2021-04-28 11:09:39 -0400201 This 3rd party library is a set of open-source digital
202 standard cells at 15 track pitch height.
203
Anton Blanchard2e33ddf2021-12-21 20:37:37 +1100204 --enable-osu-t18-sky130[=<path>]
Tim Edwardsba45dee2021-04-28 11:09:39 -0400205 This 3rd party library is a set of open-source digital
206 standard cells at 18 track pitch height.
207
Tim Edwards60b4f622020-08-02 10:49:17 -0400208Step 2:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400209 Run:
210
211 make
212
213 This will pre-process the setup files to create the PDK-specific files
214 for the SKY130A PDK, and process all vendor files, and place everything
215 in a local staging area.
216
Tim Edwards1168a8b2021-02-10 22:06:54 -0500217Step 3:
218 Run:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400219
Tim Edwards1168a8b2021-02-10 22:06:54 -0500220 make install
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400221
Tim Edwards1168a8b2021-02-10 22:06:54 -0500222 The behavior of installation depends on whether or not
223 --with-<pdk>-dist-path=<path> has been set (e.g.,
224 --with-sky130-dist-path). If only the local path
225 (--with-<pdk>-local-path=<path>) has been set, then "make
226 install" copies all files from the staging area into the
227 destination. All pointers to absolute paths in the files
228 are changed to match the local path.
229
230 If --with-<pdk>-dist-path=<path> has been set, then "make
231 install" copies all files from the staging area into the
232 destination as specified by the value of <path>. All
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400233 pointers to absolute paths in the files are changed to match
Tim Edwards1168a8b2021-02-10 22:06:54 -0500234 the local path value. The assumption is that the distribution
235 path is a repository (such as a git repo) that is cloned to
236 multiple hosts, and the destination on the hosts where it is
237 distributed is the local path.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400238
239-------------------------------------------------------------------------------
Tim Edwards1168a8b2021-02-10 22:06:54 -0500240Summary of the installation directories:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400241
242 The Makefile script takes the source files and generates files for local
243 PDK names "SKY130A", "SKY130B", etc. (Note there is currently only one
244 PDK variant "A".)
245
246 The definition of each PDK is made in the Makefile using defines; e.g.,
247 -DMETAL5, etc.
248
249 The make script makes use of the python script "preproc.py" (in the ../common
250 directory) to parse each source file for "#ifdef ..."-type macros. The syntax
251 is similar to that used by the C preprocessor (cpp) but does not assume C
252 language syntax in the input file, so is generally better to use than cpp
253 (has less unexpected/unintentional behavior). See comments in the preproc.py
254 script for a full list of macros that it accepts (short list: #ifdef, #ifndef,
255 #define, #include, and boolean operators ||, &&, and !).
256
257 Files generated:
258 .tech techfile for magic (full DRC, extract, GDS)
259 -GDS.tech techfile for magic, vendor mask layers
260 .tcl PDK script for magic
261 -BindKeys key binding script for magic partly matching Cadence defaults
262 .magicrc magic startup script (copy to local directory as .magicrc)
263 _setup.tcl netgen setup script for LVS
264 .sh qflow master setup script, standard 1.8V digital
265 .par graywolf setup file, standard 1.8V digital
266
267 The installation directory below LOCAL_PATH is the name of the PDK; e.g.,
268
269 sky130A/ 5-metal stack with MiM cap and redistribution layer
270
271 The installation directory hierarchy below the PDK name looks like the following:
272
273 libs.tech/ technology and setup files
274
275 magic/ magic techfiles, startup file, PDK script,
276 and key binding script.
277 netgen/ netgen setup file
278 qflow/ qflow scripts and graywolf setup files.
279 klayout/ setup files for klayout
Tim Edwards1168a8b2021-02-10 22:06:54 -0500280 openlane/ setup and supplementary files for openlane
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500281 ngspice/ base model files and libraries for ngspice
Tim Edwards1168a8b2021-02-10 22:06:54 -0500282 xschem/ setup files for xschem
283 irsim/ setup and parameter files for IRSIM
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400284
285 libs.ref/ foundry data
286
287 cdl/ CDL netlists
288 doc/ Foundry documentation
289 gds/ GDS files
290 lef/ LEF macro files
291 lib/ Timing files
292 mag/ Magic files derived from GDS
293 maglef/ Magic files derived from LEF macros
294 spice/ SPICE netlists (ngspice compatible)
295 techlef/ LEF technology files
296 verilog/ verilog modules
297
298 Each subdirectory of libs.ref is further divided into sections based on the
299 IP type. The section names are largely foundry-dependent. For SkyWater Sky130,
300 these sections include one or more of:
301
302 sky130_fd_sc_hd/ 1.8V digital logic (high density)
303 sky130_fd_sc_hdll/ 1.8V digital logic (high density low leakage)
Tim Edwards5e28be32020-07-08 20:33:53 -0400304 sky130_fd_sc_hs/ 1.8V digital logic (high speed)
305 sky130_fd_sc_hvl/ 3.3V digital logic
306 sky130_fd_sc_lp/ 1.8V digital logic (low power)
307 sky130_fd_sc_ls/ 1.8V digital logic (low speed)
308 sky130_fd_sc_ms/ 3.3V digital logic (medium speed)
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400309
310 sky130_fd_io/ Standard I/O
311
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500312 sky130_fd_pr/ Primitive devices w/fixed layout
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400313
Tim Edwards1168a8b2021-02-10 22:06:54 -0500314 sky130_ml_xx_hd/ Library of alphanumeric layouts
315
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400316 The target installation destinations assume the directory structure above. Changing
317 this requires editing the source files.
318