Crappy RISC-V CPU and fancy peripherals designed to be useful.

Overview

Quasi SoC

Crappy RISC-V CPU and fancy peripherals designed to be useful. Always half-baked. Prioritize compatibility over performance.

∂CPU (partial CPU)

  • Multiple-cycle RISC-V RV32IM @ 62.5 MHz
  • M-mode CSR (partial but enough)
  • Interrupt (timer, external, software)
  • Exception (ecall, break, partial invalid instructions)
  • Basic/Custom memory protection, Sv32 MMU
  • GDB debug over openocd JTAG
  • Memory-mapped IO (1 host, multiple guests)
  • Bus arbitration (multiple hosts, graphics unit or debugger)
  • Formal verification (not planned)
  • Pipeline (not planned)
  • Supervisor/User privilege level support (not planned)

Peripherals

  • ESP-PSRAM64H as main memory, 8 MB, QPI mode @ 62.5 M, burst R/W
  • Cache, direct mapping 32 KB(configurable)
  • SDRAM (Easy but not before I get a better board)
  • GPIO (LEDs, buttons, switches)
  • UART (921600 baud), load assembly from UART, reset CPU from UART
  • SD card (SPI mode, SDHC)
  • PS/2 keyboard
  • HDMI character terminal
  • HDMI frame buffer graphics, 320x240 8-bit color or 640x480 2-bit monochrome
  • CH375 Serial, USB disk support
  • W5500 ethernet module
  • LAN8720 ethernet module w/ RGMII (Hard)
  • ESP8266/ESP32 Wifi module (Boring)
  • Interrupt Timer
  • Bus converter to use AXI/Wishbone peripherals, high priority

Software

  • Standard RISC-V toolchain for RV32IM Newlib
  • Basic RISC-V tests passed
  • CoreMark performance approx. 0.27 CoreMark/MHz
  • MicroPython port, deprecated, TODO: update
  • Fancy but very slow soft renderer

Boards & FPGAs

  • xc7z010 PL @ SqueakyBoard, main dev platform ref
  • xc7z020 PL @ PYNQ-Z1 w/ extension PMOD module ref
  • xc7k325t @ Memblaze PBlaze 3 w/ extension board ref
  • xc6slx16 @ Nameless LED controller module, UART only
  • ep2c35 @ Cisco HWIC-3G-CDMA router module ref, plan to buy
  • Xilinx 7-series w/ free software toolchain(Symbiflow), high priority
  • lfe5u or iCE40 w/ free software toolchain(Symbiflow, icestorm)
  • K210 or some other hardcore RISCV

Build & Run

Instructions here

Gallery

Pingo soft renderer of Viking room, with testing color strips, on HDMI monitor.

Pingo soft renderer on HDMI frame buffer

Ported MicroPython, on HDMI monitor.

MicroPython on HDMI character terminal

CoreMark benchmarking, serial port.

CoreMark benchmarking

Process switching demo and inter-process communication, early-stage microkernel osdev, serial port.

Interrupt based process switching demo(early stage osdev)

Credits

Many peripherals' code are based on other's work. If I miss something please point out.

HDMI module, modified

HDMI module

SD card module, modified

UART module, heavily modified

Computer Organization and Design, where everything started

License

GPL-V3 except sd_controller.v

You might also like...
A Pipelined RISC-V RV32I Core in Verilog
A Pipelined RISC-V RV32I Core in Verilog

Toast-RV32i Toast is a RISC-V soft core written in Verilog that implements a subset of the RV32I ISA version 2.2. Documentation: https://toast-core.re

RISC-V has a 128-bit ISA that is fairly developed, but not standardized fully yet.

128-bit RISC-V assembler RISC-V has a 128-bit ISA that is fairly developed, but not standardized fully yet. I am maintaining a RISC-V userspace emulat

Port of MIT's xv6 OS to the Nezha RISC-V board with Allwinner D1 SoC

xv6 is a re-implementation of Dennis Ritchie's and Ken Thompson's Unix Version 6 (v6). xv6 loosely follows the structure and style of v6, but is impl

Risc-V RV32IMAFC + 80s ERA SoC (bitmap + GPU, sprites, tilemaps)
Risc-V RV32IMAFC + 80s ERA SoC (bitmap + GPU, sprites, tilemaps)

A simple (no interrupts or exceptions/traps), Risc-V RV32IMAFC CPU, with a pseudo SMT (dual thread) capability. The display is similar to the 8-bit era machines, along with audio, SDCARD read support, UART and PS/2 keyboard input.

Rebuild YatSenOS On RISC-V 64.
Rebuild YatSenOS On RISC-V 64.

YatSenOS RISC-V 64 Rebuild YatSenOS On RISC-V 64. It is not be guaranteed that there are no bugs in the project :( This REAME is too concise to unders

Fork of the RPCEmu RISC PC emulator, with patches. The "master" branch is the original RPCEmu, the "philpem" branch contains my patches.

RPCEmu ~~~~~~ RPCEmu is an emulator of Acorn's Risc PC and A7000 machines. It is a work in progress and should be considered of Alpha Quality. The l

An operating system for RISC V, featuring a small microkernel

ilo pali An operating system for RISC V, featuring a small microkernel. Build instructions Install the Newlib GNU RISC-V toolchain and do make to buil

Single-chip solution for Hi-speed USB2.0(480Mbps) JTAG/SPI Debugger based on RISC-V MCU CH32V30x/CH32V20x

480Mbps High Speed USB2.0 JTAG Debugger Open source information |-- bin |--------MCU: MCU target program |--------WIN APP |------------------USB20Jtag

Library of useful C++ snippets and reusable classes I've created as I build out Arduino Uno and ESP32 projects.

Arduino Snippets Library of useful C++ snippets and reusable classes I've created as I build out Arduino Uno and ESP32 projects. Button A simple butto

Comments
  • What's the plan to update riscv32-linux-nommu?

    What's the plan to update riscv32-linux-nommu?

    I met the same case to need riscv32 linux nommu support. Currently, boot the riscv32 nommu kernel successfully, but the the ramfs's init process failed. I have tried to fix it, but not success. So, What's the plan to update those patches, Thanks a lot firstly.

    opened by BabyMelvin 3
Owner
Peter Gu
Post-undergrad amatuer programmer
Peter Gu
A fancy shmancy Settlers of Catan board

smarchSettlers I freaking love boardgames. I also, happen to love making things. I figured why not make a s fancy shmancy Settlers of Catan board. Whe

null 40 Dec 21, 2022
A crappy hook on SpAcceptLsaModeContext that prints incoming auth attempts. WIP

About Hooks for intercepting SpAcceptLsaModeContext to print any incoming authentication attempts to Beacon. The hook is installed on the Lsass heap t

Austin Hudson 0 Dec 11, 2021
This is an upgrade to the initial TerminalOS source, supporting real hardware other than just QEMU, using GRUB as a bootloader instead of the crappy one i wrote

Terminal OS Author: Maheswaran Date: 20th Nov 2021 PROGRESS Multiboot compilance achieved VGA driver from complete with print_hex, print_dec, printf f

Maheswaran Parameswaran 1 Nov 28, 2021
Newlib for Xuantie RISC-V CPU, a lightweight C library for embedded systems.

README for GNU development tools This directory contains various GNU compilers, assemblers, linkers, debuggers, etc., plus their support routines, d

T-Head Semiconductor Co., Ltd. 5 Sep 9, 2022
Patches & Script for AOSP to run on Xuantie RISC-V CPU

Overview Graph 1. AOSP on RISC-V 64(XuanTie 910) Video for Android on XuanTie910 News and related resources Chip ICE is a XuanTie C910 based high perf

T-Head Semiconductor Co., Ltd. 432 Jan 2, 2023
RISCAL is a 32-bit reduced instruction-set computer (RISC) designed for learning and research purposes. It is named after my dog, Rascal.

RISCAL CPU RISCAL is a 32-bit custom instruction set architecture virtual machine. It is intended to be used for learning/research purposes. In a nuts

null 3 Dec 23, 2021
Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.

Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.

Pavel Stehule 1.9k Jan 4, 2023
User-mode trap-and-emulate hypervisor for RISC-V

URVirt URVirt is a U-mode trap-and-emulate hypervisor for RISC-V. Related projects RVirt is an S-mode trap-and-emulate hypervisor for RISC-V. It runs

null 12 Sep 16, 2022
bl_mcu_sdk is MCU software development kit provided by Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706 and other series of RISC-V based chips in the future.

bl mcu sdk is an MCU software development kit provided by the Bouffalo Lab Team for BL602/BL604, BL702/BL704/BL706 and other series of chips in the future

Bouffalo Lab 165 Dec 23, 2022
Tiny FEL tools for allwinner SOC, support RISC-V D1 chip

XFEL Tiny FEL tools for allwinner SOC, support RISC-V D1 chip. How to build The xfel tools depends on the libusb-1.0 library, you need to install libu

xboot.org 132 Dec 30, 2022