code wiki / _hdl_build / nx_voice_v2_gate.nx

nx_voice_v2_gate.nx

buildroot/runtime/_hdl_build/nx_voice_v2_gate.nx

5903 B109 linesdepth 5pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic voice
docsdependenciesstructsconstsfunctions

about

nx_voice_v2_gate.nx -- proves the NishiVoice v2 q/bit path end-to-end: real LPC residual + entropy coding + inverse synthesis (what nx_voice_codec.nx says is "the v2 path"). Chain: autocorr -> levinson (LPC coeffs a[1..p] Q30) -> analysis filter e[n]=s[n]+Sum a[k]s[n-k] -> quantise -> nx_resid_entropy range-code -> decode -> nx_lpc_synth s[n]=e[n]-Sum a[k]s[n-k]. All on the x86_64 LPC lineage (one syscalls module). MEASURES the entropy compression of the residual + the reconstruction fidelity. The entropy lever itself was already proven (nx_resid_entropy_gate -46%).

dependencies 5 imports · 0 importers

nx_syscalls_x86_64.nx nx_lpc_autocorr.nx nx_lpc_levinson.nx nx_lpc_synth.nx nx_resid_entropy.nx nx_voice_v2_gate.nx

imports: nx_syscalls_x86_64.nxnx_lpc_autocorr.nxnx_lpc_levinson.nxnx_lpc_synth.nxnx_resid_entropy.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main g_puts st16 g_abs ld16 nx_lpc_autocorr nx_lpc_levinson _q30_mul ld64 re_build_model re_encode nx_rc_enc_init re_zz nx_rc_enc_symbol _rc_enc_renorm _rc_enc_put_byte nx_rc_enc_done _rc_enc_put_byte ↻ re_decode nx_rc_dec_init nx_rc_dec_get_target nx_rc_dec_update _rc_dec_renorm re_unzz nx_lpc_synth _i16_load_le _i64_load_le _i16_store_le_sat g_pn g_check g_puts ↻

structs

none

consts

none

functions

12func g_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: g_checkmain
13func g_pn(v: i64) -> i64
called by 1: main
23func g_check(name: *u8, cond: i64) -> i64
called by 1: main calls 1: g_puts
27func g_abs(v: i64) -> i64 { if v < 0 { return 0 - v } return v }
called by 1: main
28func st16(buf: *u8, idx: i64, v: i64) -> i64 { var x: i64 = v; if x < 0 { x = x + 65536 } buf[idx*2] = x & 0xff; buf[idx*2+1] = (x >> 8) & 0xff; return 0 }
called by 1: main
29func ld16(buf: *u8, idx: i64) -> i64 { var v: i64 = buf[idx*2] | (buf[idx*2+1] << 8); if v >= 32768 { v = v - 65536 } return v }
called by 1: main
30func ld64(buf: *u8, idx: i64) -> i64
called by 1: main
36func main() -> i64