code wiki / _hdl_build / _nvme_diag.nx

_nvme_diag.nx

buildroot/runtime/_hdl_build/_nvme_diag.nx

4241 B78 linesdepth 5pulls 16 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

_nvme_diag.nx -- diagnostic: load the NVMe image, run it on the sovereign emu, then DUMP the NVMe controller storage + ACQ RAM so we can see whether the doorbell DMA posted the CQE. Sovereign. license_tier: ORIGINAL

dependencies 6 imports · 0 importers

rv64im_min_sim.nx rv64im_min_csr.nx rv64im_min_clint.nx rv64im_min_uart.nx rv64im_min_virtio.nx rv64im_min_nvme.nx _nvme_diag.nx

imports: rv64im_min_sim.nxrv64im_min_csr.nxrv64im_min_clint.nxrv64im_min_uart.nxrv64im_min_virtio.nxrv64im_min_nvme.nx

imported by: nobody (leaf or entry point)

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

main sys_read_file sys_openat_rd sys_lseek sys_mmap sys_read sys_close d_p nx_rv64im_rf_init nx_rv64im_csr_init nx_clint_init nx_uart_init nx_virtio_init nx_virtio_reset_storage nx_virtio_init_net nx_virtio_reset_storage ↻ nx_nvme_init nx_nvme_reset_storage nx_rv64im_sim_init nx_rv64im_sim_attach_virti nx_rv64im_sim_attach_virti nx_rv64im_sim_attach_nvme nx_rv64im_sim_run nx_rv64im_sim_step nx_clint_tick nx_clint_update_mtip nx_rv64im_csr_tick_mcycle nx_clint_mtip_get nx_rv64im_csr_read nx_csr_addr_to_slot nx_rv64im_sim_take_trap nx_rv64im_csr_read ↻ nx_rv64im_csr_write nx_csr_addr_to_slot ↻ nx_csr_is_read_only nx_rv64im_xlate nx_rv64im_csr_read ↻ nx_rv64im_is_device sys_mmap ↻ nx_sv39_walk

structs

none

consts

11const D_MEM_BASE: i64 = 0x80000000
12const D_MEM_SIZE: i64 = 65536
13const D_TX_CAP: i64 = 4096
14const D_MAX_STEPS: i64 = 100000

functions

16func d_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
17func d_n(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 }
called by 1: main
18func d_hex(v: i64) -> i64 { let d: *u8=sys_mmap(16); var i: i64=0; while i<8{let nib: i64=(v >> ((7-i)*4)) & 0xf; if nib<10{d[i]=(48+nib) as u8} else {d[i]=(87+nib) as u8} i=i+1}; sys_write(1,d,8); return 0 }
called by 1: main
20func main(argc: i64, argv: *i64) -> i64