blob: 12952f597ebe4f403b69662810edff7d21feb94c [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-------------------------------------------------------------------------------
10Prerequisites:
11
121. Foundry source files:
13
14 Obtain sources for the SkyWater sky130 130nm process from the git repository at
15 the following location:
16
17 https://github.com/google/skywater-pdk
18
19 This repository may go in any convenient location. The Makefile suggests
20 the target location ~/projects/foundry/skywater-pdk but any location will
Tim Edwards10caea92020-07-06 09:55:46 -040021 do as long as the definition for SKYWATER_PATH in the Makefile is set
Tim Edwards55f4d0e2020-07-05 15:41:02 -040022 appropriately.
23
24 So cd to the target location parent directory (e.g., "cd ~/projects/foundry")
25 and run the following command:
26
27 git clone https://github.com/google/skywater-pdk
28
Tim Edwardsfd5136b2020-07-08 22:57:04 -040029 Note that many of the files in the PDK are too large for a single git
30 repository, and so each IP library in the PDK has been placed in a
31 submodule. There are multiple versions of each library, and it is
32 nearly certain that you will only want to deal with the "latest" version
33 of each. To make sure you have the submodules for the latest version of
34 each supported IP library, do:
35
36 cd skywater-pdk
Tim Edwardsc31a41f2020-11-11 10:40:03 -050037 git submodule init libraries/sky130_fd_io/latest
38 git submodule init libraries/sky130_fd_pr/latest
Tim Edwardsdf0e1de2020-07-11 17:34:56 -040039 git submodule init libraries/sky130_fd_sc_hd/latest
40 git submodule init libraries/sky130_fd_sc_hdll/latest
41 git submodule init libraries/sky130_fd_sc_hs/latest
42 git submodule init libraries/sky130_fd_sc_ms/latest
43 git submodule init libraries/sky130_fd_sc_ls/latest
44 git submodule init libraries/sky130_fd_sc_lp/latest
45 git submodule init libraries/sky130_fd_sc_hvl/latest
Tim Edwardsfd5136b2020-07-08 22:57:04 -040046 git submodule update
47
48 The liberty (.lib) files are the largest of all and so individual files
49 are too large for the git repo and need to be assembled by script. To
50 do that, do:
51
52 make timing
53
54 That installs all of the Google/Skywater files.
55
56 Then follow the instructions below for generating the additional files
57 for supporting the open source EDA tool flows.
Tim Edwards55f4d0e2020-07-05 15:41:02 -040058
592. EDA tools:
60
61 For installing files to use with the Magic layout tool, Magic must be installed.
62 Obtain Magic from:
63
64 https://github.com/RTimothyEdwards/magic
65
66-------------------------------------------------------------------------------
67Installation:
68
69 There are two methods for installation: Local and Distribution. Use Local
70 installation if you are installing on a single host computer. Use Distribution
71 installation if you are installing into a respository (such as git) that will
72 be distributed to multiple hosts.
73
74Step 1:
75
Tim Edwards60b4f622020-08-02 10:49:17 -040076 Run "configure" to set the paths to the Google/SkyWater source
77 repository and to set the path to the install location. Note that
78 the configure script is located in the open_pdks top level directory,
79 not in the foundry subdirctory, and must be run from the top level
80 directory. Configure options are as follows:
81
82 --with-sky130-source=/path/to/sky130/source
83 "location of the source files for sky130"
84 --with-local-path=/path/to/install/pdks
85 "location where the PDKs will be installed"
86
87 NOTE: The intention of the configure file is to not have to hand-edit
88 the Makefile. However, the development of the configure script is
89 currently ongoing and unfinished, so for now the Makefile should be
90 checked and edited after running configure.
91
92Step 2:
93
94 All other steps are run in the sky130/ subdirectory.
95
96 cd to the sky130/ subdirectory and edit the Makefile to set the following
97 definitions for your host system:
Tim Edwards55f4d0e2020-07-05 15:41:02 -040098
99 EF_STYLE = Select "1" for an efabless-style file structure, "0"
Ahmed Ghazy5a195c22020-07-27 15:27:25 +0200100 otherwise. There are some differences in
101 these two styles, the most important of which being
102 that the order of directories for the IP libraries
103 is <file_format>/<library_name> instead of
104 <library_name>/<file_format>. Other differences
105 include version tracking of the Magic setup files
106 and the location of the technology LEF file.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400107
108 LINK_TARGETS = "none" or "source". "none" copies files from the source
109 directories to the target. "source" makes symbolic links
110 to the source directories. Use "source" only if doing
111 a local install, and the source foundry data will not
112 be deleted. For distribution installations, LINK_TARGETS
113 must be set to "none".
114
115 LOCAL_PATH = The path to the target install directory. This is used
116 in both the local and distribution installations. For
117 a distribution installation, this is the local name of
118 the path to the PDK after it has been distributed to
Tim Edwards60b4f622020-08-02 10:49:17 -0400119 the host computers (This should have been set by the
120 option --with-local-path= passed to configure).
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400121
122 DIST_PATH = The path to the location of the installed files prior to
123 distribution. This will most likely be a git or similar
124 repo.
125
Tim Edwards60b4f622020-08-02 10:49:17 -0400126Step 3:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400127 Run:
128
129 make
130
131 This will pre-process the setup files to create the PDK-specific files
132 for the SKY130A PDK, and process all vendor files, and place everything
133 in a local staging area.
134
Tim Edwards60b4f622020-08-02 10:49:17 -0400135Step 4:
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400136 For a local install, do:
137
138 make install-local
139
140 This copies all files from the staging area into the destination
141 as specified by the variable LOCAL_PATH in the Makefile. All
142 pointers to absolute paths in the files are changed to match
143 LOCAL_PATH.
144
145 For a distribution install, do:
146
147 make install-dist
148
149 This copies all files from the staging area into the destination
150 as specified by the variable DIST_PATH in the Makefile. All
151 pointers to absolute paths in the files are changed to match
152 LOCAL_PATH. The assumption is that DIST_PATH is a repository
153 (such as a git repo) that is cloned to multiple hosts, and
154 the destination on the hosts where it is distributed is
155 LOCAL_PATH.
156
157-------------------------------------------------------------------------------
158Summary:
159
160 The Makefile script takes the source files and generates files for local
161 PDK names "SKY130A", "SKY130B", etc. (Note there is currently only one
162 PDK variant "A".)
163
164 The definition of each PDK is made in the Makefile using defines; e.g.,
165 -DMETAL5, etc.
166
167 The make script makes use of the python script "preproc.py" (in the ../common
168 directory) to parse each source file for "#ifdef ..."-type macros. The syntax
169 is similar to that used by the C preprocessor (cpp) but does not assume C
170 language syntax in the input file, so is generally better to use than cpp
171 (has less unexpected/unintentional behavior). See comments in the preproc.py
172 script for a full list of macros that it accepts (short list: #ifdef, #ifndef,
173 #define, #include, and boolean operators ||, &&, and !).
174
175 Files generated:
176 .tech techfile for magic (full DRC, extract, GDS)
177 -GDS.tech techfile for magic, vendor mask layers
178 .tcl PDK script for magic
179 -BindKeys key binding script for magic partly matching Cadence defaults
180 .magicrc magic startup script (copy to local directory as .magicrc)
181 _setup.tcl netgen setup script for LVS
182 .sh qflow master setup script, standard 1.8V digital
183 .par graywolf setup file, standard 1.8V digital
184
185 The installation directory below LOCAL_PATH is the name of the PDK; e.g.,
186
187 sky130A/ 5-metal stack with MiM cap and redistribution layer
188
189 The installation directory hierarchy below the PDK name looks like the following:
190
191 libs.tech/ technology and setup files
192
193 magic/ magic techfiles, startup file, PDK script,
194 and key binding script.
195 netgen/ netgen setup file
196 qflow/ qflow scripts and graywolf setup files.
197 klayout/ setup files for klayout
198 openlane/ setup files for openlane
199
200 libs.ref/ foundry data
201
202 cdl/ CDL netlists
203 doc/ Foundry documentation
204 gds/ GDS files
205 lef/ LEF macro files
206 lib/ Timing files
207 mag/ Magic files derived from GDS
208 maglef/ Magic files derived from LEF macros
209 spice/ SPICE netlists (ngspice compatible)
210 techlef/ LEF technology files
211 verilog/ verilog modules
212
213 Each subdirectory of libs.ref is further divided into sections based on the
214 IP type. The section names are largely foundry-dependent. For SkyWater Sky130,
215 these sections include one or more of:
216
217 sky130_fd_sc_hd/ 1.8V digital logic (high density)
218 sky130_fd_sc_hdll/ 1.8V digital logic (high density low leakage)
Tim Edwards5e28be32020-07-08 20:33:53 -0400219 sky130_fd_sc_hs/ 1.8V digital logic (high speed)
220 sky130_fd_sc_hvl/ 3.3V digital logic
221 sky130_fd_sc_lp/ 1.8V digital logic (low power)
222 sky130_fd_sc_ls/ 1.8V digital logic (low speed)
223 sky130_fd_sc_ms/ 3.3V digital logic (medium speed)
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400224
225 sky130_fd_io/ Standard I/O
226
227 sky130_fd_pr_base/ Primitive devices w/fixed layout
228 sky130_fd_pr_rf/ RF primitive devices w/fixed layout
229 sky130_fd_pr_rf2/ Additional RF primitive devices w/fixed layout
230
231 The target installation destinations assume the directory structure above. Changing
232 this requires editing the source files.
233