code wiki / _hdl_build / nx_hwtest_matrix.nx

nx_hwtest_matrix.nx

buildroot/runtime/_hdl_build/nx_hwtest_matrix.nx

8689 B109 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_hwtest_matrix.nx -- ROADMAP R1: the HARDWARE-TEST MATRIX. Runs the conformance FLEET (the 180 random programs nx_rv64_qemu_fuzz already wrote to knowledge/hw/qfuzz/, whose sim UART == QEMU is proven) on MULTIPLE sovereign EXECUTION TARGETS -- the fast interpreter AND the TIERED engine (interpret cold + JIT hot loops) -- and asserts each target's final x5..x9 match the golden-sim manifest byte-for-byte. NEW COVERAGE: the tiered/JIT path has only ever been fuzzed against fk internally; running it on the SAME fleet the sim+QEMU validated makes it transitively == QEMU. A target x pass/fail MATRIX + a NEG-CONTROL broken target that MUST be flagged (proves the harness detects failure, not a rubber stamp). Pure CONSUMER of the fleet artifacts -- no generation, no sim needed here. expect_exit: 0 NEVER-BRICK: pure simulation, writes 0 hardware state.

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_g_puts_lib.nx nx_rv64_fast.nx nx_rv64_jit.nx nx_rv64_tier.nx nx_hwtest_matrix.nx

imports: nx_syscalls.nxnx_g_puts_lib.nxnx_rv64_fast.nxnx_rv64_jit.nxnx_rv64_tier.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 sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit g_pn sys_mmap ↻ sys_write ↻ hexval build_path fk_predecode fk_w32 fk_imm_u fk_sext fk_imm_i fk_sext ↻ fk_imm_s fk_sext ↻ fk_imm_b fk_sext ↻ fk_imm_j fk_sext ↻ run_engine_fk fk_run sys_mmap ↻ fk_step fk_amo fk_memok fk_ld fk_sext32 fk_sext ↻ fk_st fk_ltu fk_srlmask

structs

none

consts

19const MEMSZ: i64 = 65536

functions

15func g_pn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var x: i64=v; if x==0{b[0]=48;sys_write(1,b,1);return 0} var d: i64=0; var y: i64=x; while y>0{d=d+1;y=y/10} var i: i64=d-1; y=x; while i>=0{b[i]=(48+(y%10)) as u8;y=y/10;i=i-1} sys_write(1,b,d); return 0 }
called by 1: main calls 2: sys_mmapsys_write
16func ck(name: *u8, c: i64) -> i64 { if c==1 { g_puts(" PASS " as *u8) } else { g_puts(" FAIL " as *u8) } g_puts(name); g_puts("\n" as *u8); return c }
called by 1: main calls 1: g_puts
17func hexval(c: i64) -> i64 { if c>=48 { if c<=57 { return c-48 } } if c>=97 { if c<=102 { return c-87 } } return 0 }
called by 1: main
21func build_path(buf: *u8, idx: i64) -> i64
called by 1: main
28func run_engine_fk(opk: *i64, rd: *i64, rs1: *i64, rs2: *i64, imm: *i64, nc: i64, reg: *i64, mem: *u8, out5: *i64) -> i64
called by 1: main calls 1: fk_run
35func run_engine_tier(opk: *i64, rd: *i64, rs1: *i64, rs2: *i64, imm: *i64, nc: i64, reg: *i64, mem: *u8, stats: *i64, out5: *i64) -> i64
called by 1: main calls 1: tier_run
42func main() -> i64