blob: 6c40c670a8321eb3ac3263aeddf53ae2befef42b [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
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 Edwards7e0a6442021-02-11 15:37:42 -0500180 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 Edwards1168a8b2021-02-10 22:06:54 -0500183
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 Edwards7e0a6442021-02-11 15:37:42 -0500193 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 Edwards1168a8b2021-02-10 22:06:54 -0500197
198 --enable-xschem-sky130[=<path>]
199 The path to the SKY130 setup for the xschem schematic
Tim Edwards7e0a6442021-02-11 15:37:42 -0500200 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 Edwards1168a8b2021-02-10 22:06:54 -0500204
Tim Edwardsba45dee2021-04-28 11:09:39 -0400205 --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 Edwards60b4f622020-08-02 10:49:17 -0400228Step 2:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400229 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 Edwards1168a8b2021-02-10 22:06:54 -0500237Step 3:
238 Run:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400239
Tim Edwards1168a8b2021-02-10 22:06:54 -0500240 make install
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400241
Tim Edwards1168a8b2021-02-10 22:06:54 -0500242 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 Edwards55f4d0e2020-07-05 15:41:02 -0400253 pointers to absolute paths in the files are changed to match
Tim Edwards1168a8b2021-02-10 22:06:54 -0500254 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 Edwards55f4d0e2020-07-05 15:41:02 -0400258
259-------------------------------------------------------------------------------
Tim Edwards1168a8b2021-02-10 22:06:54 -0500260Summary of the installation directories:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400261
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 Edwards1168a8b2021-02-10 22:06:54 -0500300 openlane/ setup and supplementary files for openlane
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500301 ngspice/ base model files and libraries for ngspice
Tim Edwards1168a8b2021-02-10 22:06:54 -0500302 xschem/ setup files for xschem
303 irsim/ setup and parameter files for IRSIM
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400304
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 Edwards5e28be32020-07-08 20:33:53 -0400324 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 Edwards55f4d0e2020-07-05 15:41:02 -0400329
330 sky130_fd_io/ Standard I/O
331
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500332 sky130_fd_pr/ Primitive devices w/fixed layout
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400333
Tim Edwards1168a8b2021-02-10 22:06:54 -0500334 sky130_ml_xx_hd/ Library of alphanumeric layouts
335
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400336 The target installation destinations assume the directory structure above. Changing
337 this requires editing the source files.
338