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
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
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
structs
| none |
consts
| 10 | const RDWT_LCG_A: i64 = 6364136223846793005 |
| 11 | const RDWT_LCG_C: i64 = 1442695040888963407 |
functions
| 13 | func _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 |
| 14 | func _emit_dec(v: i64) -> i64 called by 1: main |
| 24 | func rdwt_restoring(N: i64, D: i64, W: i64) -> i64 called by 1: rdwt_sweep |
| 36 | func rdwt_run(g: *NxGsim, qnet: i64, rnet: i64, N: i64, D: i64, r_out: *i64) -> i64 |
| 45 | func rdwt_sweep(W: i64, nrand: i64) -> i64 |
| 118 | func main() -> i64 |