How liangkangnan/tinyriscv works
TinyRISC-V is a Verilog single-core 32-bit RV32IM processor and SoC intended for FPGA use. The principal workflow is to load a program into the system, fetch and execute its instructions through a three-stage pipeline, and interact with memory-mapped peripherals; firmware can also be sent to an FPGA board over serial. The README documents interrupts, JTAG, UART updates, and example software. RTL source excerpts were not provided, so internal wiring is limited to documented relationships; the FPGA framework README was not sampled.
Main entry points: tinyriscv_soc_top.v SoC top · core Fetch-decode-execute · tinyriscv.v RISC-V core · ex.v Execute unit
Components 22
Processor core
- RISC-V core
rtl/core/tinyriscv.v - Fetch-decode-execute
rtl/core - Register file
rtl/core/regs.v - Instruction decode
rtl/core/id.v - Execute unit
rtl/core/ex.v - Divide unit
rtl/core/div.v - CSR registers
rtl/core/csr_reg.v
SoC and peripherals
Debug and updates
- JTAG debug
rtl/debug/jtag_top.v - UART updater
rtl/debug/uart_debug.v - Serial downloader
tools/tinyriscv_fw_downloader.py
Software examples
- C examples
tests/example - FreeRTOS port
tests/example/FreeRTOS
Other components
- Program author
- FPGA board
Connections 20
- Program author → C examples: writes code
README.md - C examples → SoC top: runs on
README.md - SoC top → RISC-V core: integrates
README.md - RISC-V core → Fetch-decode-execute: executes through
README.md - Fetch-decode-execute → Register file: uses
- Fetch-decode-execute → Instruction decode: uses
- Fetch-decode-execute → Execute unit: uses
- Execute unit → Divide unit: supports division
- RISC-V core → CSR registers: supports CSR
README.md - SoC top → RIB bus: uses bus
README.md - SoC top → ROM: integrates
- SoC top → RAM: integrates
- SoC top → Timer: integrates
- SoC top → GPIO: integrates
- SoC top → SPI master: integrates
- SoC top → UART: integrates
- SoC top → JTAG debug: supports debug
README.md - SoC top → UART updater: supports updates
README.md - Serial downloader → FPGA board: sends firmware
tools/tinyriscv_fw_downloader.py - FreeRTOS port → SoC top: runs on
README.md