code wiki / _hdl_build / nx_rv64im_alu_proof.nx

nx_rv64im_alu_proof.nx

buildroot/runtime/_hdl_build/nx_rv64im_alu_proof.nx

4122 B124 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic rv64im
docsdependenciesstructsconstsfunctions

about

nx_rv64im_alu_proof.nx -- vector dumper to PROVE the RV64IM ALU. Runs nx_rv64im_alu_compute over every ALU op (1..28) across a deterministic mix of edge values + LCG-generated 64-bit operands, and writes "<op_dec>\t<a_hex16>\t<b_hex16>\t<r_hex16>\n" lines to the proof folder. An independent Python implementation of the RV64IM spec then recomputes each result and diffs -- 1:1 proof, not "assertions PASS". expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_syscalls.nx rv64im_min_alu.nx nx_rv64im_alu_proof.nx

imports: nx_syscalls.nxrv64im_min_alu.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap _dec2 sys_write _emit_vec nx_rv64im_alu_compute nx_rv64im_lshr nx_rv64im_ltu nx_rv64im_sext32 nx_rv64im_mulh_signed nx_rv64im_mulh_unsigned nx_rv64im_lshr ↻ nx_rv64im_mulh_signed_unsi nx_rv64im_mulh_unsigned ↻ nx_rv64im_mulh_unsigned ↻ nx_rv64im_udiv nx_rv64im_ltu ↻ nx_rv64im_urem nx_rv64im_udiv ↻ _dec2 ↻ _hex16 sys_openat_wr sys_close

structs

none

consts

15const K_MAGIC_9223372036854775807: i64 = 9223372036854775807
16const K_MAGIC_4294967296: i64 = 4294967296
17const K_MAGIC_4294967295: i64 = 4294967295
18const K_MAGIC_2147483648: i64 = 2147483648
19const K_MAGIC_2147483647: i64 = 2147483647
20const K_MAGIC_8388608: i64 = 8388608
21const K_MAGIC_88172645463325252: i64 = 88172645463325252
22const K_MAGIC_6364136223846793005: i64 = 6364136223846793005
23const K_MAGIC_1442695040888963407: i64 = 1442695040888963407

functions

25func _hex16(v: i64, out: *u8, pos: i64) -> i64
called by 1: _emit_vec
38func _dec2(v: i64, out: *u8, pos: i64) -> i64
called by 2: _emit_vecmain
46func _emit_vec(op: i64, a: i64, b: i64, out: *u8, pos: i64) -> i64
60func main() -> i64