code wiki / _hdl_build / nx_pcb_twin.nx

nx_pcb_twin.nx

buildroot/runtime/_hdl_build/nx_pcb_twin.nx

2056 B33 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic pcb
docsdependenciesstructsconstsfunctions

about

nx_pcb_twin.nx -- LIB: PCB electrical DIGITAL TWIN. The routed board doesn't just have a topology -- it behaves like a REAL board EXACTLY: real units (mils, oz copper, mA) and real copper physics, in EXACT no-float fixed-point. A trace's RESISTANCE / VOLTAGE-DROP / POWER are computed from the standard copper sheet resistance and pinned to the textbook value (a 10-mil-wide, 1-oz, 1-inch trace = 49.1 mOhm), so the model is provably a twin of reality, not an abstraction. S-class exceed angle: DETERMINISTIC + EXACT (integer; float EDA tools round). Composes the ACTUAL routed geometry from nx_pcb_autoroute (trace length = hops x grid pitch). Games/movies later are a LOOSENED mode on this exact engineering core -- never the reverse. never-brick #26: pure arithmetic, guarded against divide-by-zero, deterministic. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_pcb_twin.nx nx_pcb_twin_gate.nx

imports: nx_syscalls.nx

imported by: nx_pcb_twin_gate.nx

structs

none

consts

10const RSHEET_MAGIC_1000000: i64 = 1000000
14const RSHEET_1OZ_UOHM: i64 = 491

functions

18func twin_resistance_uohm(hops: i64, pitch_mils: i64, width_mils: i64, oz: i64) -> i64
called by 1: main
26func twin_vdrop_uv(r_uohm: i64, i_ma: i64) -> i64
called by 1: main
31func twin_power_uw(r_uohm: i64, i_ma: i64) -> i64
called by 1: main