code wiki / _hdl_build / nx_recip_div_w_test.nx

nx_recip_div_w_test.nx

buildroot/runtime/_hdl_build/nx_recip_div_w_test.nx

4513 B133 linesdepth 10pulls 10 transitivereach 0 importersview sourcekind gate/prooftopic recip
docsdependenciesstructsconstsfunctions

about

nx_recip_div_w_test.nx -- proves the WIDTH-PARAMETERIZED Goldschmidt generator (nx_recip_div_w) across multiple widths: W=20, 28, 30. (W=24 is the heavy anchor in nx_recip_div24_test, 2.3M vectors.) Each width is TRIANGULATED: gate-net (LEG A) vs an independent restoring divider (LEG B) vs the i64 oracle (LEG C), quotient AND remainder, over dense-small + random full-width + edges. Known answer: "W20=0 W28=0 W30=0" (mismatch counts), exit 0 iff all zero.

dependencies 1 imports · 0 importers

nx_recip_div_w.nx nx_recip_div_w_test.nx

imports: nx_recip_div_w.nx

imported by: nobody (leaf or entry point)

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

main rdwt_sweep nx_recip_div_w_synth div_const rdw_msb_synth div_const ↻ div_op2 div_op2 ↻ rdw_div17 div_const ↻ div_op2 ↻ div_mux nx_mul_wide_synth nx_sink_init_mem nx_mul_wide_sink nx_sink_const nx_hdl_wire nx_sink_cell nx_hdl_wire ↻ sys_mmap div_mux ↻ rdwt_run nx_gsim_run nx_gsim_kind_supported nx_gsim_eval_cell rdwt_restoring _emit_cstr _emit_dec

structs

none

consts

10const RDWT_LCG_A: i64 = 6364136223846793005
11const RDWT_LCG_C: i64 = 1442695040888963407

functions

13func _emit_cstr(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
14func _emit_dec(v: i64) -> i64
called by 1: main
24func rdwt_restoring(N: i64, D: i64, W: i64) -> i64
called by 1: rdwt_sweep
36func rdwt_run(g: *NxGsim, qnet: i64, rnet: i64, N: i64, D: i64, r_out: *i64) -> i64
called by 1: rdwt_sweep calls 1: nx_gsim_run
45func rdwt_sweep(W: i64, nrand: i64) -> i64
118func main() -> i64