code wiki / _hdl_build / _nvme_diag.nx
_nvme_diag.nx
buildroot/runtime/_hdl_build/_nvme_diag.nx
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
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
structs
| none |
consts
| 11 | const D_MEM_BASE: i64 = 0x80000000 |
| 12 | const D_MEM_SIZE: i64 = 65536 |
| 13 | const D_TX_CAP: i64 = 4096 |
| 14 | const D_MAX_STEPS: i64 = 100000 |
functions
| 16 | func 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 |
| 17 | func 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 |
| 18 | func 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 |
| 20 | func main(argc: i64, argv: *i64) -> i64 |