fm4dd / gatemate-riscv

RISCV CPU implementation tutorial steps for Cologne Chip Gatemate E1, adopted from https://github.com/BrunoLevy/learn-fpga
BSD 3-Clause "New" or "Revised" License
12 stars 2 forks source link
fpga-programming gatemate risc-v verilog

Gatemate RISC-V Tutorial

Description

 

This repository contains the Verilog project folders for the popular FPGA tutorial "From Blinker to RISCV" by BrunoLevy. The original tutorial has been adapted for the Gatemate E1 FPGA evaluation board made by Cologne Chip. It describes a step-by-step implementation of the FemtoRV softcore CPU, which is a minimalistic RISC-V CPU design written in Verilog.

Most of the tutorial steps require only a pushbutton and a set of LEDs, they can be easily completed using the Gatemate E1 evaluation board "stand-alone". Only later exercises interface with additional hardware that need extra connectivity. For example, the UART serial output introduced in step17 can be achieved with Digilents PMOD USBUART.

This tutorial adoption puts the Gatemate E1 on par with popular FPGA trainer boards that include the Digilent ARTY/CMOD-A7, Lattice ECP5-EVN/IceStick, Radiona ULX3S, or the 1Bitsquared IceBreaker.

Enjoy!

Tutorial Steps

Prerequisites

Basic Verilog Code Blocks

RISC-V CPU Implementation Steps

Step11 Verilog module design

Step17 serial console output

Step18 serial console output

Prerequisites

RISC-V CPU Apps in Assembly and C

Next Steps / Further Reading

Bruno Levy created the sequel tutorial "Episode II" that improves the RISC-V CPU design into a pipelined CPU. This requires a FPGA with at least 128kB BRAM. The DS1001 datasheet for Gatemate's CCGM1A1 FPGA specifies 1,310,720 bits (163KB) BRAM, organized in 32 SRAM blocks that are configurable either as 20Kbit or 40Kbit blocks. This sounds promising ...

Almost all content is Copyright (c) 2020-2021, Bruno Levy All rights reserved. (License) Small adoption changes fall under the same license.

Tokyo, August 2023