code wiki / _hdl_build / nx_alu_emit_text_test.nx
nx_alu_emit_text_test.nx
buildroot/runtime/_hdl_build/nx_alu_emit_text_test.nx
about
nx_alu_emit_text_test.nx -- SOVEREIGN gate (NishiLang verdict, no shell/grep):
drives the SHIPPING .nxgate emitter (nx_emit_alu_gates) and SELF-VERIFIES that
the emitted text carries the proven divider. The same builder the MEM verifier
proved at 21/7 runs here with a TEXT sink -> one source, two sinks.
A stub ALU emits ~28 MUX / ~2 SUB / ~1 LTU cells; the divider-wired ALU emits
4x64 of each. This test scans its OWN emitted buffer (no grep) and exits 0 IFF
the divider's signature is present + the .nxgate is structurally valid.
Verdict (exit code): 0 PROVEN; 1 MUX low; 2 SUB low; 3 LTU low; 4 no header;
5 no .END; 20 emit failed.
dependencies 1 imports · 0 importers
imports: synth_emit_alu_gates.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
| 14 | const NX_ALU_MAX_SIG: i64 = 8192 |
functions
| 17 | func _count_sub(buf: *u8, used: i64, pat: *u8) -> i64 called by 1: main |
| 35 | func _emit_cstr(s: *u8) -> i64 called by 1: main |
| 41 | func _emit_dec(v: i64) -> i64 called by 1: main |
| 55 | func main() -> i64 |