blob: 8683406fc249adcad485578af53ad7e8fb7e9127 [file] [log] [blame]
Tim Edwards55f4d0e2020-07-05 15:41:02 -04001open_pdks : A system for installing silicon foundry PDKs for open-source EDA tools
2(also maybe works for installing commercial tools)
3
4----------------------------------------------------------------------------------
5
Tim Edwards1168a8b2021-02-10 22:06:54 -05006Written by Tim Edwards 2019 - 2021 for efabless (efabless.com)
Tim Edwards55f4d0e2020-07-05 15:41:02 -04007and Open Circuit Design (opencircuitdesign.com)
8
Tim Edwards2a700da2020-07-08 21:35:56 -04009URL: http://opencircuitdesign.com/open_pdks
Tim Edwards1168a8b2021-02-10 22:06:54 -050010Mirror URL: https://github.com/RTimothyEdwards/open_pdks
Tim Edwards2a700da2020-07-08 21:35:56 -040011
12Distributed under the Apache-2.0 license (see file LICENSE).
13
Tim Edwards55f4d0e2020-07-05 15:41:02 -040014----------------------------------------------------------------------------------
15
Tim Edwards1168a8b2021-02-10 22:06:54 -050016Quick Install:
17
18 Looking to install the Google/SkyWater SKY130 PDK libraries and setup
19 files for open source EDA tools? Read the README file in the sky130/
20 directory.
21
22 The rest of this README file is general information about open_pdks
23 and is not specific to any single PDK.
24
25----------------------------------------------------------------------------------
26
Tim Edwards55f4d0e2020-07-05 15:41:02 -040027Introduction:
28
29 Silicon foundry PDKs are notoriously non-standard, and files obtained
30 from the foundry may end up in any possibly configuration of files and
31 folders. In addition, silicon foundries are notorious among open source
32 EDA tool enthusiasts for supplying user setups for commercial EDA tools
33 and all but ignoring open source EDA tools. Open_pdks aims to mitigate
34 the problem by defining a standard layout of files and directories for
35 known open standard formats (e.g., SPICE, verilog, liberty, LEF, etc.)
36 and for various open source EDA tools (e.g., magic, netgen, OpenROAD,
37 klayout) using a Makefile system and a number of conversion scripts to
38 ensure that for any process, all files needed by all EDA tools can be
39 found in predictable locations.
40
41 The scripts aim to be as general-purpose as possible to allow easy
42 adaptation to new tools, formats, and foundries. Where foundry data
43 is intractably unusable, custom install files can be added to overwrite
44 or annotate vendor data as needed.
45
46 Each foundry process is a subdirectory of the open_pdks top level and
47 has its own Makefile. The typical install process is to cd to the
48 foundry top level and run "make" (see below for details).
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -070049
Tim Edwards55f4d0e2020-07-05 15:41:02 -040050 The general file structure created by open_pdks is as follows:
51
52 <foundry_root>/
53 <name_of_pdk_variant_1>/
54 <name_of_pdk_variant_2>/
55 ...
56 <name_of_pdk_variant_x>/
57 libs.tech/
58 <name_of_EDA_tool_1>/
59 <name_of_EDA_tool_2>/
60 ...
61 <name_of_EDA_tool_x>/
62 <EDA_tool_setup_files>
63 libs.ref
64 <name_of_IP_library_1>/
65 <name_of_IP_library_2>/
66 ...
67 <name_of_IP_library_x>/
68 <name_of_file_format_1>
69 <name_of_file_format_2>
70 ...
71 <name_of_file_format_x>
72 <vendor_files>
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -070073
Tim Edwards55f4d0e2020-07-05 15:41:02 -040074 Note that this format is very general and does not constrain the
75 EDA tools supported or file formats supported, so long as there
76 are scripts in the system to provide that support. It is intended
77 that open_pdks can be extended as needed to support new tools or
78 new file formats.
79
80 Current EDA tools supported in this version of open_pdks:
81 Tool Directory name
82 --------------------------
83 ngspice ngspice
84 magic magic
85 netgen netgen
86 klayout klayout
87 qflow qflow
88 openlane openlane
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -070089
Tim Edwards55f4d0e2020-07-05 15:41:02 -040090 Current IP library file formats supported in this version of open_pdks*:
91 Format Directory name
92 --------------------------
93 CDL cdl
94 SPICE spice
95 magic mag, maglef
96 LEF lef, techlef
97 GDS gds
98 verilog verilog
99 liberty lib
100 PDF** doc
101
102 (* "Supported" meaning expected/handled by conversion scripts;
103 as noted, the install is very general purpose and any name
104 can be used as a target for any vendor or custom files.)
105 (** or HTML or any valid document format, plus supporting files.)
106
107How to use open_pdks:
108
109 There are a seriously limited number of open foundry PDKs. Those that
110 are known (SkyWater, MOSIS SCMOS) are included in the repository. In
111 other cases (X-Fab XH035, XH018) it is possible to get an extension to
112 open_pdks from a known trusted source through NDA verification with
113 the foundry. In all other cases, foundries should be berated until
114 they agree to support the open_pdks format.
115
116 Open_pdks does not attempt to keep any foundry data to the extent
117 possible. Instead, it adapts to the file structure available from
118 whatever system each foundry uses for downloads. Each foundry
119 directory should contain a README file that details how to obtain
120 downloads from the foundry, and what files need to be downloaded.
121 Since the download methods vary wildly, it is up to the user to obtain
122 the foundry data as instructed. The Makefile in the open_pdks foundry
123 directory then needs to be edited to set the correct path to the
124 foundry source data.
125
126 The installation is a bootstrapping process, so needs to be done in
127 stages. The first stage installs setup files for all the EDA tools.
128 The second stage installs IP libraries (e.g., standard cells, padframe
129 I/O, analog circuits) and depends heavily on the use of the open EDA
130 tools themselves to fill in any missing file formats. Therefore the
131 tool setup files need to be installed first, and then the IP libraries.
132 If using a distributed install (see below), then the tool setup files
133 need to be installed and distributed (relocated to the final run-time
134 location) before the IP libraries are installed.
135
Tim 'mithro' Ansell0989d5d2021-06-13 11:59:46 -0700136 Users installing on the same host they are running on will want to
137 use the typical flow of;
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400138
Tim 'mithro' Ansell0989d5d2021-06-13 11:59:46 -0700139 ./configure See options for setting paths
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400140 make Generate local staging area
Tim 'mithro' Ansell0989d5d2021-06-13 11:59:46 -0700141 sudo make install Install onto local system
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400142
Tim 'mithro' Ansell0989d5d2021-06-13 11:59:46 -0700143 Which will install to /usr/local/share/pdks directory.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400144
Tim 'mithro' Ansell0989d5d2021-06-13 11:59:46 -0700145 Users can also elect to install somewhere by giving ./configure the
146 `--prefix` and other similar standard ./configure options.
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400147
Tim 'mithro' Ansell0989d5d2021-06-13 11:59:46 -0700148 For example;
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400149
Tim 'mithro' Ansell0989d5d2021-06-13 11:59:46 -0700150 Installing to /usr/share/pdks;
151
152 ./configure --prefix=/usr
153 make
154 sudo make install
155
156 Installing to /opt/share/pdks;
157
158 ./configure --prefix=/opt
159 make
160 sudo make install
161
162 Installing to ~/pdks;
163
164 ./configure --prefix=$HOME --datarootdir=$HOME
165 make
166 make install
167
168 Packagers and administrators that want to create a directory which
169 is destined to be installed on other machines should set`--prefix`
170 to be the final install location and use `DESTDIR` with
171 `make install` to the directory where the files should be staged,
172 see the following example;
173
174 ./configure --prefix=/usr
175 make
176 # Need to use sudo so the file end up with the right
177 # permissions.
178 sudo make DESTDIR=/tmp/package
179 (cd /tmp/package; tar -cvf ../dist.tar)
180
181 Then on the final install machine you would want to do;
182 (sudo cd /usr; tar -xvf dist.tar)
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400183
184Prerequisites:
185
186 The following tools/software stacks are needed to run open_pdks:
187
188 python3
189
190 magic opencircuitdesign.com/magic or github.com/RTimothyEdwards
191
192 assumed to be installed and discoverable in the standard
193 search path as defined by the shell (version 8.2+ required)
194
195How to make or update an open PDK:
196
197 The backbone of the open_pdks system is a set of scripts found in the
198 common/ subdirectory. The two main scripts are "preproc.py" and
199 "foundry_install.py", with a host of supporting scripts.
200
201 Creating a new PDK starts with generating a Makefile, which can be
202 done by copying a Makefile from an existing project. The first thing
203 to do is to define the number of PDK variants (usually based on back-end
204 metal stacks available, but can also include front-end options, especially
205 if they are mutually exclusive rather than simply additional masks).
206 Then create the make and make-install targets for local and distributed
207 install, including install (plain), install-vendor, and install-custom.
208 Define the default source and target paths.
209
210 (Needed: A "make makefile" script that generates the "local" and "dist"
211 automatically, and potentially can also make all the different PDK
212 targets automatically, from a much shorter and simpler master Makefile.)
213
214 Create the basic scripts for tools. Since foundries do not support open
215 EDA tools, it is inevitable that these files need to be created by hand
216 unless there is an option to import other formats. Because Magic is used
217 heavily by open_pdks to create missing file formats from other existing
218 file formats, a Magic techfile is critical. Each of the basic scripts
219 will contain #ifdef ... #endif and similar conditionals to allow the
220 script to be parsed for each target PDK variant. Each of these scripts
221 is passed through common/preproc.py to handle the conditionals. Of course,
222 it is possible to make a separate file for each PDK variant as long as the
223 Makefile handles them properly, but use of the preproc.py script allows
224 all the PDK variants to be handled in the same way, simplifying the Makefile.
225
226 --------------------------------------------------------------------------
227 preproc.py Usage:
228
229 preproc.py input_file [output_file] [-D<variable> ...]
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700230
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400231 Where <variable> may be a keyword or a key=value pair
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700232
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400233 Syntax: Basically like cpp. However, this preprocessor handles
234 only a limited set of keywords, so it does not otherwise mangle
235 the file in the belief that it must be C code. Handling of boolean
236 relations is important, so these are thoroughly defined (see below)
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700237
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400238 #if defined(<variable>) [...]
239 #ifdef <variable>
240 #ifndef <variable>
241 #elseif <variable>
242 #else
243 #endif
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700244
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400245 #define <variable> [...]
246 #undef <variable>
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700247
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400248 #include <filename>
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700249
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400250 <variable> may be
251 <keyword>
252 <keyword>=<value>
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700253
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400254 <keyword> without '=' is effectively the same as <keyword>=1
255 Lack of a keyword is equivalent to <keyword>=0, in a conditional.
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700256
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400257 Boolean operators (in order of precedence):
258 ! NOT
259 && AND
260 || OR
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700261
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400262 Comments:
263 Most comments (C-like or Tcl-like) are output as-is. A
264 line beginning with "###" is treated as a preprocessor
265 comment and is not copied to the output.
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700266
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400267 Examples;
268 #if defined(X) || defined(Y)
269 #else
270 #if defined(Z)
271 #endif
272
273 --------------------------------------------------------------------------
274
275 The script common/foundry_install.py handles all the IP library processing
276 and installation. It generates the local directory structure and populates
277 the directories with foundry vendor data, and filters or otherwise uses
278 open EDA tools to generate missing standard file formats or create file
279 formats needed by the open EDA tools.
280
281 foundry_install.py Usage:
282
283 foundry_install.py [option [option_arguments]] ...
284
285 All options begin with "-" and may be followed by one or more
286 arguments (that do not begin with "-"). The foundry_install.py
287 script may be called multiple times, although it is best to
288 group together all files for the installation of an IP library,
289 since the options given will be used to determine what files are
290 missing and need to be generated.
291
292 Global options:
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700293 -link_from <type>
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400294 Make symbolic links to vendor files from target
295 Types are: "none", "source", or a PDK name.
296 Default "none" (copy all files from source)
297 -source <path>
298 Path to source data top level directory
299 -target <path>
300 Path to target top level directory
301 -local <path>
302 For distributed installs, this is the local
303 path to target top level directory.
304
305 -library <type> <name>
306 The install target is an IP library with
307 name <name>.
308 -ef_format
309 Use the original efabless format for file
310 installs. This has several differences from
311 then no-efabless install. The most important
312 is that the order of directories for IP libraries
313 is <file_format>/<library_name> instead of
314 <library_name>/<file_format>. As the efabless
315 platform migrates to the open_pdks developing
316 standard, this use should eventually be
317 deprecated. In open_pdks, the option is set
318 from the EF_FORMAT variable setting in the Makefile.
319
320 All other options represent installation into specific directories.
321 The primary rule is that if foundry_install.py is passed an option
322 "-library" (see syntax below), then all other non-global options
323 represent subdirectories of the IP library, given the same name as
324 the option word following the "-". If the foundry_install.py command
325 line does not have an option "-library", then all non-global options
326 represent per-EDA tool subdirectories, where the name of the subdirectory
327 is the same as the option word following the "-".
328
329 Each tool install option has the syntax:
330
331 -<tool_name> <path> [<option_arguments>]
332
333 Each IP library install option has the syntax:
334
335 -<file_format_name> <path> [<option_arguments>]
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700336
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400337 The <path> is a directory path that is relative to the path prefix
338 given by the -source option. The path may be wildcarded with the
339 escape string "%l", which is replaced by the name of the library,
340 and for simplicity with versioning, "%v" will be interpreted to
341 match any versioning string in the form "major[.minor[.rev]]".
342 Note that only the numerical part of a versioning string is
343 represented, so, for example, to match "/V1.1.0/" the <path> should
344 use "/V%v/". In the unlikely event of a percent character in the
345 path, use the escape string "%%".
346
347 "*" has the usual meaning of matching any characters in a name (see
348 python glob.glob() command for reference). However, for backwards
349 compatibility with earlier versions of open_pdks, the library name
350 in the path may also be wildcarded with "*" in the specific text
351 "/*/".
352
353 Library name wildcarding in either form is only valid if "-library"
354 is given as an an option.
355
356 (Note that the INSTALL variable in the Makefile starts with "set -f"
357 to suppress the OS from doing wildcard substitution; otherwise the
358 wildcards in the install options will get expanded by the OS before
359 being passed to the install script.)
360
361 Library option:
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700362
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400363 -library <type> <name> [<target>]
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700364
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400365 <type> may be one of the following:
366
367 digital Digital standard cells
368 primitive Primitive devices
369 general All others
370
371 Analog and I/O libraries fall under the category "general".
372
373 <name> is the vendor name of the library.
374
375 [<target>] is the (optional) local name of the library. If omitted,
376 then the vendor name is used for the target (there is no particular
377 reason to specify a different local name for a library).
378
379 Any number of libraries may be supported, and one "-library" option
380 may be provided for each supported library. The use of multiple
381 libraries for a single run of foundry_install.py only works if the
382 formats (gds, cdl, lef, etc.) happen to all work with the same wildcards.
383 But it is generally most common to declare only one library name per
384 call to foundry_install.py.
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700385
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400386 Common foundry_install.py options when used with "-library":
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700387
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400388 -techlef <path> [option_arguments] Technology LEF file
389 -doc <path> [option_arguments] library documentation
390 -lef <path> [option_arguments] LEF file
391 -spice <path> [option_arguments] SPICE netlists
392 -cdl <path> [option_arguments] CDL netlists
393 -lib <path> [option_arguments] Liberty timing files
394 -gds <path> [option_arguments] GDS layout data
395 -verilog <path> [option_arguments] Verilog models
396
397 Any name can be used after the "-" and the installation of files
398 will be made into a directory of that name, which will be created
399 if it does not exist. The names used above are preferred, for
400 the sake of compatibility between EDA tools.
401
402 Of special note is "techlef", as technology LEF files are often
403 associated with a PDK and not an IP library. In this system,
404 the technology LEF file should be associated with each standard
405 cell library for which it is intended.
406
407 [option_arguments] may be one of the following:
408
Tim Edwards995c1332020-09-25 15:33:58 -0400409 up=<number>
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400410 Any tool option can use this argument to indicate that
411 the source hierarchy should be copied entirely, starting
412 from <number> levels above the files indicated by <path>.
413 For example, if liberty files are kept in multiple
414 directories according to voltage level, then
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700415
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400416 -liberty x/y/z/PVT_*/*.lib
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700417
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400418 would install all .lib files directly into
419 libs.ref/<libname>/liberty/*.lib while
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700420
Tim Edwards995c1332020-09-25 15:33:58 -0400421 -liberty x/y/z/PVT_*/*.lib up=1
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700422
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400423 would install all .lib files into
424 libs.ref/liberty/<libname>/PVT_*/*.lib.
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700425
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400426 nospec
427 Remove timing specification before installing (used with
428 verilog files only; could be extended to liberty files).
429
430 compile
431 Create a single library from all components. Used when a
432 foundry library has inconveniently split an IP library
433 (LEF, CDL, verilog, etc.) into individual files.
434
435 compile-only
436 Same as argument "compile", except that the individual
437 files are not copied to the target; only the compiled
438 library is created.
439
440 stub
441 Remove contents of subcircuits from CDL and SPICE netlist,
442 or verilog files. This is useful to LVS and other tools
443 to know the order of pins in a circuit (for CDL or SPICE),
444 or simply to ignore the contents of the file (any format)
445 so that the circuit in question is treated as a "black box".
446
447 priv
448 Mark the contents being installed as privleged, and put
449 them in a separate root directory libs.priv where they
450 can be given additional read/write restrictions.
451
Tim Edwards995c1332020-09-25 15:33:58 -0400452 rename=<file_name>
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400453 Rename the file being copied to the name of the argument.
454 This can be used to copy one file into multiple destination
455 libraries and give each copy a name related to the
456 destination library.
457
Tim Edwards995c1332020-09-25 15:33:58 -0400458 filter=<script_file_path>
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400459 Process all files through the script <script_file_path>,
460 which is given as a relative path to the directory
461 containing the Makefile. The filter script traditionally
462 is put in local subdirectory custom/scripts/. The filter
463 script should be written to take a single argument, which
464 is the path to a file, and process that file, and overwrite
465 the file with the result. Commonly used filters are found
466 in the common/ directory. See common/fixspice.py for an
467 example.
468
Tim Edwards995c1332020-09-25 15:33:58 -0400469 sort=<script_file_path>
470 Generate a list of all files to combine in a library,
471 called "filelist.txt", then call the script. The
472 script should read the "filelist.txt" file and sort
473 the files according to the order in which they should
474 appear in the library.
475
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400476 noclobber
477 Mainly diagnostic. When specified, any temporary files
478 used during installation will be retained instead of
479 deleted after use. This includes, for example, scripts
480 passed to magic for running extraction or file format
481 generation. It is useful when debugging problems with
482 the install.
483
484 anno
485 Currently only supported for LEF files. This argument
486 indicates that the vendor LEF files should be used only
487 for annotating GDS input with port location information,
488 but the LEF files themselves should not be installed.
489
490 File conversions handled by foundry_install.py:
491
492 The following file format conversions can be done automatically by
493 foundry_install.py:
494
495 CDL to SPICE: A CDL netlist or library can be converted to a
496 general-purpose SPICE netlist that can be read
497 by any tool that can read Berkeley SPICE 3f5
498 syntax.
499
500 GDS to LEF: An abstract view can be generated from a full
501 layout view using Magic.
502
503 GDS to SPICE: In the absence of any netlist, Magic will
504 extract a SPICE netlist from a full layout.
505
506 SPICE (any) to SPICE (ngspice): The fixspice.py script will
507 attempt to convert any SPICE model file,
508 cell library, or netlist to a form that is
509 compatible with ngspice version 30.
510
511 open_pdks additional Makefile notes:
512
513 The "make install-local" ("make install-dist") step is generally
514 broken into individual make sections, one for each tool (e.g.,
515 magic, netgen, klayout). There is an additional section called
516 "general" which installs a ".config" directory at the PDK top
517 level, containing a file "nodeinfo.json" which has general
518 information about the PDK that may be used by any tool that
519 understands the key:value pairs used in the JSON file. Keys used
520 are as follows:
521
522 foundry : Short name of the foundry, equal to the foundry
523 directory root, above the PDK variants.
524 foundry-name : Long name of the foundry.
525 node : The name of the PDK variant
526 feature-size : The foundry process feature size (e.g., 130nm)
527 status : "active" or "inactive". May be used by tools
528 to present or hide specific PDK variants.
529 description : Long text description of the process variant
530 (e.g., 6-metal stack + MiM caps)
531 options : List of options, corresponding to the definitions
532 used in the Makefile and passed to preproc.py.
533 stdcells : List of standard cell libraries available for this
534 PDK variant.
535 iocells : List of I/O pad cell libraries available for this
536 PDK variant.
537
538 Note that the JSON file is, like other EDA tool setup files, usually a
539 master file that is parsed by preproc.py; therefore when specifying
540 "options", use #undef before specifying each option name so that the
541 option name itself is ignored by the pre-processor.
Tim 'mithro' Ansellb963bef2021-06-13 11:31:38 -0700542
Tim Edwards55f4d0e2020-07-05 15:41:02 -0400543
544Goals of the open_pdks project:
545
546 The intended goal of open_pdks is to be able to support as many open source
547 EDA tools as practical, and to be able to generate all needed files for
548 those tools from any sufficiently complete set of vendor files.
549
550 A number of file converions are not available but would be useful to have:
551
552 SPICE to liberty: Create timing files by running simulations
553 on SPICE netlists using ngspice.
554
555 liberty to verilog: Use the function statements in liberty
556 format to create verilog primitives. Maybe
557 use liberty timing information to generate
558 LEF specify sections.
559
560 verilog to liberty: Reverse of the above. Use verilog logic
561 tables and specify sections to generate liberty
562 functions and timing tables.
563
564 File formats that need to be supported:
565
566 Schematic and symbol: There are few standards, so either everyone
567 needs to agree on a good format to use, or there
568 needs to be a lot of scripts to do conversions
569 between formats. Open EDA tools that could be
570 supported include:
571
572 electric, xcircuit, kicad, sue2
573
574 Other open source EDA tools that need to be supported:
575
576 OpenROAD
577 Coriolis2
578 (add more here. . .)
579
580 Commercial EDA tools can potentially be supported under this same system,
581 provided sufficient compatibility with the file system structure.
582
583 Other scripts needed:
584
585 Project setup script: It would be useful to define a "standard
586 project file structure" that is similar to the standard PDK file
587 structure defined in open_pdks. The preferred project setup
588 based on the efabless model is:
589
590 <project_name>
591 .config/
592 techdir (symbolic link to open_pdks PDK)
593 project.json (information file for tools)
594 <tool_name> (magic, qflow, ngspice, etc.) or
595 <format_name> (spice, gds, verilog, etc.)
596
597 In general, <tool_name> directories are intended to be workspaces
598 for specific EDA tools (and may have their own nested hierarchies;
599 e.g., qflow/<digital_block>/source,synthesis,layout) while
600 <format_name> is a place to keep (final) files of a specific format,
601 with the intention that any project can easily be made into an
602 IP library and folded into the open_pdks scheme with little effort.
603
604 The project.json file contains project information that can be used
605 by a script to build a setup for any EDA tool. One goal of the
606 project.json file is to define "datasheet" (documented elsewhere)
607 that can be used to drive characterization simulations and create
608 a datasheet for the project. Field "ip-name" of "datasheet" is
609 the canonical name of the project, which can be distinguished from
610 the project directory top-level name, such that the project can be
611 moved or copied without affecting the tool flows.