Drive the GRX930 NPU from its registers.
Real RTL c930_npu_top from kubeworkz/grx930, Verilated and compiled to WebAssembly (531 KB, b998eb1). Registers go over its AXI4-Lite port, A, B and C live in a simulated 64 KB DDR, and every cycle is the RTL's own; reading a register costs bus cycles too, as it does from the CPU. Its CI publishes a build only when 45 GEMMs across all five precisions give the same bytes natively and in WebAssembly. The module has one NPU, so NPU0 and NPU1 drive the same RTL and only change the C code.
Model Behavior and data model of c930_npu_csr.sv and c930_npu_driver.c, not the RTL running. Timing is illustrative and the counters aren't modeled.
1 · Program
Try: START four times quickly to fill the queue, then once more (slow the clock first). Or set DIM_K to 20, then try a good command after it.
2 · Register file
| Offset | Register | Value |
|---|
Bus log
3 · Memory little-endian, row-major, packed per 32-bit word
4 · The same thing in C
API from c930/sw/c930_npu_driver.h. Registers and limits from c930/rtl (SoC build: MAX_M 8, MAX_N 12, MAX_K 16, queue depth 4). NPU register docs →