# kubeworkz/grx930 architecture

> Architecture diagram of the GitHub repository kubeworkz/grx930, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kubeworkz/grx930
- Repository: https://github.com/kubeworkz/grx930

## Overview

GRX930 is a multi-core RISC-V SoC integrating two GEMM NPUs, coherent caching, an AXI4 fabric, memory, and peripherals. A typical workload is supplied as firmware or an ELF image, booted on a CPU, and configured through memory-mapped NPU registers; the NPU reads operands, computes GEMM, and writes results to memory for CPU-side use. The README supplies the system topology and major capabilities; sampled firmware and loader code support the software-side flow, but RTL implementation details were not sampled.

Main entry points: [`c930/rtl/c930_axi_crossbar.sv`](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_axi_crossbar.sv) (AXI4 Crossbar), [`c930/sw/firmware/main.c`](https://github.com/kubeworkz/grx930/blob/main/c930/sw/firmware/main.c) (Firmware Commands), [`c930/rtl/c930_npu_core.sv`](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_core.sv) (GEMM Controller), [`c930/rtl/c930_mmio_bridge.sv`](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_mmio_bridge.sv) (MMIO Bridge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_software["Software and CPUs"]
  node_firmware["Firmware Commands<br/>[main.c]"]
  node_elf["ELF Loader<br/>[elf64_loader.c]"]
  node_driver["NPU Driver<br/>[c930_npu_driver.c]"]
  node_cpu["RV64IMAC Cores"]
  node_l1["I/D Caches"]
end

subgraph group_fabric["Interconnect and Cache"]
  node_crossbar["AXI4 Crossbar"]
  node_l2["Coherent L2<br/>[c930_l2.sv]"]
  node_adapter["Cache Adapter"]
  node_arbiter["DMA Arbiter"]
end

subgraph group_npu["Neural Processing"]
  node_npu_top["NPU Instances<br/>[c930_npu_top.sv]"]
  node_csr["NPU Registers<br/>[c930_npu_csr.sv]"]
  node_npu_core["GEMM Controller<br/>[c930_npu_core.sv]"]
  node_systolic["Systolic Array"]
  node_pe["Tensor Elements<br/>[c930_tensor_pe.sv]"]
  node_activation["Activation Unit<br/>[c930_npu_act.sv]"]
  node_npu_dma["NPU DMA<br/>[c930_npu_dma.sv]"]
end

subgraph group_platform["Memory and Peripherals"]
  node_mmio["MMIO Bridge"]
  node_uart["UART<br/>[c930_uart.sv]"]
  node_aplic["APLIC<br/>[c930_aplic.sv]"]
  node_bootrom["Boot ROM<br/>[c930_bootrom.sv]"]
  node_memory[("DDR / BRAM<br/>[c930_ddr.sv]")]
  node_ddr3l["DDR3L Controller<br/>[c930_ddr3l.sv]"]
end

node_host(("Host / User"))

node_host -->|"supplies commands"| node_firmware
node_host -.->|"provides ELF"| node_elf
node_firmware -->|"loads image"| node_elf
node_firmware -->|"configures NPU"| node_driver
node_firmware -->|"runs on"| node_cpu
node_cpu -->|"uses"| node_l1
node_l1 -->|"accesses memory"| node_adapter
node_adapter -->|"issues AXI"| node_crossbar
node_crossbar -->|"routes requests"| node_l2
node_crossbar -->|"routes requests"| node_npu_top
node_crossbar -->|"routes MMIO"| node_mmio
node_npu_top -->|"exposes registers"| node_csr
node_csr -->|"starts jobs"| node_npu_core
node_npu_core -->|"controls GEMM"| node_systolic
node_systolic -->|"distributes operands"| node_pe
node_npu_core -->|"applies activation"| node_activation
node_npu_core -->|"requests transfers"| node_npu_dma
node_npu_dma -->|"requests arbitration"| node_arbiter
node_arbiter -->|"forwards DMA"| node_crossbar
node_crossbar -->|"accesses memory"| node_memory
node_crossbar -.->|"routes memory traffic"| node_ddr3l
node_mmio -->|"accesses registers"| node_uart
node_mmio -->|"accesses registers"| node_aplic
node_cpu -->|"boots from"| node_bootrom

click node_firmware "https://github.com/kubeworkz/grx930/blob/main/c930/sw/firmware/main.c"
click node_elf "https://github.com/kubeworkz/grx930/blob/main/c930/sw/firmware/elf64_loader.c"
click node_driver "https://github.com/kubeworkz/grx930/blob/main/c930/sw/c930_npu_driver.c"
click node_crossbar "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_axi_crossbar.sv"
click node_l2 "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_l2.sv"
click node_adapter "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_axi_cache_adapter.sv"
click node_arbiter "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_axi_dma_arb.sv"
click node_npu_top "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_top.sv"
click node_csr "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_csr.sv"
click node_npu_core "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_core.sv"
click node_systolic "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_systolic_array.sv"
click node_pe "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_tensor_pe.sv"
click node_activation "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_act.sv"
click node_npu_dma "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_dma.sv"
click node_mmio "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_mmio_bridge.sv"
click node_uart "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_uart.sv"
click node_aplic "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_aplic.sv"
click node_bootrom "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_bootrom.sv"
click node_memory "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_ddr.sv"
click node_ddr3l "https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_ddr3l.sv"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_firmware,node_elf,node_driver,node_cpu,node_l1,node_host toneBlue
class node_crossbar,node_l2,node_adapter,node_arbiter toneAmber
class node_npu_top,node_csr,node_npu_core,node_systolic,node_pe,node_activation,node_npu_dma toneMint
class node_mmio,node_uart,node_aplic,node_bootrom,node_memory,node_ddr3l toneRose
```

## Components

### Software and CPUs

- [Firmware Commands](https://github.com/kubeworkz/grx930/blob/main/c930/sw/firmware/main.c): `c930/sw/firmware/main.c`
- [ELF Loader](https://github.com/kubeworkz/grx930/blob/main/c930/sw/firmware/elf64_loader.c): `c930/sw/firmware/elf64_loader.c`
- [NPU Driver](https://github.com/kubeworkz/grx930/blob/main/c930/sw/c930_npu_driver.c): `c930/sw/c930_npu_driver.c`
- **RV64IMAC Cores**
- **I/D Caches**

### Interconnect and Cache

- [AXI4 Crossbar](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_axi_crossbar.sv): `c930/rtl/c930_axi_crossbar.sv`
- [Coherent L2](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_l2.sv): `c930/rtl/c930_l2.sv`
- [Cache Adapter](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_axi_cache_adapter.sv): `c930/rtl/c930_axi_cache_adapter.sv`
- [DMA Arbiter](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_axi_dma_arb.sv): `c930/rtl/c930_axi_dma_arb.sv`

### Neural Processing

- [NPU Instances](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_top.sv): `c930/rtl/c930_npu_top.sv`
- [NPU Registers](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_csr.sv): `c930/rtl/c930_npu_csr.sv`
- [GEMM Controller](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_core.sv): `c930/rtl/c930_npu_core.sv`
- [Systolic Array](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_systolic_array.sv): `c930/rtl/c930_systolic_array.sv`
- [Tensor Elements](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_tensor_pe.sv): `c930/rtl/c930_tensor_pe.sv`
- [Activation Unit](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_act.sv): `c930/rtl/c930_npu_act.sv`
- [NPU DMA](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_npu_dma.sv): `c930/rtl/c930_npu_dma.sv`

### Memory and Peripherals

- [MMIO Bridge](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_mmio_bridge.sv): `c930/rtl/c930_mmio_bridge.sv`
- [UART](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_uart.sv): `c930/rtl/c930_uart.sv`
- [APLIC](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_aplic.sv): `c930/rtl/c930_aplic.sv`
- [Boot ROM](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_bootrom.sv): `c930/rtl/c930_bootrom.sv`
- [DDR / BRAM](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_ddr.sv): `c930/rtl/c930_ddr.sv`
- [DDR3L Controller](https://github.com/kubeworkz/grx930/blob/main/c930/rtl/c930_ddr3l.sv): `c930/rtl/c930_ddr3l.sv`

### Other components

- **Host / User**

## Connections

- Host / User → Firmware Commands: supplies commands
- Host / User → ELF Loader: provides ELF
- Firmware Commands → ELF Loader: loads image
- Firmware Commands → NPU Driver: configures NPU
- Firmware Commands → RV64IMAC Cores: runs on
- RV64IMAC Cores → I/D Caches: uses
- I/D Caches → Cache Adapter: accesses memory
- Cache Adapter → AXI4 Crossbar: issues AXI
- AXI4 Crossbar → Coherent L2: routes requests
- AXI4 Crossbar → NPU Instances: routes requests
- AXI4 Crossbar → MMIO Bridge: routes MMIO
- NPU Instances → NPU Registers: exposes registers
- NPU Registers → GEMM Controller: starts jobs
- GEMM Controller → Systolic Array: controls GEMM
- Systolic Array → Tensor Elements: distributes operands
- GEMM Controller → Activation Unit: applies activation
- GEMM Controller → NPU DMA: requests transfers
- NPU DMA → DMA Arbiter: requests arbitration
- DMA Arbiter → AXI4 Crossbar: forwards DMA
- AXI4 Crossbar → DDR / BRAM: accesses memory
- AXI4 Crossbar → DDR3L Controller: routes memory traffic
- MMIO Bridge → UART: accesses registers
- MMIO Bridge → APLIC: accesses registers
- RV64IMAC Cores → Boot ROM: boots from
