code wiki / _hdl_build / nx_rv64_asm_verify.nx
nx_rv64_asm_verify.nx
buildroot/runtime/_hdl_build/nx_rv64_asm_verify.nx
about
nx_rv64_asm_verify.nx -- GATE: EXHAUSTIVE verification of the sovereign RV64 assembler (nx_rv64_asm) by RUNNING its
output on the sovereign rv64 emulator (rv64im_min_sim via nx_boot_run_sov). Eats the debt that the assembler was
only lightly KAT'd (lui + 2 branches): this assembles ONE program that threads a computation through EVERY
supported instruction -- li/addi/add/sub/and/or/xor/andi/ori/sll/srl/slli/srli/lui + lw/sw/lbu/sb/lhu/sh/ld/sd
(memory round-trips) + beq/bne/blt/bge/bltu/bgeu (taken AND not-taken) + jal/ret/j/mv -- to a known value (1005),
self-checks it IN-GUEST, prints OK (match) or NO (mismatch) over the UART, and halts via the SiFive finisher. If ANY
instruction is mis-encoded the computed value diverges -> NO -> RED. Runs on OUR emulator (no QEMU). expect_exit:0
dependencies 2 imports · 0 importers
imports: nx_rv64_asm.nxnx_itoa_lib.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
| 10 | const K_MAGIC_65536: i64 = 65536 |
functions
| 12 | func v_p(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 1: main |
| 17 | func v_pn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 20 | func v_run_sov(binpath: *u8, outpath: *u8) -> i64 |
| 39 | func v_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 45 | func v_has(buf: *u8, n: i64, pat: *u8, pl: i64) -> i64 called by 1: main |
| 52 | func main() -> i64 |