code wiki / _hdl_build / nx_levels_test.nx

nx_levels_test.nx

buildroot/runtime/_hdl_build/nx_levels_test.nx

5671 B100 linesdepth 4pulls 7 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

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

nx_mulchain.nx nx_superopt_emit.nx nx_engineer_crash.nx nx_boolsynth.nx nx_levels_test.nx

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

main lv_main lv_puts bl_find sys_mmap bl_enum bl_is_unary bl_eval bl_enum ↻ lv_booleval bl_eval ↻ lv_num lv_puts ↻ lv_mul_insns mulchain_find mc_abs mc_enum mc_avslot mc_abs ↻ mc_enum ↻ se_emit_full se_str se_num se_emit_synth so_is_shift se_str ↻ se_rn se_num ↻ se_slot_isreg se_slot se_str ↻ se_rn ↻ se_opmn lv_bwrite sys_openat_wr eng_link sys_mmap ↻ sys_fork sys_openat_wr ↻ sys_dup3

structs

none

consts

none

functions

16func 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 }
called by 2: lv_numlv_main
17func lv_num(v: i64) -> i64
called by 1: lv_main calls 1: lv_puts
26func 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 }
called by 1: lv_mul_insns calls 1: sys_openat_wr
27func lv_booleval(op: *i64, a: *i64, b: *i64, L: i64) -> i64
called by 1: lv_main calls 1: bl_eval
34func lv_mul_insns(c: i64, verified: *i64) -> i64
47func lv_main(r: *i64) -> i64
93func main() -> i64
calls 1: lv_main