code wiki / _hdl_build / nx_pcb_drc.nx

nx_pcb_drc.nx

buildroot/runtime/_hdl_build/nx_pcb_drc.nx

2294 B43 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic pcb
docsdependenciesstructsconstsfunctions

about

nx_pcb_drc.nx -- LIB: PCB design-rule-check DIGITAL TWIN. Verifies a routed board against REAL fabrication rules in REAL units (mils) -- a twin of the fab's own DRC, so "passes DRC" means "really manufacturable at this fab class". Rules (data-driven, rule #11): min copper-to-copper CLEARANCE and min trace WIDTH. A standard 2-layer fab is 6/6 mil; advanced is 4/4. The edge-to-edge gap between two orthogonally-adjacent traces is (pitch - trace_width) mils; if that is below the clearance rule the board shorts/bridges in real fab -> a violation. A trace narrower than the width rule can't be etched reliably -> a violation. Composes the routed grid from nx_pcb_autoroute. never-brick #26: pure arithmetic, bounded, deterministic. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_pcb_drc.nx nx_pcb_drc_gate.nx

imports: nx_syscalls.nx

imported by: nx_pcb_drc_gate.nx

structs

none

consts

11const FAB_STD_CLEAR_MIL: i64 = 6
12const FAB_STD_WIDTH_MIL: i64 = 6

functions

16func drc_check(usedby: *i64, W: i64, H: i64, pitch_mils: i64, tw_mils: i64, min_clear_mils: i64, min_width_mils: i64) -> i64
called by 1: main