code wiki / _hdl_build / nx_levels_test.nx
nx_levels_test.nx
buildroot/runtime/_hdl_build/nx_levels_test.nx
about
nx_levels_test.nx -- the stack from LEVEL 8 (hardware/gates) UP to LEVEL 0 (AI), each layer
gaining from the one below, the gains COMPOUNDING into a massive AI-level improvement. Every
lower layer is synthesized + verified by the team; the top layer (a quantized neural-net
scaling, the workhorse of inference) inherits the win.
L8 gates : minimal boolean gates (synthesized, exact-verified)
L6 ALU : full adder composed from those gates (verified to add)
L5 codegen: multiply-by-constant via lea/shift (1-cycle ops) instead of imul (3-cycle)
L0 AI : a quantized layer applies a constant scale to MILLIONS of activations -- the
per-op cycles the codegen saves multiply by the op count = the compounding gain.
dependencies 4 imports · 0 importers
imports: nx_mulchain.nxnx_superopt_emit.nxnx_engineer_crash.nxnx_boolsynth.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 lv_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 17 | func lv_num(v: i64) -> i64 |
| 26 | func lv_bwrite(path: *u8, buf: *u8, len: i64) -> i64 { let fd: i64 = sys_openat_wr(path, 0x1a4); if fd < 0 { return 0 - 1 } sys_write(fd, buf, len); sys_close(fd); return 0 } |
| 27 | func lv_booleval(op: *i64, a: *i64, b: *i64, L: i64) -> i64 |
| 34 | func lv_mul_insns(c: i64, verified: *i64) -> i64 |
| 47 | func lv_main(r: *i64) -> i64 |
| 93 | func main() -> i64 calls 1: lv_main |