code wiki / _hdl_build / _gpu_run.nx

_gpu_run.nx

buildroot/runtime/_hdl_build/_gpu_run.nx

4142 B85 linesdepth 5pulls 16 transitivereach 0 importersview sourcekind tooltopic gpu
docsdependenciesstructsconstsfunctions

about

_gpu_run.nx -- a SOVEREIGN rv64 runner with the GPU-class device ATTACHED (twin of nx_boot_run_sov, dedicated to the GPU op-list driver so the shared nx_boot_run_sov stays untouched). Loads an emitter-authored rv64 flat image, runs it on the Nishi-owned emu with the virtio/nvme/nndev/mmu + the new GPU controller (rv64im_min_gpu @0x10007000) attached, and prints the same "BOOTSOV verdict=GREEN" clean-halt marker the gate greps for. Sovereign: the emulator IS the runtime, no qemu/gcc. license_tier: ORIGINAL

dependencies 7 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 rv64im_min_gpu.nx _gpu_run.nx

imports: rv64im_min_sim.nxrv64im_min_csr.nxrv64im_min_clint.nxrv64im_min_uart.nxrv64im_min_virtio.nxrv64im_min_nvme.nxrv64im_min_gpu.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 gr_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_gpu_init nx_gpu_reset_storage nx_rv64im_sim_init nx_rv64im_sim_attach_virti nx_rv64im_sim_attach_virti nx_rv64im_sim_attach_nvme nx_rv64im_sim_attach_gpu 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 ↻

structs

none

consts

15const GR_MEM_BASE: i64 = 0x80000000
16const GR_MEM_SIZE: i64 = 65536
17const GR_TX_CAP: i64 = 4096
18const GR_MAX_STEPS: i64 = 100000

functions

20func gr_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
21func gr_fn(fd: i64, 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(fd,bb,k); return 0 }
called by 1: main
23func main(argc: i64, argv: *i64) -> i64