# rafaelcalcada/rvx architecture

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

- Interactive diagram: https://gitdiagram.com/rafaelcalcada/rvx
- Repository: https://github.com/rafaelcalcada/rvx

## Overview

RVX is a Verilog RV32I microcontroller IP core for FPGA-based embedded systems. The principal workflow is to adapt a bare-metal or FreeRTOS application example, integrate RVX into an FPGA design, and run software using its memory and peripheral interfaces. The graph preserves the documented processor, bus, RAM, timer, UART, GPIO, and SPI capabilities. RTL files are present in the tree but were not excerpted, so internal hardware connections are shown only as unverified dashed links.

Main entry points: [`hardware/rvx_bus.v`](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_bus.v) (Peripheral bus), [`templates/freertos/main.c`](https://github.com/rafaelcalcada/rvx/blob/main/templates/freertos/main.c) (FreeRTOS template), [`hardware/rvx.v`](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx.v) (RVX top-level), [`templates/baremetal/main.c`](https://github.com/rafaelcalcada/rvx/blob/main/templates/baremetal/main.c) (Bare-metal template)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_processor["Processor core"]
  node_rvx["RVX top-level<br/>[rvx.v]"]
  node_core["RV32I core<br/>[rvx_core.v]"]
  node_bus["Peripheral bus<br/>[rvx_bus.v]"]
end

subgraph group_io["Memory and peripherals"]
  node_ram[("Memory<br/>[rvx_ram.v]")]
  node_mtimer["Machine timer<br/>[rvx_mtimer.v]"]
  node_gpio["GPIO<br/>[rvx_gpio.v]"]
  node_uart["UART<br/>[rvx_uart.v]"]
  node_spi["SPI<br/>[rvx_spi.v]"]
end

subgraph group_software["Software examples"]
  node_baremetal["Bare-metal template<br/>[main.c]"]
  node_freertos["FreeRTOS template<br/>[main.c]"]
end

subgraph group_boards["FPGA examples"]
  node_helloworld["Hello World example"]
  node_freertos_example["FreeRTOS example"]
end

node_developer(("Embedded developer"))
node_fpga(("FPGA platform"))

node_developer -->|"adapts"| node_baremetal
node_developer -->|"adapts"| node_freertos
node_developer -->|"starts with"| node_helloworld
node_developer -->|"starts with"| node_freertos_example
node_helloworld -->|"implements on"| node_fpga
node_freertos_example -->|"implements on"| node_fpga
node_baremetal -.->|"uses"| node_uart
node_freertos -.->|"configures"| node_mtimer
node_freertos -.->|"uses"| node_gpio
node_rvx -.->|"includes"| node_core
node_rvx -.->|"connects"| node_bus
node_bus -.->|"dispatches"| node_ram
node_bus -.->|"dispatches"| node_mtimer
node_bus -.->|"dispatches"| node_gpio
node_bus -.->|"dispatches"| node_uart
node_bus -.->|"dispatches"| node_spi

click node_baremetal "https://github.com/rafaelcalcada/rvx/blob/main/templates/baremetal/main.c"
click node_freertos "https://github.com/rafaelcalcada/rvx/blob/main/templates/freertos/main.c"
click node_helloworld "https://github.com/rafaelcalcada/rvx/tree/main/examples/hello_world"
click node_freertos_example "https://github.com/rafaelcalcada/rvx/tree/main/examples/freertos"
click node_rvx "https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx.v"
click node_core "https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_core.v"
click node_bus "https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_bus.v"
click node_ram "https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_ram.v"
click node_mtimer "https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_mtimer.v"
click node_gpio "https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_gpio.v"
click node_uart "https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_uart.v"
click node_spi "https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_spi.v"

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_rvx,node_core,node_bus toneBlue
class node_ram,node_mtimer,node_gpio,node_uart,node_spi toneAmber
class node_baremetal,node_freertos toneMint
class node_helloworld,node_freertos_example toneRose
class node_developer,node_fpga toneIndigo
```

## Components

### Processor core

- [RVX top-level](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx.v): `hardware/rvx.v`
- [RV32I core](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_core.v): `hardware/rvx_core.v`
- [Peripheral bus](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_bus.v): `hardware/rvx_bus.v`

### Memory and peripherals

- [Memory](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_ram.v): `hardware/rvx_ram.v`
- [Machine timer](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_mtimer.v): `hardware/rvx_mtimer.v`
- [GPIO](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_gpio.v): `hardware/rvx_gpio.v`
- [UART](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_uart.v): `hardware/rvx_uart.v`
- [SPI](https://github.com/rafaelcalcada/rvx/blob/main/hardware/rvx_spi.v): `hardware/rvx_spi.v`

### Software examples

- [Bare-metal template](https://github.com/rafaelcalcada/rvx/blob/main/templates/baremetal/main.c): `templates/baremetal/main.c`
- [FreeRTOS template](https://github.com/rafaelcalcada/rvx/blob/main/templates/freertos/main.c): `templates/freertos/main.c`

### FPGA examples

- [Hello World example](https://github.com/rafaelcalcada/rvx/tree/main/examples/hello_world): `examples/hello_world`
- [FreeRTOS example](https://github.com/rafaelcalcada/rvx/tree/main/examples/freertos): `examples/freertos`

### Other components

- **Embedded developer**
- **FPGA platform**

## Connections

- Embedded developer → Bare-metal template: adapts (evidence: `README.md`)
- Embedded developer → FreeRTOS template: adapts (evidence: `README.md`)
- Embedded developer → Hello World example: starts with (evidence: `README.md`)
- Embedded developer → FreeRTOS example: starts with (evidence: `README.md`)
- Hello World example → FPGA platform: implements on (evidence: `README.md`)
- FreeRTOS example → FPGA platform: implements on (evidence: `README.md`)
- Bare-metal template → UART: uses
- FreeRTOS template → Machine timer: configures
- FreeRTOS template → GPIO: uses
- RVX top-level → RV32I core: includes
- RVX top-level → Peripheral bus: connects
- Peripheral bus → Memory: dispatches
- Peripheral bus → Machine timer: dispatches
- Peripheral bus → GPIO: dispatches
- Peripheral bus → UART: dispatches
- Peripheral bus → SPI: dispatches
