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

3503 B96 linesdepth 11pulls 13 transitivereach 0 importersview sourcekind gate/prooftopic alu
docsdependenciesstructsconstsfunctions

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

synth_emit_alu_gates.nx nx_alu_emit_text_test.nx

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

main nx_hdl_module_init nx_rv64im_alu_build nx_hdl_input nx_hdl_signal_alloc nx_hdl_kind_is_valid nx_hdl_width_is_valid nx_hdl_output nx_hdl_signal_alloc ↻ nx_synth_sink_init nx_emit_alu_gates nx_gate_emit_header nx_synth_emit_str nx_synth_emit_bytes sys_mmap nx_synth_sink_init ↻ nx_sink_init_text nx_alu_build_select nx_sink_const nx_hdl_wire nx_hdl_signal_alloc ↻ nx_div_synth_sink nx_sink_const ↻ nx_sink_cell nx_hdl_wire ↻ sys_mmap ↻ nx_alu_mulh_sink nx_mul_wide_sink nx_sink_const ↻ nx_sink_cell ↻ nx_sink_const ↻ nx_sink_cell ↻ nx_wdiv_u_sink nx_sink_const ↻ nx_sink_cell ↻ nx_div_synth_sink ↻ nx_sext32_sink nx_sink_const ↻ nx_sink_cell ↻ nx_wdiv_s_sink

structs

none

consts

14const NX_ALU_MAX_SIG: i64 = 8192

functions

17func _count_sub(buf: *u8, used: i64, pat: *u8) -> i64
called by 1: main
35func _emit_cstr(s: *u8) -> i64
called by 1: main
41func _emit_dec(v: i64) -> i64
called by 1: main
55func main() -> i64