Skip to content
lab-emiPublic

About

Clean-room, pure-Rust 2.5D/3D parasitic extraction engine and electrostatic field solver suite for RustEDA

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

RustRCX — 2.5D/3D RC extraction & field solvers

Clean-room, 100% pure-Rust 2.5D & 3D parasitic extraction engine and electrostatic field solver suite.
18–229× faster than Magic & KPEX · Native 3D FD Laplace & 3D BEM · 2D FVM sheet resistance · TICER + Y(jω) verification · Zero C/C++ FFI

Documentation · RustEDA Docs · RustEDA Suite · Benchmarks · Architecture · Apache-2.0

RustRCX pipeline: GDSII layouts and multi-corner PDK stacks feed polygon booleans, device recognition, 2.5D shielded capacitance, 3D FD/BEM field solvers, 2D FVM sheet resistance, and TICER reduction to emit SPICE, IEEE 1481 SPEF, and RustLayout overlays

Why RustRCX

Legacy open-source parasitic extraction flows chain fragile Tcl/Python wrappers around Magic, KLayout LVS, and external C++ FasterCap binaries—taking seconds per standard cell, hundreds of megabytes of RAM, and timing out on multi-ten-thousand-transistor SRAM macros while shipping nominal-only tables. RustRCX rebuilds the entire extraction stack from scratch in 100% pure Rust (#![deny(unsafe_code)], zero external runtime binaries) around exact integer-DBU geometry, parallel 2.5D/2D-FVM physics, and native 3D electrostatic field solvers:

  • 18–229× Faster & 6–67× Less RAM than Magic 8.3.703 & KPEX 0.10.0: Extracts real foundry standard cells across IHP SG13G2, SKY130A, and GF180MCU D in 6–19 ms (5–15 MiB peak RSS vs 248–979 ms in Magic and 1,482–2,687 ms / 385–409 MiB in KPEX). Extracts a full flattened 30,764-MOSFET, 209,472-shape dual-port SRAM macro (RM_IHPSG13_2P_64x22_c2) with 314,664 distributed FVM resistors in 7.61 s (vs 44.58 s C-only hierarchical in Magic and > 90 s timeout in KPEX).
  • Native 3D Field Solvers Built In (Zero External FasterCap): Includes a parallel 3D Layered-Dielectric Finite-Volume Laplace solver (3d-fd) achieving < 1e-6 analytical accuracy and 7.96e-8 fF Maxwell symmetry, plus a 3D Boundary Element Method solver (3d-bem) with Hess-Smith analytical rectangular panel integrals and method of images (13–20 ms on standard cells—14–74× faster than Magic/KPEX 2.5D).
  • Exact Device Physics & Arbitrary-Polygon 2D FVM Sheet Resistance: Splits diff \ poly before connectivity, recognizes LV/HV NMOS/PMOS (exact W/L/AS/AD/PS/PD matching Magic/KPEX), MIM capacitors, and poly resistors while eliminating intrinsic gate-oxide (Cox/CGSO/CGDO) and MIM plate double-counting. Solves $\nabla \cdot (\sigma \nabla V) = 0$ via Schur complement with exact L/T/U corner rounding (~0.559 sq) and parallel multi-cut via array clustering.
  • $O(N)$ TICER RC Reduction & Multi-Frequency $Y(j\omega)$ Verification: Degree-guarded Sheehan TICER reduction conserves DC conductance and total capacitance while verifying complex port admittance error $\le 1%$ across 1 MHz–10 GHz.
  • Three Open PDKs × Three Corners & Shared Across RustEDA: Built-in min/nom/max foundry stacks for SKY130A, IHP SG13G2, and GF180MCU D plus live Magic .tech, OpenRCX .rules, and Tech LEF overlays. Powers both RustROAD (zero-copy post-route 2.5D strip RC + streamed IEEE 1481 SPEF) and RustLayout (rustlayout pex CLI + interactive Parasitics dock panel with click-to-zoom hotspot highlighting across .gds, .gds.gz, .oas, and .rlay).

Verified Performance vs. Magic 8.3.703 & KPEX 0.10.0

All measurements come from reproducible black-box runs on real official foundry GDSII files on Apple M6 (12 cores, 32 GiB RAM) committed in benchmarks/results.json — see Benchmark Report for full accuracy tables, per-net parity, and fairness notes.

Benchmark (official foundry GDS) RustRCX 2.5D+FVM RustRCX 3D-BEM Magic 8.3.703 (C-only) KPEX 0.10.0 (2.5D RC) Speedup vs Magic / KPEX Peak RAM (RCX / Magic / KPEX)
IHP SG13G2 sg13g2_inv_1 7.9 ms¹ (3.4 ms int.) 13.1 ms 280.5 ms 1,814.0 ms 35× / 229× 6.1 / 62.5 / 408.3 MiB
IHP SG13G2 sg13g2_nand2_1 8.8 ms (2.6 ms int.) 17.5 ms 247.5 ms 1,724.5 ms 28× / 196× 6.3 / 62.6 / 407.6 MiB
IHP SG13G2 sg13g2_dfrbp_1 (34 FETs) 13.7 ms (7.6 ms int.) — 248.5 ms 2,687.2 ms 18× / 196× 7.9 / 62.6 / 408.8 MiB
SKY130A sky130_fd_sc_hd__inv_1 14.2 ms (8.7 ms int.) 20.1 ms 979.3 ms 1,481.8 ms 69× / 104× 13.8 / 94.3 / 385.0 MiB
SKY130A sky130_fd_sc_hd__dfxtp_1 (24 FETs) 19.3 ms (13.0 ms int.) — 977.4 ms 2,208.2 ms 51× / 114× 15.4 / 94.1 / 386.0 MiB
GF180MCU D gf180mcu_fd_sc_mcu7t5v0__inv_1 12.4 ms (6.4 ms int.) 16.8 ms 514.1 ms LVS error (1,131 ms) 41× / — 8.2 / 76.0 / 343.5 MiB
IHP SG13G2 rfcmim_30x15x10_full 6.2 ms (1.5 ms int.) — 465.8 ms — 75× / — 5.0 / 60.0 / — MiB
IHP SG13G2 RM_IHPSG13_2P_64x22_c2 (30,764 FETs) 7.61 s (314.7k R) — 44.58 s (hier. C) > 90 s timeout 5.9× / > 12× 1,099 / 186 / N/A MiB

¹ Warmed 5-run median (5.66–10.79 ms, median 7.92 ms); first uncached binary launch in results.json recorded 228.0 ms wall (3.44 ms internal) due to macOS initial code-signature verification.


Architecture & Crate Graph

Crate Responsibility
rustrcx-core Exact i64 DBU geometry, post-route 2.5D strip RC engine (PassiveInstanceSource zero-copy trait for RustROAD), and fast local bounding-box coupling hotspot inspector.
rustrcx-profile Foundry-calibrated min/nom/max ProcessStack presets (SKY130A, IHP SG13G2, GF180MCU D), Magic .tech parser (with GF180 placeholder guard), OpenRCX .rules parser, Tech LEF & rustroad.rc-profile.v1 binder.
rustrcx-formats Deterministic parallel streamed IEEE 1481 SPEF writer, SPICE PEX subcircuit writer (C/CC/R/RC/RCC), and rustrcx.overlay.v1 / rustrcx.extract.v1 JSON schemas.
rustrcx-gds Clean-room GDSII/.gds.gz reader & flattener (--cut), spatial-grid parallel polygon booleans, exposed-edge seam cancellation, connectivity, MOSFET/MIM/poly-R device extraction, shielded 2.5D capacitance, and 2D FVM Schur-complement sheet resistance.
rustrcx-solver Native 3D layered-dielectric finite-volume Laplace solver (fd3d), 3D Hess-Smith BEM solver (bem3d), hybrid 2.5D/3D orchestrator, $O(N)$ degree-guarded TICER reduction, and $Y(j\omega)$ admittance verifier.
rustrcx-cli Unified rustrcx single binary (extract-gds, solve3d, inspect-region, list-cells) with --json structured receipts.

See Architecture, Solvers & PDKs, and CLI & Integration Guide for full details.


Quick Start

# Build optimized release binary (Rust 1.100+, zero external runtime deps)
cargo build --release -p rustrcx-cli

# Full GDSII extraction -> SPICE + IEEE 1481 SPEF + RustLayout overlay JSON
./target/release/rustrcx extract-gds chip.gds \
  --cell sg13g2_inv_1 --pdk ihp-sg13g2 --corner nom \
  --engine 2.5d --mode rcc \
  --out-spice out.spice --out-spef out.spef --out-overlay overlay.json

# Native 3D layered-dielectric Laplace extraction + TICER reduction + 1 MHz–10 GHz Y(jw) check
./target/release/rustrcx extract-gds chip.gds \
  --cell sg13g2_inv_1 --pdk ihp-sg13g2 \
  --engine 3d-fd --mode rcc --reduce ticer --reduce-tau 1e-12 \
  --check-frequency-range 1e6,1e10 --json

# Standalone 3D Maxwell capacitance matrix (3D-FD or 3D-BEM)
./target/release/rustrcx solve3d chip.gds --cell sg13g2_inv_1 --pdk ihp-sg13g2 --engine 3d-bem --json

# Directly from RustLayout on .gds / .gds.gz / .oas / .rlay (or open the interactive Parasitics panel)
rustlayout pex chip.oas --pdk auto --engine hybrid --mode rcc --out-spice out.spice

Scope & Current Limits

  • Device coverage: Recognizes LV/HV NMOS and PMOS (with W, L, AS, AD, PS, PD, NF, bulk), MIM capacitors (XCMIM), and poly resistors (RPOLY). Bipolar transistors (BJT/HBT), spiral inductors, varactors, and full hierarchical LVS schematic-vs-layout comparison remain outside current scope.
  • 3D solver scaling: 3d-fd and 3d-bem target cell-, bus-, and critical-net-scale 3D structures (hybrid mode automatically applies 3d-fd to cells ≤ 64 nets and uses multi-core shielded 2.5d + 2D FVM for large SRAM/SoC macros).
  • Flattened SRAM RAM: On the 30,764-MOSFET RM_IHPSG13_2P_64x22_c2 macro, RustRCX extracts every transistor and 314,664 distributed FVM resistors flat in 7.61 s using 1,099 MiB RSS; Magic uses less RAM (186 MiB) by staying hierarchical and omitting extresist (44.58 s). Hierarchical subcell caching for repeated SRAM bitcells is planned for a future release.

License

Apache-2.0 — see LICENSE. External reference tools (Magic, KPEX, KLayout) and open PDK layouts retain their own licenses and are used strictly as black-box verification inputs.

About

Clean-room, pure-Rust 2.5D/3D parasitic extraction engine and electrostatic field solver suite for RustEDA

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages