pdksetup 0.3.0__tar.gz → 0.3.2__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.
Files changed (28) hide show
  1. {pdksetup-0.3.0 → pdksetup-0.3.2}/PKG-INFO +31 -24
  2. {pdksetup-0.3.0 → pdksetup-0.3.2}/README.md +30 -23
  3. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/cli.py +1 -1
  4. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/registry.py +0 -13
  5. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup.egg-info/PKG-INFO +31 -24
  6. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup.egg-info/SOURCES.txt +1 -0
  7. {pdksetup-0.3.0 → pdksetup-0.3.2}/pyproject.toml +6 -1
  8. {pdksetup-0.3.0 → pdksetup-0.3.2}/tests/test_cli.py +2 -4
  9. {pdksetup-0.3.0 → pdksetup-0.3.2}/tests/test_registry.py +7 -2
  10. pdksetup-0.3.2/tests/test_scan_release.py +182 -0
  11. {pdksetup-0.3.0 → pdksetup-0.3.2}/LICENSE +0 -0
  12. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/__init__.py +0 -0
  13. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/config.py +0 -0
  14. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/installers/__init__.py +0 -0
  15. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/installers/base.py +0 -0
  16. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/installers/custom.py +0 -0
  17. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/installers/iic.py +0 -0
  18. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/installers/volare.py +0 -0
  19. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/state.py +0 -0
  20. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup/updater.py +0 -0
  21. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup.egg-info/dependency_links.txt +0 -0
  22. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup.egg-info/entry_points.txt +0 -0
  23. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup.egg-info/requires.txt +0 -0
  24. {pdksetup-0.3.0 → pdksetup-0.3.2}/pdksetup.egg-info/top_level.txt +0 -0
  25. {pdksetup-0.3.0 → pdksetup-0.3.2}/setup.cfg +0 -0
  26. {pdksetup-0.3.0 → pdksetup-0.3.2}/tests/test_config.py +0 -0
  27. {pdksetup-0.3.0 → pdksetup-0.3.2}/tests/test_state.py +0 -0
  28. {pdksetup-0.3.0 → pdksetup-0.3.2}/tests/test_updater.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdksetup
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: CLI for installing and managing open-source Process Design Kits (PDKs) for IC design
5
5
  Author-email: Levant Labs <info@levant-labs.com>
6
6
  License-Expression: Apache-2.0
@@ -35,18 +35,22 @@ Dynamic: license-file
35
35
 
36
36
  # PDK Setup
37
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).
38
+ A CLI tool for installing and managing 9 open-source Process Design Kits (PDKs): 7 fabricatable PDKs (which can produce real silicon) plus 2 simulation-only / predictive PDKs (for flow development, PPA studies, and education).
39
39
 
40
40
  ## Quick Start
41
41
 
42
42
  **Prerequisites:** Python 3.11+, `git`
43
43
 
44
44
  ```bash
45
- pip install -e .
45
+ pipx install pdksetup # or: pip install pdksetup
46
46
  pdk install --all
47
47
  ```
48
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).
49
+ [pipx](https://pipx.pypa.io) installs command-line tools like `pdk` into their own isolated environment and puts them on your PATH. Upgrade later with `pipx upgrade pdksetup` (or `pip install -U pdksetup`).
50
+
51
+ **Development:** clone the repo, then run `pip install -e ".[dev]"` and `pytest`.
52
+
53
+ **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 nine (seven fabricatable plus two simulation-only).
50
54
 
51
55
  ---
52
56
 
@@ -160,26 +164,29 @@ These are flagged `SIMULATION` in `pdk status`. They're **excluded** from `pdk i
160
164
  - **Maintainer:** Arizona State University with Arm Research (PDK); install recipe by [IIC-OSIC-TOOLS](https://github.com/iic-jku/IIC-OSIC-TOOLS) (JKU)
161
165
  - **Runtime tools:** ngspice (≥ 44), Xyce, klayout, openroad, yosys
162
166
  - **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.
167
+ - **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) in all four threshold flavours: RVT, LVT, SLVT and SRAM, where "SRAM" is ASAP7's high-threshold transistor flavour, not memory; KLayout tech, DRC and LVS; LibreLane, xschem and pygmid setup.
164
168
  - **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
169
  - **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
170
  - **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
171
  - **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.
172
+ - **Check your install:** [`examples/asap7_nmos_check.sp`](https://github.com/levantlabs/pdksetup/blob/main/examples/asap7_nmos_check.sp) simulates one `nmos_rvt` and should print 37.8 µA per fin, against 37.85 µA in the ASAP7 paper. It exercises the whole chain: models, ngspice version, and the compiled BSIM-CMG plugin.
173
+
174
+ ```bash
175
+ mkdir -p ~/sim/asap7 && cd ~/sim/asap7
176
+ ln -s "$PDK_ROOT/asap7/libs.tech/ngspice/.spiceinit" .
177
+ curl -sLO https://raw.githubusercontent.com/levantlabs/pdksetup/main/examples/asap7_nmos_check.sp
178
+ ngspice -b asap7_nmos_check.sp # expect: -i(vd)/3 = 3.780159e-05
179
+ ```
180
+
181
+ "Could not find library file asap7.lib" means the `.spiceinit` isn't in the current directory or `$HOME`. An error loading the OSDI plugin usually means ngspice is older than 44.
168
182
  - **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/).
183
+ - **Not included:** the 6-track library (`asap7sc6t_26`), the SRAM memory macros (`asap7_sram_0p0`), CCS Liberty files, and the Calibre decks (not redistributable; available from ASU at http://asap.asu.edu/asap/).
170
184
  - **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
185
  - **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
186
 
173
187
  <a id="asap7-licences"></a>
174
188
  **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
189
 
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
190
  #### FreePDK45 — 45nm Bulk CMOS predictive 🧪 SIMULATION
184
191
  - **Source:** https://github.com/mflowgen/freepdk-45nm
185
192
  - **Maintainer:** mflowgen repackage of NCSU FreePDK45
@@ -209,7 +216,7 @@ Install a PDK, or install many with `--all`.
209
216
 
210
217
  | Option | Description |
211
218
  |---|---|
212
- | `--all` | Install every **fabricatable** PDK in the registry. Simulation-only PDKs (ASAP7, ASAP5, FreePDK45) are excluded unless `--include-simulation` is also passed |
219
+ | `--all` | Install every **fabricatable** PDK in the registry. Simulation-only PDKs (ASAP7, FreePDK45) are excluded unless `--include-simulation` is also passed |
213
220
  | `--skip-experimental` | With `--all`, skip SKY90FD and ICsprout 55nm |
214
221
  | `--include-simulation` | With `--all`, also install simulation-only PDKs |
215
222
  | `--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 |
@@ -222,7 +229,7 @@ pdk install sky130 --version 0.0.486 # pin a version (volare)
222
229
  pdk install asap7 --version next_release # asap7 from the IIC branch head
223
230
  pdk install --all # all fabricatable PDKs (7 total)
224
231
  pdk install --all --skip-experimental # stable fabricatable only
225
- pdk install --all --include-simulation # fabricatable + ASAP7/ASAP5/FreePDK45
232
+ pdk install --all --include-simulation # fabricatable + ASAP7/FreePDK45
226
233
  pdk install --all --skip-experimental --include-simulation # stable fab + simulation
227
234
  pdk install sky130 --pdk-root /opt/pdks # install into a different root
228
235
  ```
@@ -243,7 +250,7 @@ Volare-managed PDKs (sky130, gf180mcu) are refused — volare owns those files;
243
250
  Show installation status for every known PDK, or for one specific PDK. Experimental PDKs are flagged in a separate column.
244
251
 
245
252
  ```bash
246
- pdk status # table of all 10 PDKs (fabricatable + simulation)
253
+ pdk status # table of all 9 PDKs (fabricatable + simulation)
247
254
  pdk status sky130 # just one row
248
255
  ```
249
256
 
@@ -324,7 +331,7 @@ pdk config show --config /opt/pdks/mypdk.toml
324
331
  pdk config set pdk_root /opt/pdks --config /opt/pdks/mypdk.toml
325
332
  ```
326
333
 
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.
334
+ An annotated starting template lives at [`examples/config.toml`](https://github.com/levantlabs/pdksetup/blob/main/examples/config.toml). It documents every supported key and is safe to copy anywhere on disk.
328
335
 
329
336
  If you want the custom file to be picked up *without* typing `--config` every time, the cleanest options are:
330
337
 
@@ -376,13 +383,13 @@ Fabricatable PDKs:
376
383
 
377
384
  Simulation-only PDKs:
378
385
 
379
- | Tool | asap7 | asap5 | freepdk45 |
380
- |---|---|---|---|
381
- | KLayout | ✓ | ✓ | ✓ |
382
- | ngspice | ✓ (≥ 44) | — | ✓ |
383
- | Xyce | ✓ | — | — |
384
- | OpenROAD | ✓ (primary) | ✓ (primary) | ✓ |
385
- | Yosys | ✓ | ✓ | ✓ |
386
+ | Tool | asap7 | freepdk45 |
387
+ |---|---|---|
388
+ | KLayout | ✓ | ✓ |
389
+ | ngspice | ✓ (≥ 44) | ✓ |
390
+ | Xyce | ✓ | — |
391
+ | OpenROAD | ✓ (primary) | ✓ |
392
+ | Yosys | ✓ | ✓ |
386
393
 
387
394
  ---
388
395
 
@@ -1,17 +1,21 @@
1
1
  # PDK Setup
2
2
 
3
- 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).
3
+ A CLI tool for installing and managing 9 open-source Process Design Kits (PDKs): 7 fabricatable PDKs (which can produce real silicon) plus 2 simulation-only / predictive PDKs (for flow development, PPA studies, and education).
4
4
 
5
5
  ## Quick Start
6
6
 
7
7
  **Prerequisites:** Python 3.11+, `git`
8
8
 
9
9
  ```bash
10
- pip install -e .
10
+ pipx install pdksetup # or: pip install pdksetup
11
11
  pdk install --all
12
12
  ```
13
13
 
14
- **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).
14
+ [pipx](https://pipx.pypa.io) installs command-line tools like `pdk` into their own isolated environment and puts them on your PATH. Upgrade later with `pipx upgrade pdksetup` (or `pip install -U pdksetup`).
15
+
16
+ **Development:** clone the repo, then run `pip install -e ".[dev]"` and `pytest`.
17
+
18
+ **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 nine (seven fabricatable plus two simulation-only).
15
19
 
16
20
  ---
17
21
 
@@ -125,26 +129,29 @@ These are flagged `SIMULATION` in `pdk status`. They're **excluded** from `pdk i
125
129
  - **Maintainer:** Arizona State University with Arm Research (PDK); install recipe by [IIC-OSIC-TOOLS](https://github.com/iic-jku/IIC-OSIC-TOOLS) (JKU)
126
130
  - **Runtime tools:** ngspice (≥ 44), Xyce, klayout, openroad, yosys
127
131
  - **License:** BSD-3-Clause (ASAP7); see [ASAP7 licences](#asap7-licences) for the other parts
128
- - **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.
132
+ - **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) in all four threshold flavours: RVT, LVT, SLVT and SRAM, where "SRAM" is ASAP7's high-threshold transistor flavour, not memory; KLayout tech, DRC and LVS; LibreLane, xschem and pygmid setup.
129
133
  - **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`.
130
134
  - **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).
131
135
  - **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.
132
136
  - **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.
137
+ - **Check your install:** [`examples/asap7_nmos_check.sp`](https://github.com/levantlabs/pdksetup/blob/main/examples/asap7_nmos_check.sp) simulates one `nmos_rvt` and should print 37.8 µA per fin, against 37.85 µA in the ASAP7 paper. It exercises the whole chain: models, ngspice version, and the compiled BSIM-CMG plugin.
138
+
139
+ ```bash
140
+ mkdir -p ~/sim/asap7 && cd ~/sim/asap7
141
+ ln -s "$PDK_ROOT/asap7/libs.tech/ngspice/.spiceinit" .
142
+ curl -sLO https://raw.githubusercontent.com/levantlabs/pdksetup/main/examples/asap7_nmos_check.sp
143
+ ngspice -b asap7_nmos_check.sp # expect: -i(vd)/3 = 3.780159e-05
144
+ ```
145
+
146
+ "Could not find library file asap7.lib" means the `.spiceinit` isn't in the current directory or `$HOME`. An error loading the OSDI plugin usually means ngspice is older than 44.
133
147
  - **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.
134
- - **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/).
148
+ - **Not included:** the 6-track library (`asap7sc6t_26`), the SRAM memory macros (`asap7_sram_0p0`), CCS Liberty files, and the Calibre decks (not redistributable; available from ASU at http://asap.asu.edu/asap/).
135
149
  - **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>`.
136
150
  - **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.
137
151
 
138
152
  <a id="asap7-licences"></a>
139
153
  **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.
140
154
 
141
- #### ASAP5 — 5nm FinFET predictive 🧪 SIMULATION
142
- - **Source:** https://github.com/The-OpenROAD-Project-Attic/ASAP5
143
- - **Maintainer:** Arizona State University
144
- - **Runtime tools:** klayout, openroad, yosys
145
- - **License:** BSD-3-Clause
146
- - **Notes:** Follow-on to ASAP7 at 5nm. Less broadly used than ASAP7; "attic" repo status.
147
-
148
155
  #### FreePDK45 — 45nm Bulk CMOS predictive 🧪 SIMULATION
149
156
  - **Source:** https://github.com/mflowgen/freepdk-45nm
150
157
  - **Maintainer:** mflowgen repackage of NCSU FreePDK45
@@ -174,7 +181,7 @@ Install a PDK, or install many with `--all`.
174
181
 
175
182
  | Option | Description |
176
183
  |---|---|
177
- | `--all` | Install every **fabricatable** PDK in the registry. Simulation-only PDKs (ASAP7, ASAP5, FreePDK45) are excluded unless `--include-simulation` is also passed |
184
+ | `--all` | Install every **fabricatable** PDK in the registry. Simulation-only PDKs (ASAP7, FreePDK45) are excluded unless `--include-simulation` is also passed |
178
185
  | `--skip-experimental` | With `--all`, skip SKY90FD and ICsprout 55nm |
179
186
  | `--include-simulation` | With `--all`, also install simulation-only PDKs |
180
187
  | `--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 |
@@ -187,7 +194,7 @@ pdk install sky130 --version 0.0.486 # pin a version (volare)
187
194
  pdk install asap7 --version next_release # asap7 from the IIC branch head
188
195
  pdk install --all # all fabricatable PDKs (7 total)
189
196
  pdk install --all --skip-experimental # stable fabricatable only
190
- pdk install --all --include-simulation # fabricatable + ASAP7/ASAP5/FreePDK45
197
+ pdk install --all --include-simulation # fabricatable + ASAP7/FreePDK45
191
198
  pdk install --all --skip-experimental --include-simulation # stable fab + simulation
192
199
  pdk install sky130 --pdk-root /opt/pdks # install into a different root
193
200
  ```
@@ -208,7 +215,7 @@ Volare-managed PDKs (sky130, gf180mcu) are refused — volare owns those files;
208
215
  Show installation status for every known PDK, or for one specific PDK. Experimental PDKs are flagged in a separate column.
209
216
 
210
217
  ```bash
211
- pdk status # table of all 10 PDKs (fabricatable + simulation)
218
+ pdk status # table of all 9 PDKs (fabricatable + simulation)
212
219
  pdk status sky130 # just one row
213
220
  ```
214
221
 
@@ -289,7 +296,7 @@ pdk config show --config /opt/pdks/mypdk.toml
289
296
  pdk config set pdk_root /opt/pdks --config /opt/pdks/mypdk.toml
290
297
  ```
291
298
 
292
- 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.
299
+ An annotated starting template lives at [`examples/config.toml`](https://github.com/levantlabs/pdksetup/blob/main/examples/config.toml). It documents every supported key and is safe to copy anywhere on disk.
293
300
 
294
301
  If you want the custom file to be picked up *without* typing `--config` every time, the cleanest options are:
295
302
 
@@ -341,13 +348,13 @@ Fabricatable PDKs:
341
348
 
342
349
  Simulation-only PDKs:
343
350
 
344
- | Tool | asap7 | asap5 | freepdk45 |
345
- |---|---|---|---|
346
- | KLayout | ✓ | ✓ | ✓ |
347
- | ngspice | ✓ (≥ 44) | — | ✓ |
348
- | Xyce | ✓ | — | — |
349
- | OpenROAD | ✓ (primary) | ✓ (primary) | ✓ |
350
- | Yosys | ✓ | ✓ | ✓ |
351
+ | Tool | asap7 | freepdk45 |
352
+ |---|---|---|
353
+ | KLayout | ✓ | ✓ |
354
+ | ngspice | ✓ (≥ 44) | ✓ |
355
+ | Xyce | ✓ | — |
356
+ | OpenROAD | ✓ (primary) | ✓ |
357
+ | Yosys | ✓ | ✓ |
351
358
 
352
359
  ---
353
360
 
@@ -335,7 +335,7 @@ def main(ctx: click.Context, pdk_root: str | None, config_path: str | None) -> N
335
335
  @click.option(
336
336
  "--include-simulation",
337
337
  is_flag=True,
338
- help="Include simulation-only PDKs (ASAP7, ASAP5, FreePDK45) when using --all.",
338
+ help="Include simulation-only PDKs (ASAP7, FreePDK45) when using --all.",
339
339
  )
340
340
  @click.option(
341
341
  "--version",
@@ -288,19 +288,6 @@ REGISTRY: list[PDKEntry] = [
288
288
  post_install_ready_note=ASAP7_SIM_READY_NOTE,
289
289
  runtime_tool_min_versions=(NGSPICE_OSDI_MIN,),
290
290
  ),
291
- PDKEntry(
292
- name="asap5",
293
- display_name="ASAP5 (predictive)",
294
- node="5nm",
295
- technology="FinFET predictive",
296
- foundry="Arizona State University (academic)",
297
- install_strategy="custom",
298
- source_url="https://github.com/The-OpenROAD-Project-Attic/ASAP5",
299
- license="BSD-3-Clause",
300
- runtime_tools=("klayout", "openroad", "yosys"),
301
- version_source="github_commit",
302
- fabricatable=False,
303
- ),
304
291
  PDKEntry(
305
292
  name="freepdk45",
306
293
  display_name="FreePDK45 (predictive)",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdksetup
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: CLI for installing and managing open-source Process Design Kits (PDKs) for IC design
5
5
  Author-email: Levant Labs <info@levant-labs.com>
6
6
  License-Expression: Apache-2.0
@@ -35,18 +35,22 @@ Dynamic: license-file
35
35
 
36
36
  # PDK Setup
37
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).
38
+ A CLI tool for installing and managing 9 open-source Process Design Kits (PDKs): 7 fabricatable PDKs (which can produce real silicon) plus 2 simulation-only / predictive PDKs (for flow development, PPA studies, and education).
39
39
 
40
40
  ## Quick Start
41
41
 
42
42
  **Prerequisites:** Python 3.11+, `git`
43
43
 
44
44
  ```bash
45
- pip install -e .
45
+ pipx install pdksetup # or: pip install pdksetup
46
46
  pdk install --all
47
47
  ```
48
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).
49
+ [pipx](https://pipx.pypa.io) installs command-line tools like `pdk` into their own isolated environment and puts them on your PATH. Upgrade later with `pipx upgrade pdksetup` (or `pip install -U pdksetup`).
50
+
51
+ **Development:** clone the repo, then run `pip install -e ".[dev]"` and `pytest`.
52
+
53
+ **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 nine (seven fabricatable plus two simulation-only).
50
54
 
51
55
  ---
52
56
 
@@ -160,26 +164,29 @@ These are flagged `SIMULATION` in `pdk status`. They're **excluded** from `pdk i
160
164
  - **Maintainer:** Arizona State University with Arm Research (PDK); install recipe by [IIC-OSIC-TOOLS](https://github.com/iic-jku/IIC-OSIC-TOOLS) (JKU)
161
165
  - **Runtime tools:** ngspice (≥ 44), Xyce, klayout, openroad, yosys
162
166
  - **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.
167
+ - **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) in all four threshold flavours: RVT, LVT, SLVT and SRAM, where "SRAM" is ASAP7's high-threshold transistor flavour, not memory; KLayout tech, DRC and LVS; LibreLane, xschem and pygmid setup.
164
168
  - **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
169
  - **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
170
  - **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
171
  - **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.
172
+ - **Check your install:** [`examples/asap7_nmos_check.sp`](https://github.com/levantlabs/pdksetup/blob/main/examples/asap7_nmos_check.sp) simulates one `nmos_rvt` and should print 37.8 µA per fin, against 37.85 µA in the ASAP7 paper. It exercises the whole chain: models, ngspice version, and the compiled BSIM-CMG plugin.
173
+
174
+ ```bash
175
+ mkdir -p ~/sim/asap7 && cd ~/sim/asap7
176
+ ln -s "$PDK_ROOT/asap7/libs.tech/ngspice/.spiceinit" .
177
+ curl -sLO https://raw.githubusercontent.com/levantlabs/pdksetup/main/examples/asap7_nmos_check.sp
178
+ ngspice -b asap7_nmos_check.sp # expect: -i(vd)/3 = 3.780159e-05
179
+ ```
180
+
181
+ "Could not find library file asap7.lib" means the `.spiceinit` isn't in the current directory or `$HOME`. An error loading the OSDI plugin usually means ngspice is older than 44.
168
182
  - **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/).
183
+ - **Not included:** the 6-track library (`asap7sc6t_26`), the SRAM memory macros (`asap7_sram_0p0`), CCS Liberty files, and the Calibre decks (not redistributable; available from ASU at http://asap.asu.edu/asap/).
170
184
  - **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
185
  - **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
186
 
173
187
  <a id="asap7-licences"></a>
174
188
  **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
189
 
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
190
  #### FreePDK45 — 45nm Bulk CMOS predictive 🧪 SIMULATION
184
191
  - **Source:** https://github.com/mflowgen/freepdk-45nm
185
192
  - **Maintainer:** mflowgen repackage of NCSU FreePDK45
@@ -209,7 +216,7 @@ Install a PDK, or install many with `--all`.
209
216
 
210
217
  | Option | Description |
211
218
  |---|---|
212
- | `--all` | Install every **fabricatable** PDK in the registry. Simulation-only PDKs (ASAP7, ASAP5, FreePDK45) are excluded unless `--include-simulation` is also passed |
219
+ | `--all` | Install every **fabricatable** PDK in the registry. Simulation-only PDKs (ASAP7, FreePDK45) are excluded unless `--include-simulation` is also passed |
213
220
  | `--skip-experimental` | With `--all`, skip SKY90FD and ICsprout 55nm |
214
221
  | `--include-simulation` | With `--all`, also install simulation-only PDKs |
215
222
  | `--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 |
@@ -222,7 +229,7 @@ pdk install sky130 --version 0.0.486 # pin a version (volare)
222
229
  pdk install asap7 --version next_release # asap7 from the IIC branch head
223
230
  pdk install --all # all fabricatable PDKs (7 total)
224
231
  pdk install --all --skip-experimental # stable fabricatable only
225
- pdk install --all --include-simulation # fabricatable + ASAP7/ASAP5/FreePDK45
232
+ pdk install --all --include-simulation # fabricatable + ASAP7/FreePDK45
226
233
  pdk install --all --skip-experimental --include-simulation # stable fab + simulation
227
234
  pdk install sky130 --pdk-root /opt/pdks # install into a different root
228
235
  ```
@@ -243,7 +250,7 @@ Volare-managed PDKs (sky130, gf180mcu) are refused — volare owns those files;
243
250
  Show installation status for every known PDK, or for one specific PDK. Experimental PDKs are flagged in a separate column.
244
251
 
245
252
  ```bash
246
- pdk status # table of all 10 PDKs (fabricatable + simulation)
253
+ pdk status # table of all 9 PDKs (fabricatable + simulation)
247
254
  pdk status sky130 # just one row
248
255
  ```
249
256
 
@@ -324,7 +331,7 @@ pdk config show --config /opt/pdks/mypdk.toml
324
331
  pdk config set pdk_root /opt/pdks --config /opt/pdks/mypdk.toml
325
332
  ```
326
333
 
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.
334
+ An annotated starting template lives at [`examples/config.toml`](https://github.com/levantlabs/pdksetup/blob/main/examples/config.toml). It documents every supported key and is safe to copy anywhere on disk.
328
335
 
329
336
  If you want the custom file to be picked up *without* typing `--config` every time, the cleanest options are:
330
337
 
@@ -376,13 +383,13 @@ Fabricatable PDKs:
376
383
 
377
384
  Simulation-only PDKs:
378
385
 
379
- | Tool | asap7 | asap5 | freepdk45 |
380
- |---|---|---|---|
381
- | KLayout | ✓ | ✓ | ✓ |
382
- | ngspice | ✓ (≥ 44) | — | ✓ |
383
- | Xyce | ✓ | — | — |
384
- | OpenROAD | ✓ (primary) | ✓ (primary) | ✓ |
385
- | Yosys | ✓ | ✓ | ✓ |
386
+ | Tool | asap7 | freepdk45 |
387
+ |---|---|---|
388
+ | KLayout | ✓ | ✓ |
389
+ | ngspice | ✓ (≥ 44) | ✓ |
390
+ | Xyce | ✓ | — |
391
+ | OpenROAD | ✓ (primary) | ✓ |
392
+ | Yosys | ✓ | ✓ |
386
393
 
387
394
  ---
388
395
 
@@ -21,5 +21,6 @@ pdksetup/installers/volare.py
21
21
  tests/test_cli.py
22
22
  tests/test_config.py
23
23
  tests/test_registry.py
24
+ tests/test_scan_release.py
24
25
  tests/test_state.py
25
26
  tests/test_updater.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pdksetup"
7
- version = "0.3.0"
7
+ version = "0.3.2"
8
8
  description = "CLI for installing and managing open-source Process Design Kits (PDKs) for IC design"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -50,5 +50,10 @@ Issues = "https://github.com/levantlabs/pdksetup/issues"
50
50
  [project.scripts]
51
51
  pdk = "pdksetup.cli:main"
52
52
 
53
+ # Name the package explicitly: automatic discovery refuses to build when other
54
+ # top-level directories (e.g. a local PDK test root) sit next to pdksetup/.
55
+ [tool.setuptools.packages.find]
56
+ include = ["pdksetup*"]
57
+
53
58
  [tool.pytest.ini_options]
54
59
  testpaths = ["tests"]
@@ -802,7 +802,6 @@ def test_install_all_excludes_simulation_by_default(mocker, tmp_path):
802
802
  c.args[0] for c in mock_custom.return_value.install.call_args_list
803
803
  ]
804
804
  assert "asap7" not in installed_custom
805
- assert "asap5" not in installed_custom
806
805
  assert "freepdk45" not in installed_custom
807
806
  # fabricatable customs still go through
808
807
  assert "icps_minifab" in installed_custom
@@ -827,7 +826,6 @@ def test_install_all_with_include_simulation_includes_sim_pdks(mocker, tmp_path)
827
826
  ]
828
827
  installed_iic = [c.args[0] for c in mock_iic.return_value.install.call_args_list]
829
828
  assert "asap7" in installed_iic
830
- assert "asap5" in installed_custom
831
829
  assert "freepdk45" in installed_custom
832
830
 
833
831
 
@@ -843,7 +841,7 @@ def test_status_flags_simulation_pdks(mocker, tmp_path):
843
841
 
844
842
 
845
843
  def test_install_single_simulation_pdk_works_without_flag(mocker, tmp_path):
846
- """`pdk install asap5` (single arg) should work — the flag only gates --all."""
844
+ """`pdk install freepdk45` (single arg) should work — the flag only gates --all."""
847
845
  mocker.patch(
848
846
  "pdksetup.cli.Config.load",
849
847
  return_value=mocker.Mock(pdk_root=tmp_path, volare_root=tmp_path / ".volare"),
@@ -851,7 +849,7 @@ def test_install_single_simulation_pdk_works_without_flag(mocker, tmp_path):
851
849
  mock_custom = mocker.patch("pdksetup.cli.CustomInstaller")
852
850
  mocker.patch("pdksetup.cli.State")
853
851
  mock_custom.return_value.install.return_value = "sha"
854
- result = CliRunner().invoke(main, ["install", "asap5"])
852
+ result = CliRunner().invoke(main, ["install", "freepdk45"])
855
853
  assert result.exit_code == 0, result.output
856
854
  assert mock_custom.return_value.install.called
857
855
 
@@ -5,7 +5,7 @@ FABRICATABLE = {
5
5
  "sky130", "gf180mcu", "ihp_sg13g2",
6
6
  "sky90fd", "icsprout55", "icps_minifab", "siepic_ebeam",
7
7
  }
8
- SIMULATION_ONLY = {"asap7", "asap5", "freepdk45"}
8
+ SIMULATION_ONLY = {"asap7", "freepdk45"}
9
9
 
10
10
 
11
11
  def test_registry_has_all_fabricatable_pdks():
@@ -49,7 +49,6 @@ def test_install_strategies():
49
49
  "icsprout55",
50
50
  "icps_minifab",
51
51
  "siepic_ebeam",
52
- "asap5",
53
52
  "freepdk45",
54
53
  ):
55
54
  assert by_name[name].install_strategy == "custom"
@@ -200,3 +199,9 @@ def test_osdi_pdks_require_ngspice_44():
200
199
  for name in ("ihp_sg13g2", "asap7"):
201
200
  mins = {tool: v for tool, v, _ in by_name[name].runtime_tool_min_versions}
202
201
  assert mins.get("ngspice") == 44, name
202
+
203
+
204
+ def test_asap5_is_not_offered():
205
+ """Removed in 0.3.2: its upstream is unmaintained, it has no open layout
206
+ views, and the registry URL never existed (so no install could succeed)."""
207
+ assert "asap5" not in {p.name for p in REGISTRY}
@@ -0,0 +1,182 @@
1
+ """Tests for scripts/scan_release.py, run as a subprocess on throwaway repos.
2
+
3
+ The scanner is copied out of this repo for each test so it never falls back to
4
+ the maintainer's private .release-remote. Sensitive-looking strings are built
5
+ at runtime so this file itself passes the real scan.
6
+ """
7
+ import shutil
8
+ import subprocess
9
+ import sys
10
+ from pathlib import Path
11
+
12
+ import pytest
13
+
14
+ SCANNER = Path(__file__).resolve().parents[1] / "scripts" / "scan_release.py"
15
+ IDENTITY = "Test Person <tester@example.com>"
16
+ HOME_PATH = "/ho" + "me/alice"
17
+ EMAIL = "alice" + "@" + "corp.com"
18
+ TOKEN = "gh" + "p_" + "a" * 30
19
+ AI_TRAILER = "Co-Authored" + "-By: Claude <noreply" + "@" + "anthropic.com>"
20
+
21
+
22
+ def _git(repo: Path, *args: str, env=None) -> str:
23
+ return subprocess.run(
24
+ ["git", "-C", str(repo), "-c", "commit.gpgsign=false", "-c", "tag.gpgsign=false", *args],
25
+ capture_output=True, text=True, check=True, env=env,
26
+ ).stdout
27
+
28
+
29
+ @pytest.fixture
30
+ def tool(tmp_path):
31
+ """A private copy of the scanner, outside any repo with a .release-remote."""
32
+ dest = tmp_path / "tool" / "scripts" / "scan_release.py"
33
+ dest.parent.mkdir(parents=True)
34
+ shutil.copy(SCANNER, dest)
35
+ return dest
36
+
37
+
38
+ @pytest.fixture
39
+ def repo(tmp_path):
40
+ r = tmp_path / "repo"
41
+ r.mkdir()
42
+ _git(r, "init", "-q", "-b", "main")
43
+ _git(r, "config", "user.name", "Test Person")
44
+ _git(r, "config", "user.email", "tester@example.com")
45
+ (r / "README.md").write_text("A clean project.\n")
46
+ _git(r, "add", "-A")
47
+ _git(r, "commit", "-q", "-m", "init")
48
+ return r
49
+
50
+
51
+ def _commit(repo: Path, message: str, files: dict[str, str] | None = None, env=None) -> str:
52
+ for name, text in (files or {"change.txt": message}).items():
53
+ (repo / name).write_text(text)
54
+ _git(repo, "add", "-A")
55
+ _git(repo, "commit", "-q", "-m", message, env=env)
56
+ return _git(repo, "rev-parse", "HEAD").strip()
57
+
58
+
59
+ def _scan(tool, root, *args, names="zebracorp", identities=IDENTITY, monkeypatch=None):
60
+ env = {"PATH": "/usr/bin:/bin", "HOME": str(root.parent)}
61
+ if names is not None:
62
+ env["RELEASE_PRIVATE_NAMES"] = names
63
+ if identities is not None:
64
+ env["RELEASE_IDENTITIES"] = identities
65
+ proc = subprocess.run([sys.executable, "-I", str(tool), str(root), *args],
66
+ capture_output=True, text=True, env=env, check=False)
67
+ return proc.returncode, proc.stdout
68
+
69
+
70
+ def test_clean_repo_passes(tool, repo):
71
+ assert _scan(tool, repo, "--history")[0] == 0
72
+
73
+
74
+ def test_unarmed_without_private_names_refuses(tool, repo):
75
+ code, out = _scan(tool, repo, names=None)
76
+ assert code == 3 and "UNARMED" in out
77
+
78
+
79
+ def test_explicitly_empty_list_arms(tool, repo):
80
+ assert _scan(tool, repo, names="")[0] == 0
81
+
82
+
83
+ def test_private_name_is_found_but_never_printed(tool, repo):
84
+ _commit(repo, "docs", {"notes.md": "see the ZebraCorp cluster\n"})
85
+ code, out = _scan(tool, repo)
86
+ assert code == 1
87
+ assert "notes.md:1: private-name" in out
88
+ assert "zebracorp" not in out.lower()
89
+
90
+
91
+ @pytest.mark.parametrize("text,rule", [
92
+ (HOME_PATH + "/pdk", "home-path"),
93
+ ("contact " + EMAIL, "email"),
94
+ ("token=" + TOKEN, "access-token"),
95
+ ("built from a session at claude" + ".ai/code/x", "ai-attribution"),
96
+ ])
97
+ def test_secrets_and_identity_shapes_are_found_without_echo(tool, repo, text, rule):
98
+ _commit(repo, "add", {"f.txt": text + "\n"})
99
+ code, out = _scan(tool, repo)
100
+ assert code == 1 and f"f.txt:1: {rule}" in out
101
+ assert TOKEN not in out and EMAIL not in out
102
+
103
+
104
+ def test_public_project_data_is_allowlisted(tool, repo):
105
+ _commit(repo, "meta", {"f.txt": "info" + "@levant-labs.com\n/ho" + "me/you/pdk\n"
106
+ "https://github.com/levantlabs/pdksetup\n"})
107
+ assert _scan(tool, repo)[0] == 0
108
+
109
+
110
+ def test_tracked_private_config_is_refused(tool, repo):
111
+ _commit(repo, "oops", {".release-remote": 'RELEASE_PRIVATE_NAMES="x"\n'})
112
+ code, out = _scan(tool, repo, names=None, identities=None)
113
+ assert code == 2 and "untracked and gitignored" in out
114
+
115
+
116
+ def test_gitignored_private_config_is_read(tool, repo):
117
+ _commit(repo, "ignore", {".gitignore": ".release-remote\n"})
118
+ (repo / ".release-remote").write_text('RELEASE_PRIVATE_NAMES="zebracorp"\n')
119
+ _commit(repo, "docs", {"notes.md": "zebracorp\n"})
120
+ code, out = _scan(tool, repo, names=None, identities=None)
121
+ assert code == 1 and "private-name" in out
122
+
123
+
124
+ def test_history_finds_what_the_tree_no_longer_has(tool, repo):
125
+ _commit(repo, "add", {"f.txt": HOME_PATH + "\n"})
126
+ _commit(repo, "remove", {"f.txt": "clean\n"})
127
+ assert _scan(tool, repo)[0] == 0
128
+ code, out = _scan(tool, repo, "--history")
129
+ assert code == 1 and "home-path" in out
130
+
131
+
132
+ def test_new_ai_trailer_fails_but_historical_one_is_exempt(tool, repo):
133
+ old = _commit(repo, "old work\n\n" + AI_TRAILER, {"a.txt": "a"})
134
+ tool.write_text(tool.read_text().replace(
135
+ "HISTORICAL_CUTOFF = '", f"HISTORICAL_CUTOFF = '{old}' # was '"))
136
+ assert _scan(tool, repo, "--history")[0] == 0
137
+
138
+ new = _commit(repo, "new work\n\n" + AI_TRAILER, {"b.txt": "b"})
139
+ code, out = _scan(tool, repo, "--history")
140
+ assert code == 1
141
+ assert f"{new[:12]} [commit]:" in out and "ai-attribution" in out
142
+ assert old[:12] not in out
143
+
144
+
145
+ def test_human_squash_merge_coauthor_is_allowed(tool, repo):
146
+ _commit(repo, "feature\n\nCo-authored-by: Pat <12345+pat@users.noreply.github.com>", {"c.txt": "c"})
147
+ assert _scan(tool, repo, "--history")[0] == 0
148
+
149
+
150
+ def test_identity_outside_allowlist_is_found(tool, repo):
151
+ import os
152
+ env = {**os.environ, "GIT_AUTHOR_NAME": "Someone", "GIT_AUTHOR_EMAIL": "s@example.org"}
153
+ _commit(repo, "x", env=env)
154
+ code, out = _scan(tool, repo, "--history")
155
+ assert code == 1 and "author outside allowlist" in out
156
+
157
+
158
+ def test_github_web_merge_committer_is_allowed(tool, repo):
159
+ import os
160
+ env = {**os.environ, "GIT_COMMITTER_NAME": "GitHub", "GIT_COMMITTER_EMAIL": "noreply@github.com"}
161
+ _commit(repo, "merged in the web UI", env=env)
162
+ assert _scan(tool, repo, "--history")[0] == 0
163
+
164
+
165
+ def test_history_without_identities_is_refused(tool, repo):
166
+ code, out = _scan(tool, repo, "--history", identities=None)
167
+ assert code == 2 and "RELEASE_IDENTITIES" in out
168
+
169
+
170
+ def test_history_ignores_local_only_branches(tool, repo):
171
+ _git(repo, "checkout", "-q", "-b", "scratch")
172
+ _commit(repo, "local only", {"f.txt": HOME_PATH + "\n"})
173
+ _git(repo, "checkout", "-q", "main")
174
+ assert _scan(tool, repo, "--history")[0] == 0
175
+
176
+
177
+ def test_plain_directory_is_scanned_like_an_unpacked_dist(tool, tmp_path):
178
+ d = tmp_path / "unpacked" / "pkg-1.0"
179
+ d.mkdir(parents=True)
180
+ (d / "PKG-INFO").write_text("Author-email: " + EMAIL + "\n")
181
+ code, out = _scan(tool, tmp_path / "unpacked")
182
+ assert code == 1 and "pkg-1.0/PKG-INFO:1: email" in out
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes