code wiki / _hdl_build / nx_alu_divider_test.nx
nx_alu_divider_test.nx
buildroot/runtime/_hdl_build/nx_alu_divider_test.nx
about
nx_alu_divider_test.nx -- proves the SYNTHESIZED divider gate-network computes
division 1:1 vs behavioral a/b + a%b (the invention engine's first hardware
invention; replaces the SIL-1 DIV-as-ADD stub with a VERIFIED-correct network).
Synthesizes an 8-stage restoring divider, then sims it over 4 vectors and
asserts quotient == a/b AND remainder == a%b for each. Known answer (FAIL
LOUD): "28 4 11 1 17 0 7 2 " = q,r for 200/7, 100/9, 255/15, 37/5.
dependencies 1 imports · 0 importers
imports: nx_alu_divider.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
| 11 | func _emit_num(v: i64) -> i64 called by 1: _check |
| 19 | func _nl() -> i64 { let z: *u8 = sys_mmap(2); z[0] = 10; sys_write(1, z, 1); return 0 } called by 1: main |
| 23 | func _check(g: *NxGsim, quo_net: i64, rem_net: i64, a: i64, b: i64) -> i64 |
| 35 | func main() -> i64 |