pdksetup 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pdksetup-0.3.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for describing the origin of the Work and
141
+ reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Support. While redistributing the Work or
166
+ Derivative Works thereof, You may choose to offer, and charge a
167
+ fee for, acceptance of support, warranty, indemnity, or other
168
+ liability obligations and/or rights consistent with this License.
169
+ However, in accepting such obligations, You may act only on Your
170
+ own behalf and on Your sole responsibility, not on behalf of any
171
+ other Contributor, and only if You agree to indemnify, defend, and
172
+ hold each Contributor harmless for any liability incurred by, or
173
+ claims asserted against, such Contributor by reason of your accepting
174
+ any such warranty or support.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Levant Labs <info@levant-labs.com>
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
200
+ implied. See the License for the specific language governing
201
+ permissions and limitations under the License.
@@ -0,0 +1,402 @@
1
+ Metadata-Version: 2.4
2
+ Name: pdksetup
3
+ Version: 0.3.0
4
+ Summary: CLI for installing and managing open-source Process Design Kits (PDKs) for IC design
5
+ Author-email: Levant Labs <info@levant-labs.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/levantlabs/pdksetup
8
+ Project-URL: Repository, https://github.com/levantlabs/pdksetup
9
+ Project-URL: Issues, https://github.com/levantlabs/pdksetup/issues
10
+ Keywords: pdk,asic,vlsi,eda,open-source-silicon,sky130,gf180mcu
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: POSIX :: Linux
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Classifier: Topic :: System :: Installation/Setup
23
+ Requires-Python: >=3.11
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: click>=8.1
27
+ Requires-Dist: rich>=13.0
28
+ Requires-Dist: requests>=2.31
29
+ Requires-Dist: volare>=0.16
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest>=8.0; extra == "dev"
32
+ Requires-Dist: pytest-mock>=3.12; extra == "dev"
33
+ Requires-Dist: responses>=0.25; extra == "dev"
34
+ Dynamic: license-file
35
+
36
+ # PDK Setup
37
+
38
+ A CLI tool for installing and managing 10 open-source Process Design Kits (PDKs): 7 fabricatable PDKs (which can produce real silicon) plus 3 simulation-only / predictive PDKs (for flow development, PPA studies, and education).
39
+
40
+ ## Quick Start
41
+
42
+ **Prerequisites:** Python 3.11+, `git`
43
+
44
+ ```bash
45
+ pip install -e .
46
+ pdk install --all
47
+ ```
48
+
49
+ **Recommended for SKY130, GF180MCU, and IHP SG13G2:** Use [IIC-OSIC-TOOLS](https://github.com/iic-jku/IIC-OSIC-TOOLS), a Docker image that ships all three with their full EDA tool stacks pre-installed. This tool complements it by covering the remaining PDKs and providing unified status/update commands across all ten (seven fabricatable plus three simulation-only).
50
+
51
+ ---
52
+
53
+ ## PDK Reference
54
+
55
+ ### SkyWater SKY130 — 130nm Bulk CMOS
56
+ - **Foundry:** SkyWater Technology
57
+ - **Status:** Stable
58
+ - **Shuttle access:** [ChipFoundry.io](https://chipfoundry.io), Cadence/SkyWater MPW
59
+ - **Runtime tools:** magic, klayout, xschem, ngspice, netgen, openroad
60
+ - **Source:** https://github.com/google/skywater-pdk (archived read-only Apr 2026; data intact)
61
+ - **License:** Apache-2.0
62
+
63
+ ### GlobalFoundries GF180MCU — 180nm Bulk CMOS
64
+ - **Foundry:** GlobalFoundries
65
+ - **Status:** Stable
66
+ - **Shuttle access:** [Wafer.Space](https://wafer.space)
67
+ - **Runtime tools:** magic, klayout, xschem, ngspice, netgen, openroad
68
+ - **Source:** https://github.com/google/gf180mcu-pdk (archived read-only Apr 2026; data intact)
69
+ - **License:** Apache-2.0
70
+
71
+ ### IHP SG13G2 — 130nm BiCMOS + SiGe HBT
72
+ - **Foundry:** IHP – Leibniz-Institut für innovative Mikroelektronik
73
+ - **Status:** Stable (active alpha; production release in progress)
74
+ - **Shuttle access:** IHP MPW shuttles (https://www.ihp-microelectronics.com)
75
+ - **Runtime tools:** klayout (≥0.28), ngspice, xschem, openroad
76
+ - **Source:** https://github.com/IHP-GmbH/IHP-Open-PDK
77
+ - **License:** Apache-2.0
78
+ - **Notes:** Only open PDK with a real SiGe BiCMOS process (fT up to 350 GHz). Best choice for RF/mmWave design.
79
+ - **OSDI models:** ngspice simulation of MOSFETs, resistors, and varactors requires OSDI-compiled Verilog-A models (PSP 103.6 has no built-in SPICE equivalent), which are not shipped as binaries. `pdk install` compiles them automatically whenever an OpenVAF compiler (`openvaf-r` or `openvaf`) is on PATH — including recompiling after a PDK update. Installing [OpenVAF-Reloaded](https://github.com/OpenVAF/OpenVAF-Reloaded) is the only manual step: prebuilt archives for Linux, macOS (Apple Silicon and Intel), and Windows are on the project's [releases page](https://github.com/OpenVAF/OpenVAF-Reloaded/releases); extract the whole archive (`bin/` needs its `lib/` sibling; on Linux also the LLVM 21 runtime) and put `bin/openvaf-r` on PATH — the post-install note prints exact per-platform steps. Simulating the resulting OSDI v0.4 models requires **ngspice ≥ 44** (Ubuntu 24.04's apt ships ngspice-42, which is too old).
80
+ - **Linux libLLVM recipe (no root):** the current OpenVAF-Reloaded Linux archive needs `libLLVM.so.21.1` but ships only a dangling symlink to it ([fix submitted upstream](https://github.com/OpenVAF/OpenVAF-Reloaded/pull/32)), and most distros don't package LLVM 21 yet. If `ldconfig -p | grep libLLVM.so.21` finds nothing, extract the library from apt.llvm.org without root:
81
+
82
+ ```bash
83
+ OVR=~/.local/opt/openvaf-r-v24.0.1mob-linux-x86_64 # wherever you extracted the archive
84
+ POOL=https://apt.llvm.org/noble/pool/main/l/llvm-toolchain-21 # noble = Ubuntu 24.04; use your codename
85
+ curl -sLo /tmp/libllvm21.deb "$POOL/$(curl -s $POOL/ | grep -o 'libllvm21[^"]*amd64\.deb' | head -1)"
86
+ dpkg-deb -x /tmp/libllvm21.deb /tmp/llvm21
87
+ rm "$OVR/lib/libLLVM.so.21.1" # dangling symlink — remove it before copying, or cp follows it
88
+ cp /tmp/llvm21/usr/lib/x86_64-linux-gnu/libLLVM.so.21.1 "$OVR/lib/"
89
+ ln -sf "$OVR/bin/openvaf-r" ~/.local/bin/openvaf-r
90
+ openvaf-r --version # prints "OpenVAF-reloaded unknown" on success
91
+ ```
92
+
93
+ Once the upstream fix ships in a release, the archive will be self-contained and this step disappears. HBT-only simulation (native VBIC) and layout tools work without this step. `pdk status` reports whether the models are compiled (`OSDI models: compiled` / `OSDI models: MISSING`), and flags them as `STALE` if a PDK update has changed the Verilog-A sources since they were compiled. The installer also maintains a `$PDK_ROOT/ihp-sg13g2` symlink so the PDK's `.spiceinit`, `xschemrc`, and upstream docs resolve with the same `PDK_ROOT` used for every other PDK (set `PDK=ihp-sg13g2` for simulation).
94
+
95
+ <a id="getting-a-newer-ngspice"></a>
96
+ #### Getting a newer ngspice
97
+
98
+ IHP SG13G2 and ASAP7 need **ngspice ≥ 44**, and `pdk install` flags an older one on PATH. Distro packages often lag: Ubuntu 24.04 ships 42, and conda-forge is at 41.
99
+
100
+ - **macOS:** `brew install ngspice` (Homebrew core ships 47).
101
+ - **Linux:** build the official release from source. It takes about 1.5 minutes, needs no root apart from the build dependencies, and OSDI is enabled by default:
102
+
103
+ ```bash
104
+ sudo apt install build-essential bison flex libreadline-dev libxaw7-dev # Debian/Ubuntu
105
+ curl -L -o ngspice-47.tar.gz https://sourceforge.net/projects/ngspice/files/ng-spice-rework/47/ngspice-47.tar.gz/download
106
+ tar xzf ngspice-47.tar.gz && cd ngspice-47
107
+ mkdir build && cd build
108
+ ../configure --prefix=$HOME/.local/opt/ngspice-47 --with-readline=yes --disable-debug
109
+ make -j"$(nproc)" && make install
110
+ ```
111
+
112
+ **Put it ahead of the system one on PATH.** The shell runs the first `ngspice` it finds in `$PATH`. Linking the new one into `~/.local/bin`, which comes before `/usr/bin` on most distros, makes it the default and leaves the system copy installed:
113
+
114
+ ```bash
115
+ ln -s ~/.local/opt/ngspice-47/bin/ngspice ~/.local/bin/ngspice
116
+ hash -r && ngspice --version # should print ngspice-47
117
+ ```
118
+
119
+ If it still prints the old version, `~/.local/bin` isn't early enough in your `PATH`. Check with `type -a ngspice`. To undo, `rm ~/.local/bin/ngspice`.
120
+
121
+ ### SkyWater SKY90FD — 90nm FDSOI CMOS ⚠️ EXPERIMENTAL
122
+ - **Foundry:** SkyWater Technology
123
+ - **Status:** Alpha — silicon validation ongoing; not yet production-proven
124
+ - **Shuttle access:** TBD (SkyWater direct)
125
+ - **Runtime tools:** magic, klayout, xschem, ngspice
126
+ - **Source:** https://github.com/google/sky90fd-pdk
127
+ - **License:** Apache-2.0
128
+
129
+ ### ICsprout 55nm — 55nm Bulk CMOS ⚠️ EXPERIMENTAL
130
+ - **Foundry:** ICsprout Integrated Circuit Co., Ltd.
131
+ - **Status:** Preview (Oct 2025) — silicon validation pending; not approved for production tapeout
132
+ - **Shuttle access:** ICsprout direct (China)
133
+ - **Runtime tools:** klayout, openroad, yosys
134
+ - **Source:** https://github.com/openecos-projects/icsprout55-pdk
135
+ - **License:** Apache-2.0
136
+
137
+ ### ICPS Minimal Fab — 5–6µm SOI CMOS (1-metal)
138
+ - **Foundry:** AIST, Japan (Minimal Fab program)
139
+ - **Status:** Stable
140
+ - **Shuttle access:** AIST Minimal Fab (~10-day turnaround, 0.5-inch wafers)
141
+ - **Runtime tools:** klayout, xschem, ngspice
142
+ - **Source:** https://github.com/mineda-support/ICPS2023_5
143
+ - **License:** Apache-2.0
144
+ - **Notes:** No formal version tags; install tracks latest main commit.
145
+
146
+ ### SiEPIC EBeam PDK — Silicon Photonics
147
+ - **Foundry:** SiEPICfab / University of British Columbia
148
+ - **Status:** Stable
149
+ - **Shuttle access:** OpenEBL MPW runs (multiple per year, worldwide academic access)
150
+ - **Runtime tools:** klayout (≥0.28)
151
+ - **Source:** https://github.com/SiEPIC/SiEPIC_EBeam_PDK
152
+ - **License:** MIT
153
+ - **Notes:** Install via this tool or via KLayout Package Manager. No formal version tags; tracks latest commit.
154
+
155
+ ### Simulation-only PDKs (predictive)
156
+
157
+ These are flagged `SIMULATION` in `pdk status`. They're **excluded** from `pdk install --all` by default — pass `--include-simulation` to include them, or install by name (`pdk install asap7`) anytime. No foundry offers real silicon on them; they exist for flow development, PPA studies, and education.
158
+
159
+ #### ASAP7 — 7nm FinFET predictive 🧪 SIMULATION
160
+ - **Maintainer:** Arizona State University with Arm Research (PDK); install recipe by [IIC-OSIC-TOOLS](https://github.com/iic-jku/IIC-OSIC-TOOLS) (JKU)
161
+ - **Runtime tools:** ngspice (≥ 44), Xyce, klayout, openroad, yosys
162
+ - **License:** BSD-3-Clause (ASAP7); see [ASAP7 licences](#asap7-licences) for the other parts
163
+ - **What you get:** a simulation-ready `$PDK_ROOT/asap7` (~114 MB, about a minute to build) with the eight core FinFETs (`nmos_`/`pmos_` × `lvt`, `rvt`, `slvt`, `sram`) in `tt`/`ff`/`ss` corners for ngspice (BSIM-CMG 107 via OSDI), Xyce (built-in BSIM-CMG 107) and VACASK; the 7.5-track standard cells (LEF, GDS, NLDM Liberty, CDL, Verilog); KLayout tech, DRC and LVS; LibreLane, xschem and pygmid setup.
164
+ - **How it's built:** upstream ASAP7 ships only HSPICE level-72 cards, which ngspice and Xyce can't run as-is. `pdk install asap7` runs IIC-OSIC-TOOLS' own install recipe (`install_asap7.sh`) outside Docker: it fetches pinned slices of `asap7_pdk_r1p7`, `asap7sc7p5t_28`, OpenROAD-flow-scripts, ASAP7_for_KLayout and CMC.jl, converts the cards, and compiles BSIM-CMG 107 with your OpenVAF. **The install executes that third-party script** (one line is patched: its temp directory). It builds in a staging directory and only replaces `$PDK_ROOT/asap7` once the build has fully succeeded. The upstream revisions it used are recorded in `$PDK_ROOT/asap7/SOURCES`.
165
+ - **Requirements (checked before anything is changed):** Linux or macOS (Windows: use WSL), `bash`, `python3`, `gzip`, **git ≥ 2.35** (Ubuntu 22.04 ships 2.34; use the [git PPA](https://launchpad.net/~git-core/+archive/ubuntu/ppa) or a newer distro), and a working OpenVAF-Reloaded on PATH (see the OpenVAF and libLLVM steps in the IHP section above; pdksetup runs `openvaf-r --version` to confirm it starts).
166
+ - **Tested:** Linux x86_64 (Ubuntu 24.04) with ngspice 47: `nmos_rvt`, `nfin=3`, `l=20n`, Vgs = Vds = 0.7 V, `tt` gives 37.80 µA per fin, against 37.85 µA in the ASAP7 paper (Clark et al. 2016). macOS is expected to work but is untested.
167
+ - **Simulating:** `export PDK_ROOT=...`, copy or symlink `$PDK_ROOT/asap7/libs.tech/ngspice/.spiceinit` into your simulation directory (it loads the BSIM-CMG plugin), then `.lib $PDK_ROOT/asap7/libs.tech/ngspice/models/asap7.lib tt`. Size devices with integer `nfin`; ASAP7 has a single drawn gate length, `l=20n`. ngspice must be **≥ 44**: older versions can't load the OSDI v0.4 plugin, and `pdk install` flags an older ngspice on PATH (see [Getting a newer ngspice](#getting-a-newer-ngspice)). For Xyce, use `$PDK_ROOT/asap7/libs.tech/xyce/models/asap7.lib`; no plugin is needed.
168
+ - **Not pure ASAP7:** IIC adds metal resistors, a MOM capacitor, a thin-film resistor, diodes, a PNP, 1.8 V IO FinFETs and extra gate lengths, all with **assumed parameters**. They are useful for analog exploration but are not part of ASAP7. ASAP7 itself defines only the eight FinFETs at one gate length.
169
+ - **Not included:** the 6-track library (`asap7sc6t_26`), the SRAM macros, CCS Liberty files, and the Calibre decks (not redistributable; available from ASU at http://asap.asu.edu/asap/).
170
+ - **Versions and updates:** the default install is the IIC commit verified above (`46c9966b` on `next_release`, the branch that moved ngspice to BSIM-CMG 107). `pdk check-updates` compares the content of the recipe on `next_release` (scripts, overlay, source pins) with what you installed, so unrelated IIC commits, or the same recipe merged onto `main`, don't show as updates. To install something else: `pdk install asap7 --version next_release` (branch head) or `--version <commit>`.
171
+ - **Upgrading from pdksetup ≤ 0.2.0:** older versions cloned the raw 19 GB upstream repo into the same directory, and `pdk install asap7` refuses to overwrite it. Run `pdk uninstall asap7` first.
172
+
173
+ <a id="asap7-licences"></a>
174
+ **ASAP7 licences.** ASAP7 PDK and cell libraries: BSD-3-Clause (© 2020 L. T. Clark, V. Vashishtha, Arizona State University). IIC-OSIC-TOOLS recipe and overlay: Apache-2.0 (H. Pretl, JKU). ASAP7_for_KLayout: BSD-2-Clause. OpenROAD-flow-scripts files: see `libs.tech/librelane/common/LICENSE.orfs`. **BSIM-CMG 107.0.0** (compiled on your machine from CedarEDA/CMC.jl): © 2012 Regents of the University of California, royalty-free with conditions. No charge for the UC code itself. Acknowledge UC in documentation of products based on it. Obey U.S. export rules. Reproduce its copyright notices. The full text is in `$PDK_ROOT/asap7/libs.tech/verilog-a/bsimcmg/`. BSIM-CMG was developed by the BSIM Group at the University of California, Berkeley (Prof. Chenming Hu). This summary is not legal advice.
175
+
176
+ #### ASAP5 — 5nm FinFET predictive 🧪 SIMULATION
177
+ - **Source:** https://github.com/The-OpenROAD-Project-Attic/ASAP5
178
+ - **Maintainer:** Arizona State University
179
+ - **Runtime tools:** klayout, openroad, yosys
180
+ - **License:** BSD-3-Clause
181
+ - **Notes:** Follow-on to ASAP7 at 5nm. Less broadly used than ASAP7; "attic" repo status.
182
+
183
+ #### FreePDK45 — 45nm Bulk CMOS predictive 🧪 SIMULATION
184
+ - **Source:** https://github.com/mflowgen/freepdk-45nm
185
+ - **Maintainer:** mflowgen repackage of NCSU FreePDK45
186
+ - **Runtime tools:** klayout, ngspice, openroad, yosys
187
+ - **License:** BSD
188
+ - **Notes:** Classic teaching/research PDK. Pairs with the Nangate45 standard-cell library.
189
+
190
+ ---
191
+
192
+ ## CLI Reference
193
+
194
+ Global options available on every command (can be placed before OR after the subcommand):
195
+
196
+ - `--pdk-root PATH` — override where PDKs are installed for this invocation. `~`, `$VAR`, and relative paths are all expanded.
197
+ - `--here` — shorthand for `--pdk-root $PWD`. Install into (or query) the current working directory.
198
+ - `--config PATH` — read/write config from a custom TOML file instead of `~/.config/pdksetup/config.toml`
199
+
200
+ Quick install-here example:
201
+ ```bash
202
+ cd /work/my_chip_project
203
+ pdk install sky130 --here # installs under /work/my_chip_project/
204
+ pdk status --here # check what's there
205
+ ```
206
+
207
+ ### `pdk install [PDK_NAME]`
208
+ Install a PDK, or install many with `--all`.
209
+
210
+ | Option | Description |
211
+ |---|---|
212
+ | `--all` | Install every **fabricatable** PDK in the registry. Simulation-only PDKs (ASAP7, ASAP5, FreePDK45) are excluded unless `--include-simulation` is also passed |
213
+ | `--skip-experimental` | With `--all`, skip SKY90FD and ICsprout 55nm |
214
+ | `--include-simulation` | With `--all`, also install simulation-only PDKs |
215
+ | `--version TEXT` | Pin a specific version: a volare version for sky130/gf180mcu, or an IIC-OSIC-TOOLS commit or branch for asap7. Errors if combined with any other PDK |
216
+
217
+ Examples:
218
+ ```bash
219
+ pdk install sky130 # single fabricatable PDK
220
+ pdk install asap7 # single simulation PDK (no flag needed)
221
+ pdk install sky130 --version 0.0.486 # pin a version (volare)
222
+ pdk install asap7 --version next_release # asap7 from the IIC branch head
223
+ pdk install --all # all fabricatable PDKs (7 total)
224
+ pdk install --all --skip-experimental # stable fabricatable only
225
+ pdk install --all --include-simulation # fabricatable + ASAP7/ASAP5/FreePDK45
226
+ pdk install --all --skip-experimental --include-simulation # stable fab + simulation
227
+ pdk install sky130 --pdk-root /opt/pdks # install into a different root
228
+ ```
229
+
230
+ After each successful install the CLI prints the runtime tools needed to use the PDK (KLayout, Magic, ngspice, etc.) — these are **not** auto-installed; see [IIC-OSIC-TOOLS](https://github.com/iic-jku/IIC-OSIC-TOOLS) for a ready-made container.
231
+
232
+ ### `pdk uninstall PDK_NAME`
233
+ Remove an installed PDK from scratch-friendly state: deletes its directory under `$PDK_ROOT`, any symlinks the tool maintains for it (e.g. IHP's `ihp-sg13g2` layout link), and its entry in the state file. Asks for confirmation unless `--yes` is passed. Anything at a link path that isn't a symlink is never touched.
234
+
235
+ ```bash
236
+ pdk uninstall ihp_sg13g2 # prompts before deleting
237
+ pdk uninstall ihp_sg13g2 --yes # no prompt
238
+ ```
239
+
240
+ Volare-managed PDKs (sky130, gf180mcu) are refused — volare owns those files; remove them with `volare rm`.
241
+
242
+ ### `pdk status [PDK_NAME]`
243
+ Show installation status for every known PDK, or for one specific PDK. Experimental PDKs are flagged in a separate column.
244
+
245
+ ```bash
246
+ pdk status # table of all 10 PDKs (fabricatable + simulation)
247
+ pdk status sky130 # just one row
248
+ ```
249
+
250
+ ### `pdk check-updates [PDK_NAME]`
251
+ Query each PDK's version source and compare to what's recorded in the local state file. PDKs that aren't installed are shown as "not installed" without a remote query.
252
+
253
+ ```bash
254
+ pdk check-updates # all installed PDKs
255
+ pdk check-updates sky130 # one PDK
256
+ ```
257
+
258
+ Version sources per PDK:
259
+ - **sky130, gf180mcu** — volare release list
260
+ - **ihp_sg13g2, sky90fd** — GitHub tags
261
+ - **icsprout55** — GitHub releases (falls back to tags)
262
+ - **icps_minifab, siepic_ebeam** — latest commit SHA on the repo's default branch (no formal versioning)
263
+
264
+ HTTP errors (rate-limits, timeouts, 404s) degrade gracefully per PDK — one failed lookup does not abort the sweep.
265
+
266
+ ### `pdk config show` / `pdk config set KEY VALUE`
267
+ Print or modify the persistent config at `~/.config/pdksetup/config.toml`.
268
+
269
+ ```bash
270
+ pdk config show
271
+ pdk config set pdk_root /opt/pdks
272
+ pdk config set volare_root /opt/volare
273
+ ```
274
+
275
+ Valid keys: `pdk_root`, `volare_root`. Unknown keys are rejected.
276
+
277
+ ---
278
+
279
+ ## Configuration
280
+
281
+ Where PDKs get installed is resolved from four sources. **Higher wins:**
282
+
283
+ 1. **CLI flag** — `--pdk-root /path` (highest priority; applies only to that invocation)
284
+ 2. **Environment variable** — `PDK_ROOT=/path`
285
+ 3. **Config file** — `~/.config/pdksetup/config.toml` (edit via `pdk config set`)
286
+ 4. **Default** — `~/.pdk` (lowest priority)
287
+
288
+ Same ordering applies to `volare_root` (env var `VOLARE_ROOT`, default `~/.volare`).
289
+
290
+ **Path expansion:** `~`, `$VAR`, and `${VAR}` are expanded on every path value — config file, env var, or CLI flag. Relative paths are resolved against the current working directory at the moment the command runs. So `pdk_root = "~/pdk"` in the config file and `PDK_ROOT=~/pdk` on the shell both end up at `/home/you/pdk`.
291
+
292
+ `PDK_ROOT` is the same variable Magic, Xschem, OpenROAD, and other EDA tools read from the environment, so once set it's picked up by the whole flow.
293
+
294
+ Check what's currently resolved:
295
+ ```bash
296
+ pdk config show
297
+ ```
298
+
299
+ ### The config file
300
+
301
+ - **Default path:** `~/.config/pdksetup/config.toml`
302
+ - **Created lazily** — the file and its parent directory don't exist until you run `pdk config set` for the first time. Until then, the CLI just falls through to env var / default.
303
+ - **Plain TOML** — hand-editable. Example contents after setting both keys:
304
+ ```toml
305
+ [pdksetup]
306
+ pdk_root = "/opt/pdks"
307
+ volare_root = "/opt/volare"
308
+ ```
309
+ - **Valid keys:** `pdk_root`, `volare_root`. Unknown keys are rejected by `pdk config set`.
310
+ - After a successful `pdk config set`, the CLI echoes the file it wrote to so you know where to find it.
311
+ - `pdk config show` prints the resolved config file path on the first line of output.
312
+
313
+ ### Using a custom config file location
314
+
315
+ Pass `--config PATH` on any command to read/write from a different TOML file:
316
+
317
+ ```bash
318
+ # Start from the template shipped with the repo
319
+ cp examples/config.toml /opt/pdks/mypdk.toml
320
+ # Edit /opt/pdks/mypdk.toml as needed, then use it everywhere:
321
+ pdk --config /opt/pdks/mypdk.toml install sky130
322
+ pdk install sky130 --config /opt/pdks/mypdk.toml # position doesn't matter
323
+ pdk config show --config /opt/pdks/mypdk.toml
324
+ pdk config set pdk_root /opt/pdks --config /opt/pdks/mypdk.toml
325
+ ```
326
+
327
+ An annotated starting template lives at [`examples/config.toml`](examples/config.toml). It documents every supported key and is safe to copy anywhere on disk.
328
+
329
+ If you want the custom file to be picked up *without* typing `--config` every time, the cleanest options are:
330
+
331
+ - Set a shell alias: `alias pdk='pdk --config /opt/pdks/mypdk.toml'`
332
+ - Put the file at the default path instead: `mv /opt/pdks/mypdk.toml ~/.config/pdksetup/config.toml`
333
+
334
+ ### Pointing at an existing install
335
+
336
+ Installs and queries (`status`, `check-updates`) each use the `pdk_root` that's
337
+ resolved *at that moment*. If you install into one root and later run `pdk
338
+ status` with a different resolved root, status will show everything as "not
339
+ installed" — it's looking in the wrong place, not a bug.
340
+
341
+ Every install writes a state file at `$PDK_ROOT/.pdksetup/state.json`. `status`
342
+ and `check-updates` read that same file, so they must see the same `pdk_root`
343
+ the install used.
344
+
345
+ Find state files on disk:
346
+ ```bash
347
+ find / -name state.json -path "*/.pdksetup/*" 2>/dev/null
348
+ ```
349
+
350
+ The `pdk status` command prints its resolved `pdk_root` at the top of the
351
+ output as `Scanning: <path>` — use that to confirm it matches where you
352
+ installed. If it doesn't, re-run with the right root (one of the forms below).
353
+
354
+ Examples:
355
+ ```bash
356
+ PDK_ROOT=/opt/pdks pdk install sky130 # env var, one shot
357
+ pdk install sky130 --pdk-root /opt/pdks # CLI flag, one shot
358
+ pdk config set pdk_root /opt/pdks # persist to config file
359
+ ```
360
+
361
+ ---
362
+
363
+ ## Tool Compatibility Matrix
364
+
365
+ Fabricatable PDKs:
366
+
367
+ | Tool | sky130 | gf180mcu | ihp_sg13g2 | sky90fd | icsprout55 | icps_minifab | siepic_ebeam |
368
+ |---|---|---|---|---|---|---|---|
369
+ | Magic | ✓ | ✓ | — | ✓ | — | — | — |
370
+ | KLayout | ✓ | ✓ | ✓ (primary) | ✓ | ✓ | ✓ | ✓ (primary) |
371
+ | Xschem | ✓ | ✓ | ✓ | ✓ | — | ✓ | — |
372
+ | ngspice | ✓ | ✓ | ✓ | ✓ | — | ✓ | — |
373
+ | Netgen | ✓ | ✓ | — | — | — | — | — |
374
+ | OpenROAD | ✓ | ✓ | ✓ | — | ✓ | — | — |
375
+ | Yosys | ✓ | ✓ | ✓ | — | ✓ | — | — |
376
+
377
+ Simulation-only PDKs:
378
+
379
+ | Tool | asap7 | asap5 | freepdk45 |
380
+ |---|---|---|---|
381
+ | KLayout | ✓ | ✓ | ✓ |
382
+ | ngspice | ✓ (≥ 44) | — | ✓ |
383
+ | Xyce | ✓ | — | — |
384
+ | OpenROAD | ✓ (primary) | ✓ (primary) | ✓ |
385
+ | Yosys | ✓ | ✓ | ✓ |
386
+
387
+ ---
388
+
389
+ ## Experimental PDKs
390
+
391
+ **SKY90FD** and **ICsprout 55nm** are included but flagged as experimental. This means:
392
+ - Silicon has not been fully validated at the time of this writing
393
+ - DRC/LVS rule decks may be incomplete or change without notice
394
+ - They should not be used for production tapeouts without verifying current upstream status
395
+ - Track upstream status at their source repos (linked above)
396
+
397
+ Install experimental PDKs explicitly:
398
+ ```bash
399
+ pdk install sky90fd # one at a time, always works
400
+ pdk install --all # includes experimental
401
+ pdk install --all --skip-experimental # exclude them
402
+ ```