103 Minimal RV32E SoC with UART Loader

103 : Minimal RV32E SoC with UART Loader

Design render
  • Author: Kris / KLuterIRV
  • Description: Minimal RV32E microcontroller with UART program loader, internal instruction memory, GPIO and configurable 7-segment output
  • GitHub repository
  • Open in 3D viewer
  • Clock: 20000000 Hz

Minimal RV32E SoC with UART Loader

This project implements a minimal RV32E-based microcontroller for Tiny Tapeout.

Features

  • Simplified RV32E CPU core
  • 16 x 32-bit register file
  • Internal instruction memory, programmable through UART
  • Internal data memory and memory-mapped peripherals
  • UART RX program loader
  • UART TX output
  • Shared 8-bit GPIO / seven-segment output
  • Configurable seven-segment mode:
    • GPIO mode
    • HEX mode
    • ASCII mode
    • RAW segment mode
  • ebreak-based halt/debug signal

Pinout

Pin Function
ui_in[0] Boot mode enable
ui_in[1] UART RX
uo_out[7:0] GPIO output or seven-segment output
uio_out[0] UART TX
uio_out[1] Core halted debug
uio_out[2] Loader done debug
uio_out[3] Loader error debug

How it works

On reset, the design can operate in two modes depending on ui_in[0].

When ui_in[0] = 1, the system enters boot mode. In boot mode, the RV32E core is held at PC = 0 while the UART loader receives a program through ui_in[1]. The loader writes 32-bit instruction words into the internal instruction memory. When the loader finishes, loader_done_debug is asserted and the core starts executing from address 0x00000000.

When ui_in[0] = 0, the core starts directly from its internal instruction memory. The instruction memory contains a default demo program that writes characters to the seven-segment output.

The CPU is a simplified RV32E core with 16 integer registers. It supports arithmetic, logic, shifts, branches, jumps, loads, stores, LUI/AUIPC, and an ebreak-based halt mechanism.

The output uo_out[7:0] is shared between normal GPIO mode and seven-segment display mode. The seven-segment peripheral supports HEX, ASCII and RAW segment patterns.

The UART loader protocol is:

0x55
N_WORDS
WORD0 byte0
WORD0 byte1
WORD0 byte2
WORD0 byte3
...

Words are transmitted little-endian. For example:

0x100000B7 -> B7 00 00 10


## How to test

To test the default demo, keep ui_in[0] = 0, apply reset, and clock the design. The core should start executing the internal demo program and drive uo_out[7:0] with seven-segment ASCII patterns.

To test UART program loading:

Set ui_in[0] = 1 to enable boot mode.
Send the UART sync byte 0x55 to ui_in[1].
Send the number of 32-bit words.
Send each instruction word little-endian.
Wait for uio_out[2], which indicates loader_done_debug.
The core will then execute from PC = 0.

Useful pins:

Pin	Function
ui_in[0]	Boot mode
ui_in[1]	UART RX
uo_out[7:0]	GPIO / seven-segment shared output
uio_out[0]	UART TX
uio_out[1]	Core halted debug
uio_out[2]	Loader done debug
uio_out[3]	Loader error debug
External hardware

The design can be tested using a USB-UART adapter connected to ui_in[1] for RX and uio_out[0] for TX.

The seven-segment output is active-high by default. If the target display is active-low, the firmware can enable the active-low mode in the seven-segment control register.

Memory map
Address	Register
0x1000_0000	GPIO output
0x1000_0004	Seven-segment data
0x1000_0008	Seven-segment control
0x1000_0100	UART TX data
0x1000_0104	UART status
0x1000_010C	UART RX data
Seven-segment control

SEVENSEG_CTRL bits:

Bit	Meaning
0	Enable seven-segment output
1	ASCII mode
2	RAW mode
3	Active-low output

IO

#InputOutputBidirectional
0sram_wesram_rdata[0]sram_wdata[6]
1sram_addr[0]sram_rdata[1]sram_wdata[7]
2sram_wdata[0]sram_rdata[2]sram_addr[1]
3sram_wdata[1]sram_rdata[3]sram_addr[2]
4sram_wdata[2]sram_rdata[4]sram_addr[3]
5sram_wdata[3]sram_rdata[5]sram_addr[4]
6sram_wdata[4]sram_rdata[6]sram_addr[5]
7sram_wdata[5]sram_rdata[7]

Chip location

Controller Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux Mux tt_um_chip_rom (Chip ROM) tt_um_factory_test (Tiny Tapeout Factory Test) tt_um_utoss_riscv (UTOSS RISC-V core) tt_um_memory_game_top (Number Memory Game) tt_um_danielpenas42 (Ball Display) tt_um_machinelearning (7-Segment Neural Predictor) tt_um_microlane_demo (microlane demo project) tt_um_pixel_processor (Tiny Pixel Processor) tt_um_jpigdon_gps_accelerator_top (GPS_Accelerator) tt_um_rgb_mixer (rgb_mixer) tt_um_bgao43 (Tiny TPU Systolic Array) tt_um_main (Pong in Verilog) tt_um_joannec34_teenytpu (teenytpu) tt_um_apa102_ws2812_squidgeefish (APA102 to WS2812 Translator) tt_um_uacj_bouncing_DVD_screensaver (Custom DVD Screensaver for VGA) tt_um_logoUACJ_MOGA (VGA_screensaver_UACJ) tt_um_grace_spi_led_driver (SPI-Controlled 8-Channel LED Driver) tt_um_rebeccargb_universal_decoder (Universal Binary to Segment Decoder) tt_um_rebeccargb_hardware_utf8 (Hardware UTF Encoder/Decoder) tt_um_happyhop_deadcast2 (happyhop) tt_um_dino7 (Dino-7: 7-Segment Runner Game) tt_um_arty3_mac_engine (Simple MAC Engine w/ Postproc) tt_um_uacj (Custom DVD Screensaver for VGA) tt_um_algofoogle_dottee (DOTTEE VGA demo (TTGF26a)) tt_um_mattvenn_signal_generator (Simple Signal Generator) tt_um_urish_simon (Simon Says memory game) tt_um_tpu (Tensor Processing Unit For GF) tt_um_gojimmypi_ttgf_UART_FSM_TRNG_Lab (Hardware Entropy Explorer: UART/SPI TRNG and PUF) tt_um_wokwi_465483277165299713 (First Tinytapeout) tt_um_prem_pipeline_test (Programmable_Pipeline-RISC-V) tt_um_wokwi_467219410242853889 (Tiny Tapeout testtest 111233) tt_um_wokwi_465549494272929793 (Pacos first design) tt_um_wokwi_465731371445677057 (Arturo's first Wokwi design) tt_um_wokwi_465732744934845441 (Tiny Tapeout Template_1234) tt_um_wokwi_465736492859711489 (Tiny Tapeout Workshop JuanF) tt_um_wokwi_465731430225727489 (Rafa’s first Wokwi design) tt_um_wokwi_465731458365332481 (7 segment Display Fli-Flop Try-out) tt_um_wokwi_465732744245929985 (DiseñoCursoTiny) tt_um_wokwi_465731490568160257 (Matt’s first Wokwi design) tt_um_wokwi_465736691688630273 (test1) tt_um_wokwi_465731458628527105 (Mi copia del Tiny Tapeout) tt_um_wokwi_465731520738845697 (El primer diseño) tt_um_wokwi_465731521356457985 (Tiny Tapeout Template Copy) tt_um_gen1_digital_companion_tile (Gen1 Digital Companion Tile) tt_um_wokwi_465732827753495553 (Tiny Tapeout Template Ayman) tt_um_wokwi_465731394728267777 (Julian_Proyecto) tt_um_wokwi_465731458535202817 (Tiny Tapeout Template Copy) tt_um_wokwi_465732847401723905 (Basic Circuit) tt_um_wokwi_465731452481768449 (El primer diseño de Matt para Wokwi) tt_um_wokwi_465731502018614273 (Tiny Tapeout Template flip flop) tt_um_wokwi_465732616714924033 (Tiny Tapeout RJAP) tt_um_wokwi_465731575275296769 (ocxpkeWokwiDesign) tt_um_wokwi_465732880722332673 (Pedro Template) tt_um_wokwi_465731858252480513 (Paula's first Wokwi design) tt_um_wokwi_465731455677830145 (Tiny Tapeout JMCG) tt_um_wokwi_465737601403996161 (Tiny Number Simon) tt_um_ttmul (Balanced Ternary Multiplier) tt_um_wokwi_465731466664816641 (Tiny Tapeout Workshop Malaga 2jun2026) tt_um_8bit_risc_cpu (8-bit RISC CPU) tt_um_wokwi_451184391728659457 (Simple Sprinkler) tt_um_fhw_appel_spiPWMio (spiPWMio) tt_um_divadnauj_GB_serv_soc_wb (serv_soc_wb) tt_um_8bitcustomcomputer (SAP 8 Bit Computer) tt_um_bioimpedance (Very Low Resource Digital Implementation of Bioimpedance Analysis) tt_um_mgj_bist8 (BIST-8: Built-In Self-Test for 8-bit CLA Adder) tt_um_roberto_tiny_radar_tile (BioPulse Tile) tt_um_systolic_mac_2x2 (2x2 Systolic Array Matrix Multiplier) tt_um_peg_top (2x2 CNN Accelerator PE Grid with UART) tt_um_AlvaroRub_ringcounter (Counter16Outputs) tt_um_wokwi_465731440267947009 (Antonio's first Wokwi design) tt_um_wokwi_465732706576877569 (Guille's first Wokwi design.) tt_um_wokwi_465731481873367041 (MIPS-Lite 8-bit Processor) tt_um_wokwi_465736612213902337 (Juan`s first Worki design) tt_um_wokwi_465731439156454401 (Rhyloo’s first Wokwi design) tt_um_wokwi_465732536551273473 (Tiny Tapeout Marcos Fernandez) tt_um_wokwi_465737290543084545 (Tiny Tapeout Template) tt_um_wokwi_465630130495825921 (ram 1 bit Copy) tt_um_wokwi_465731403724006401 (sdft wokwi 1) tt_um_top (RHD2164-MCU-SPI Bridge) tt_um_line_follower_arvaloez (Line Follower Robot controller) tt_um_xoroshiro64plus_v2 (xoroshiro64) tt_um_ohuettenhofer_tiny_qsim (Tiny Quantum Circuit Simulator) tt_um_santhosh_ring_osc_gf (Ring Oscillator PVT Sensor & TRNG (GF180)) tt_um_santhosh_stoch_stdp_pair_gf (Stochastic neuron + STDP controller (merged, GF180)) tt_um_santhosh_rsd_char_gf (RRAM Characterization Platform (DC sweep + endurance + retention + histogram, GF180)) tt_um_santhosh_xbar_ctrl_gf (Memristive Crossbar Peripheral Controller (GF180)) tt_um_joseph_bf (BF) tt_um_hydrocomms (FSK Modem) tt_um_systolic_array (2x2 MAC Systolic array with DFT) tt_um_kluterirv_rv32e_core (Minimal RV32E SoC with UART Loader) tt_um_algofoogle_ttgf26a_vco (VCO driven by DAC) tt_um_fer_logo_music_vga (UNIZG-FER VGA project) tt_um_maqsudbek_dyadic_pwm (Dyadic PWM) tt_um_waferspace_vga_screensaver (Wafer.space Logo VGA Screensaver) tt_um_htfab_vga_tester (Video mode tester)