code wiki / _hdl_build / nx_div_pick_test.nx
nx_div_pick_test.nx
buildroot/runtime/_hdl_build/nx_div_pick_test.nx
about
nx_div_pick_test.nx -- proves the hardware-adaptive divider picker selects the
OPTIMAL divider per target, reproducing the honest crossover BY MEASUREMENT
(not hardcoded). The Seed's "grow to the hardware" mechanism, gated.
From the proven honest latency race (nx_latency_metric_test):
W=16: r2=181 r4=139 Newton-shallow=166 Newton-deep=363 -> radix-4 optimal
W=64: r2=967 r4=743 Newton-shallow=320 Newton-deep=709 -> Newton optimal
So the picker must choose: W16 -> R4 (1) for BOTH multiplier models; W64 ->
NEWTON (2) for BOTH (shallow 320 and deep 709 both beat r4's 743). The sign-flip
R4->NEWTON across width IS the multiplicative-divider frontier, chosen optimally.
Known answer (FAIL LOUD): "1 1 2 2" rc=0 (p16_shallow p16_deep p64_shallow p64_deep).
dependencies 1 imports · 0 importers
imports: nx_div_pick.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
| none |
functions
| 16 | func _emit_num(v: i64) -> i64 called by 1: main |
| 24 | func _nl() -> i64 { let z: *u8 = sys_mmap(2); z[0] = 10; sys_write(1, z, 1); return 0 } called by 1: main |
| 26 | func main() -> i64 |