blob: 0f192f8c4da5a04fd31b13dc81a914b764bbe70e [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 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 Edwards1168a8b2021-02-10 22:06:54 -0500165 --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 Edwards7e0a6442021-02-11 15:37:42 -0500168 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 Edwards1168a8b2021-02-10 22:06:54 -0500172
173 --enable-xschem-sky130[=<path>]
174 The path to the SKY130 setup for the xschem schematic
Tim Edwards7e0a6442021-02-11 15:37:42 -0500175 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 Edwards1168a8b2021-02-10 22:06:54 -0500179
Tim Edwardsba45dee2021-04-28 11:09:39 -0400180 --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 Blanchard2e33ddf2021-12-21 20:37:37 +1100187 --enable-osu-t12-sky130[=<path>]
Tim Edwardsba45dee2021-04-28 11:09:39 -0400188 This 3rd party library is a set of open-source digital
189 standard cells at 12 track pitch height.
190
Anton Blanchard2e33ddf2021-12-21 20:37:37 +1100191 --enable-osu-t15-sky130[=<path>]
Tim Edwardsba45dee2021-04-28 11:09:39 -0400192 This 3rd party library is a set of open-source digital
193 standard cells at 15 track pitch height.
194
Anton Blanchard2e33ddf2021-12-21 20:37:37 +1100195 --enable-osu-t18-sky130[=<path>]
Tim Edwardsba45dee2021-04-28 11:09:39 -0400196 This 3rd party library is a set of open-source digital
197 standard cells at 18 track pitch height.
198
Tim Edwards421daef2021-12-21 11:59:36 -0500199 --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 Edwards60b4f622020-08-02 10:49:17 -0400220Step 2:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400221 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 Edwards1168a8b2021-02-10 22:06:54 -0500229Step 3:
230 Run:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400231
Tim Edwards1168a8b2021-02-10 22:06:54 -0500232 make install
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400233
Tim Edwards1168a8b2021-02-10 22:06:54 -0500234 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 Edwards55f4d0e2020-07-05 15:41:02 -0400245 pointers to absolute paths in the files are changed to match
Tim Edwards1168a8b2021-02-10 22:06:54 -0500246 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 Edwards55f4d0e2020-07-05 15:41:02 -0400250
251-------------------------------------------------------------------------------
Tim Edwards1168a8b2021-02-10 22:06:54 -0500252Summary of the installation directories:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400253
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 Edwards1168a8b2021-02-10 22:06:54 -0500292 openlane/ setup and supplementary files for openlane
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500293 ngspice/ base model files and libraries for ngspice
Tim Edwards1168a8b2021-02-10 22:06:54 -0500294 xschem/ setup files for xschem
295 irsim/ setup and parameter files for IRSIM
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400296
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 Edwards5e28be32020-07-08 20:33:53 -0400316 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 Edwards55f4d0e2020-07-05 15:41:02 -0400321
322 sky130_fd_io/ Standard I/O
323
Tim Edwardsf8c7eb82021-02-10 09:07:54 -0500324 sky130_fd_pr/ Primitive devices w/fixed layout
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400325
Tim Edwards1168a8b2021-02-10 22:06:54 -0500326 sky130_ml_xx_hd/ Library of alphanumeric layouts
327
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400328 The target installation destinations assume the directory structure above. Changing
329 this requires editing the source files.
330