RustRCX Architecture¶
RustRCX is a clean-room, pure-Rust (edition = "2024", rust-version = "1.100", #![deny(unsafe_code)]) parasitic extraction and electromagnetic field-solver suite shared across RustEDA, RustROAD, and RustLayout.
Crate Topology¶
┌─────────────────────────────────────────┐
│ rustrcx-cli (rustrcx bin) │
└───────────────────┬─────────────────────┘
│
┌───────────────────▼─────────────────────┐
│ rustrcx-solver │
│ 3D FD Laplace · 3D BEM · Hybrid · │
│ TICER · Y(jω) Verifier │
└───────────────────┬─────────────────────┘
│
┌───────────────────▼─────────────────────┐
│ rustrcx-gds │
│ GDSII/.gds.gz · Boolean · Devices · │
│ Shielded 2.5D Cap · 2D FVM Sheet R │
└───────┬───────────┬───────────┬─────────┘
│ │ │
┌────────────────▼─┐ ┌──────▼───────┐ ┌▼──────────────────┐
│ rustrcx-core │ │rustrcx-profile│ │ rustrcx-formats │
│ 2.5D Strip Engine│ │SKY130/SG13G2/ │ │ IEEE 1481 SPEF · │
│ PassiveInstance │ │GF180 min/nom/ │ │ SPICE PEX · │
│ Local Inspector │ │max + Tech/LEF │ │ overlay.v1 JSON │
└────────▲─────────┘ └──────▲───────┘ └▲─────────▲────────┘
│ │ │ │
┌─────────────┴───────────────────┼───────────┴─┐ ┌─┴──────────────┐
│ modules/RustROAD │ │ │modules/RustLayout
│ (zero-copy PassiveInstance │ │ │(LayoutDb -> PEX│
│ + streamed SPEF for RustSTA) │ │ │ CLI + GUI tab) │
└─────────────────────────────────┘ └─────┴────────────────┘
Shared Submodule Boundary¶
modules/RustROADdepends strictly onrustrcx-coreandrustrcx-formats, connecting its macro/stdcell obstacle database via a zero-copyPassiveInstanceSourceadapter without duplicating a single line of strip extraction or SPEF serialization code.modules/RustLayoutbridges its hierarchical spatialLayoutDb(supporting.gds,.gds.gz,.oas, and zero-copy.rlay) directly intorustrcx_gds::FlattenedLayoutwith zero disk re-parsing, powering bothrustlayout pexCLI extraction and the interactiveParasiticsdock panel (with click-to-zoom net & coupling hotspot highlighting).modules/RustRCXhas zero upward dependencies onRustROAD,RustLayout, orRustEDAapp crates, enabling standalone CLI usage, independent versioning, and clean CI testing.
Core Algorithms¶
1. Exact Integer-DBU Geometry & Connectivity (rustrcx-gds)¶
- GDSII Reader & Flattener: Pure-Rust
.gds/.gds.gzparser with exactD4transforms, boundedAREFexpansion, DAG cycle detection, and hierarchical blackboxing (--cut CELL[=PREFIX]). - Spatial-Grid Connected-Component Boolean Algebra (
poly.rs):union_rects(OR),intersect_rects(AND), andsubtract_rect_sets(DIFF) partition shapes via an adaptive 2D spatial grid so non-overlapping shapes pass through inO(1)while overlapping clusters solve in parallel via exactO((M + K) log M)BTreeMapscanlines. - Exposed Boundary-Edge Extraction: Cancels internal abutting seams between co-net rectangles so perimeter, fringe, and sidewall capacitance never double-counts interior edges.
- Device Recognition: Splits
diff \ gatebefore net connectivity so MOSFET source and drain remain distinct nets, recognizing LV/HV NMOS/PMOS (exactW,L,AS,AD,PS,PD,NF, bulk), MIM capacitors (XCMIM), and poly resistors (RPOLY), while excluding intrinsic MOSFET gate oxide (Cox/CGSO/CGDO) and MIM plate overlap from extrinsic PEX double-counting.
2. Multi-Layer Shielded 2.5D Capacitance (pex25d.rs)¶
- Chunk-parallelized per-layer extraction across all logical cores with deterministic reduction.
- Exact multi-layer vertical shielding (
subtract_rectsfromli - 1down to0). - Intrinsic MOSFET channel subtraction (
poly \ gate_rects) andNWellsubstrate attribution for field poly. - Nearest-neighbor 1D lateral sidewall visibility sweep with smooth exponential fringe screening, upper/lower sideoverlap, diagonal coupling (
DIAGUNDER), and via cut capacitance.
3. 2D Finite-Volume Sheet Resistance (fvm_res.rs)¶
- Multi-Cut Via Array Clustering: Groups parallel via cuts between the same
(net, via_layer, lower_island, upper_island)within local array pitch into a single equivalent parallel resistorR_via / N_cuts. - Arbitrary-Polygon 2D FVM Schur Complement: Solves
∇ · (σ ∇V) = 0on rectilinear subgrids via diagonally preconditioned CG (solve_pcg) and computes exact port-to-port conductanceG_eff = G_pp − G_pi G_ii⁻¹ G_ip, capturing L/T/U corner rounding (validated against the analytical~0.559 sq90° corner factor). - Max-Conductance Spanning Forest + Bypass Pruning: Guarantees full terminal connectivity while pruning non-physical floating-point noise bypasses (
< 1%of port max conductance).
4. Native 3D Electrostatic Field Solvers (rustrcx-solver)¶
- 3D Layered-Dielectric Finite-Volume Laplace (
fd3d.rs): Solves∇ · (ε(z) ∇φ) = 0on a geometrically graded 3D rectilinear grid strictly aligned with every conductor face and dielectric stratum boundary, in parallel across net excitations via Rayon. Achieves< 1e-7 fFMaxwell symmetry and< 1e-6agreement against analytical multi-dielectric parallel-plate theory. - 3D Boundary Element Method (
bem3d.rs): Solves the first-kind single-layer boundary integral equation using the analytical Hess-Smith rectangular panel potential integral, ground-plane method of images, and restarted GMRES (validated to< 2%on the classical unit-cube free-space benchmark0.660678). - Worklist TICER Reduction &
Y(jω)Verification (reduce.rs,admittance.rs):O(N)degree-guarded (deg ≤ 4) Sheehan TICER reduction preserving every port/device terminal, DC conductance, and total capacitance, paired with complex Schur-complementY(jω) = G + jωCmulti-frequency Frobenius-norm error verification.
Multi-Corner PDK Support (rustrcx-profile)¶
Built-in foundry-calibrated stacks for SKY130A, IHP SG13G2, and GF180MCU D across min, nom, and max corners, plus live parsers for Magic .tech / -extract.tech (including blanket placeholder contact detection for GF180MCU), OpenRCX .rules (WIDTH Table, DIAGUNDER, RESOVER), Tech LEF, and rustroad.rc-profile.v1.