code wiki / _hdl_build / nx_riscv_emu.nx

nx_riscv_emu.nx

buildroot/runtime/_hdl_build/nx_riscv_emu.nx

2631 B43 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic riscv
docsdependenciesstructsconstsfunctions

about

nx_riscv_emu.nx -- SOVEREIGN RISC-V backend, RUNG 5: execute the ELF our writer emitted. Now on the GENERAL nx_riscv_lib (shared rv64im emulator `run`, ELF reader helpers, encoders) -- only the load + tests are local. T1 parse e_entry == 0x10078. T2 EXECUTE riscv_prog.elf -> exit 40 (5*8) = LOOP CLOSED. T3 (teeth) patch the two source immediates in memory (5->6, 8->7) -> exit 42 (6*7) = genuinely computes. expect_exit: 0 Sovereign: nx_riscv_lib (+ nx_syscalls). No qemu/gcc/objdump/sh.

dependencies 2 imports · 0 importers

nx_riscv_lib.nx nx_syscalls.nx nx_riscv_emu.nx

imports: nx_riscv_lib.nxnx_syscalls.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_openat_rd sys_read sys_close rd64 g_pn nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap ck g_puts ↻ run sys_mmap ↻ memrd32 sext12 sext32 memrd64 memwr64 sext_b memwr32 enc_i sys_openat_append sys_write ↻ sys_exit

structs

none

consts

none

functions

9func main() -> i64