Skip to the content
2 layers68.6 × 99.1 mmLcd, the printed circuit board in 3D

Risc-V pipelined CPU and SoC written in SystemVerilog

Size
68.6 × 99.1 mm
Copper layers
2
Thickness
1.6 mm
Parts
3
Nets
168
Pads
168
Tracks, vias
0, 0
Routed
Not yet
KiCad
KiCad 6 (file 20211014)
Created
12 Mar 2023
Updated
5 May 2025

Overview

Lcd is an open-source printed circuit board by apistol78, from the apistol78/rv32 repository on GitHub. It is a 2-layer board of 68.6 × 99.1 mm with 3 parts on 168 nets.

It belongs with the fPGA and programmable logic and lEDs and displays boards and the RP2040 and FPGA and CPLD boards of this library.

README

readme.md

MOJO Risc-V CPU and System-on-a-Chip

The MOJO SOC is an educational and fun system for FPGA and "Bare metal" programming experimentations.
It's a RISC-V CPU running at 100 MHz, 32 MiB RAM, audio and 320*200 video resolution. To make user input easy I've moved USB host functionality to an external PCB using Raspberry Pico as a FPGA <-> HID bridge.

Prerequisites

This project require an install of Traktor to generate required resources. You will also need a RISC-V GCC toolchain compiled and installed at /opt/riscv32/bin on your machine.

How to build

Run build.sh to build host (i.e. Linux) and target products:

text
./build.sh

After everything has been built you should be able to run the emulators:

text
./build/linux/ReleaseStatic/Rv32T -elf=./build/rv32/ReleaseStatic/Boot

or

text
./build/linux/ReleaseStatic/Rv32 -elf=./build/rv32/ReleaseStatic/Boot

CPU

MOJO CPU is a conventional 5-stage (F,D,X,M,W) pipelined RISC-V CPU. It also contain configurable data- and instruction caches.

Written using SystemVerilog and are split up into logical pieces where each stage of the pipeline is in a separate module:

ModuleDescription
CPU_ALUALU unit, fully combinatorial
CPU_CSRCSR control unit
CPU_DCache_CombData cache, combinatorial
CPU_DCache_RegData cache, registered
CPU_DCache_NoneData cache, disabled
CPU_DecodeDecode stage
CPU_DefinesCPU defines
CPU_DivideDivison wrapper, usually implemented with a vendor IP
CPU_ExecuteExecute stage
CPU_FetchFetch stage
CPU_ForwardRegister forwarding logic
CPU_ICache_CombInstruction cache, combinatorial
CPU_ICache_RegInstruction cache, registered
CPU_ICache_NoneInstruction cache, disabled
CPU_MemoryMemory stage
CPU_MultiplyMultiplication wrapper, usually implemented with a vendor IP
CPU_RegistersRegister file
CPU_SkidBufferGeneralized skid-buffer
CPU_TypesCPU types
CPU_WritebackWriteback stage

Perifherials

A lot of perifherial modules has been implemented as port of the SoC:

ModuleDescription
AUDIO_controller, AUDIO_i2s_output, AUDIO_pwm_outputPCM based audio modules
BRAMVarious block-ram modules
BRIDGEBUS bridge, to separate BUS devices for improved timing.
BROMBlock-rom module
BusAccessBUS multiplexed access
ClockDividerGeneric clock divider
DMADirect memory access controller
FIFO_BRAMBlock ram backed FIFO
FIFORegister backed FIFO
GPIOGeneral purpose IO controller
I2CI2C controller
LEDLED controller
PLICPLIC interrupt controller
RESETReset controller
SDSD controller
SDRAM_controllerGeneric SDRAM controller
SRAM_interfaceGeneric SRAM controller
SystemRegistersSystem wide register map
TimerHardware timer with compare
UARTUART controller
VIDEO_controllerVideo output controller
VIDEO_VGAVideo VGA signal generator
WriteBufferWrite buffer (queue) with readback or read-through

System-on-a-Chip

A couple of custom PCBs designed to connect to QM-Tech FPGA boards is the physical basis for MOJO SoC. The SoC support following perifherials:

  • HDMI output
  • Stereo audio output through PWM and through I2S HDMI.
  • SD card interface using 4-bit SD protocol.
  • 2 UARTs, one for host and one for HID input.
  • Raspberry Pico based USB host to FPGA bridge supporting three external HID devices (keyboard, mouse and gamepad).

Emulators

Two different emulators, one C++ highlevel emulator and one based on Verilator. The highlevel is useful for application development and the other is used for verification of gate level logic.

Runtime

C/C++ runtime library, including a preemptive multithreaded kernel, expose all hardware features to user programs. Support CRT for easy portability.

Schematics

KiCad schematics for all perifherial boards are available and been built using JLCPCB.

Parts

3
QtyValueFootprintReferences
1Conn_02x20_Odd_EvenConnector_PinSocket_2.54mm:PinSocket_2x20_P2.54mm_VerticalJ3
1Conn_02x32_Odd_EvenConnector_PinSocket_2.54mm:PinSocket_2x32_P2.54mm_VerticalJ1
1~Connector_PinSocket_2.54mm:PinSocket_2x32_P2.54mm_VerticalJ2

More from apistol78/rv32

9
  • 4 layers183.4 × 143.1 mmMotherboard, the printed circuit board in 3D

    Motherboard

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    126 parts1
  • 2 layers129 × 41.9 mmUsb host hub, the printed circuit board in 3D

    Usb host hub

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    61 parts1
  • 2 layers42.7 × 83.8 mmHdmi brd, the printed circuit board in 3D

    Hdmi brd

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    42 parts1
  • 2 layers47 × 83.8 mmQm k7 aux brd, the printed circuit board in 3D

    Qm k7 aux brd

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    27 parts1
  • 4 layers45.7 × 83.8 mmSrambrd, the printed circuit board in 3D

    Srambrd

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    24 parts1
  • 2 layers38.1 × 83.8 mmIobrd, the printed circuit board in 3D

    Iobrd

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    22 parts1
  • 2 layersHdmi tx, the printed circuit board in 3D

    Hdmi tx

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    20 parts1
  • 2 layers30.5 × 83.8 mmLcdbrd, the printed circuit board in 3D

    Lcdbrd

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    13 parts1
  • 2 layers27.4 × 63.2 mmStm32f breakout, the printed circuit board in 3D

    Stm32f breakout

    apistol78/rv32

    Risc-V pipelined CPU and SoC written in SystemVerilog

    3 parts1

Similar boards

  • 2 layers40 × 30 mmBlinky, the printed circuit board in 3D

    Blinky

    earthtojake/text-to-cad

    Design physical products with AI

    3 parts26kMIT
  • 2 layers51.9 × 16 mmPassive2-rpi non standard adapter, the printed circuit board in 3D

    Passive2-rpi non standard adapter

    hzeller/rpi-rgb-led-matrix

    Controlling up to three chains of 64x64, 32x32, 16x32 or similar RGB LED displays using Raspberry Pi GPIO

    3 parts4.4kGPL-2.0
  • 2 layers16.3 × 16.3 mmSensor, the printed circuit board in 3D

    Sensor

    scottbez1/splitflap

    DIY split-flap display

    3 parts4.2k
  • 2 layersSub, the printed circuit board in 3D

    Sub

    atopile/atopile

    Design circuit boards with code! ✨ Get software-like design reuse 🚀, validation, version control and collaboration in hardware; starting with electronics ⚡️

    3 parts4kMIT
  • 2 layers85 × 30 mmDual stomp, the printed circuit board in 3D

    Dual stomp

    torvalds/GuitarPedal

    Linus learns analog circuits

    3 parts2.5kGPL-2.0
  • 2 layers124.5 × 33.7 mm172319-1 connector, the printed circuit board in 3D

    172319-1 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    3 parts1.2k
  • 2 layers10.5 × 83 mmProgrammingAdapter, the printed circuit board in 3D

    ProgrammingAdapter

    stuartpittaway/diyBMSv4

    Version 4 of the diyBMS

    3 parts1.1k
  • 2 layers21.2 × 51.3 mmPico reset, the printed circuit board in 3D

    Pico reset

    hackclub/sprig

    🍃 Learn to code by making games in a JavaScript web-based game editor.

    3 parts1.1kMIT

Questions

How big is the Lcd PCB?

It measures 68.6 × 99.1 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Lcd use?

3 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Lcd KiCad files?

From the apistol78/rv32 repository on GitHub, at the commit this page was made from: the board is schematics/lcd/lcd.kicad_pcb and its schematic schematics/hdmi brd/hdmi brd.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Lcd design in my own project?

Its repository states no licence, so its author keeps all rights: ask apistol78 before reusing the design.