
This project implements a minimal 32-bit RISC-V processor core (RV32I) using the SERV architecture - one of the world's smallest RISC-V CPUs. The design is optimized for area efficiency, using a bit-serial architecture that processes instructions one bit at a time over 32 clock cycles.
SERV CPU Core - A bit-serial RISC-V processor that implements the base integer instruction set (RV32I). The core features:
SPI Flash Interface - The spimemio module provides access to external SPI flash memory where the RISC-V program is stored. This allows the small chip to execute larger programs stored off-chip.
GPIO Controller - The subservient_gpio module provides 5 general-purpose output pins that can be controlled by the RISC-V software, allowing the processor to interact with external hardware.
Register File - Instead of using traditional SRAM, this design uses a shift register implementation (rf_shift_reg) with only 5 registers to minimize silicon area.
uo_out[6]uo_out[5]uo_out[7]ui_in[7]Before testing, you need to program the SPI flash with RISC-V machine code:
riscv32-unknown-elf-gcc and objcopyA minimal blinker program that toggles GPIO pins:
# Simple LED blinker for GPIO pins
.section .text
.global _start
_start:
li t0, 0x00 # Load 0 into t0
loop:
sw t0, 0(x0) # Write to GPIO (address 0)
addi t0, t0, 1 # Increment
j loop # Repeat
uo_out[4:0] should change according to your programuo_out[5]uo_out[6]uo_out[7] and ui_in[7])The project includes a testbench (test/tb.v and test/test.py) but these currently test the simple adder example. To properly test the RISC-V core:
Required:
Optional:
uo_out[4:0] through current-limiting resistors (1kΩ suggested)| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | gpio0 | ||
| 1 | gpio1 | ||
| 2 | gpio2 | ||
| 3 | gpio3 | ||
| 4 | gpio4 | ||
| 5 | sclk | ||
| 6 | cs_n | ||
| 7 | mosi |