code wiki / _hdl_build / nx_v128_gate.nx

nx_v128_gate.nx

buildroot/runtime/_hdl_build/nx_v128_gate.nx

8799 B164 linesdepth 3pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_v128_gate.nx -- F618 STANDING SIMD GATE, POST-FLIP FORM (2026-07-21): proves the v128 SAD path BIT-EXACT vs a pure-scalar reference, mechanically, through the SHARED pipeline (nx_compile_wat -> nx_wat_compiler -> nx_wasm_vm, all carrying the F618 SIMD flip), against the NATIVE authority. Teeth: T1 native reference-equivalence: pvr_* (pre-flip scalar copies) == vm_* natively (the flip did not change a single native result) T2 VM scalar sweep == native (the pipeline lowers the pure-SCALAR reference faithfully) T3 VM SIMD sweep == native (THE CLAIM: real v128 opcodes interpreted == scalar ground truth) T4 micro 16-byte SAD at an UNALIGNED address: VM simd == VM ref == native T5 non-vacuity: the wasm MUST contain 0xFD 0x73 (i8x16.sub_sat_u) sequences -- a stale or scalar-pipeline build cannot fake GREEN (doubles as /tmp-staleness detection) T6 NEGATIVE CONTROL: corrupt ONE frame byte in VM memory -> the simd sweep checksum MUST move usage: build the two STOCK pipeline elfs (nx_sov_build_run nx_compile_wat / nx_wat_compiler --build-only) + this gate, then run /tmp/nx_v128_gate.sov.elf license_tier: ORIGINAL

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_wasm_vm.nx nx_v128_probe.nx nx_gate_verdict.nx nx_v128_gate.nx

imports: nx_syscalls.nxnx_wasm_vm.nxnx_v128_probe.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main vw sys_write vrun_elf sys_fork sys_mmap sys_execve sys_exit sys_wait4 sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit ↻ vn sys_mmap ↻ sys_write ↻ pv_fill pv_sweep_scalar pv_search_k sys_mmap ↻ pv_try_k pvr_sad_capped vm_sad_capped v128_sad16 pvr_sad pvr_sad_capped ↻ pv_sweep_simd pv_search_k ↻ vm_sad v128_sad16 ↻ vm_sad_capped ↻ wm_new sys_mmap ↻ wm_parse sys_mmap ↻ wv_u8

structs

none

consts

30const VCWAT: *u8 = "nx_compile_wat.elf"
31const VWATC: *u8 = "nx_wat_compiler.elf"
32const VSRC: *u8 = "buildroot/runtime/_hdl_build/nx_v128_probe.nx"
33const VWAT: *u8 = "/tmp/nx_v128_probe.wat"
34const VWASM: *u8 = "/tmp/nx_v128_probe.wasm"

functions

36func vw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
37func vn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
42func vrun_elf(elf: *u8, a1: *u8, a2: *u8) -> i64
60func main() -> i64