Skip to content

KramerHendrix/vsdfpga_labs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VSDSquadron FPGA mini Lab: Basic Message Display on RISC-V core

RISC-V Logo

Prerequisites

Install the following tools before proceeding:

# General dependencies
sudo apt-get install git vim autoconf automake autotools-dev curl libmpc-dev \
libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool \
patchutils bc zlib1g-dev libexpat1-dev gtkwave picocom -y

# FPGA toolchain (Yosys/NextPNR/IceStorm)
sudo apt-get install yosys nextpnr-ice40 icestorm iverilog -y

# RISC-V Toolchain (GCC 8.3.0)
cd ~
mkdir -p riscv_toolchain && cd riscv_toolchain
wget "https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14.tar.gz"
tar -xvzf riscv64-unknown-elf-gcc-*.tar.gz
echo 'export PATH=$HOME/riscv_toolchain/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-ubuntu14/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

Setup

  1. Clone the repository:
    cd ~
    git clone https://github.com/vsdip/vsdfpga_labs

Hardware Connections

Source Component Source Pin/Port Destination Component Destination Pin/Port
CH340 TX VSDFPGA Board 3
CH340 RXD VSDFPGA Board 4
VSDFPGA Board GND FPGA Board 23
CH340 3.3V CH340 VCC

Building & Flashing

  1. Review the RISC-V logo code (do not modify):
    cd ~/vsdfpga_labs/basicRISCV/Firmware
    nano riscv_logo.c  # Review and close (Ctrl+X)
    make riscv_logo.bram.hex

You should see the below messages Make RISC-V output

  1. Build the firmware and FPGA bitstream:

    cd ~/vsdfpga_labs/basicRISCV/RTL
    make clean
    make build
  2. Flash to FPGA:

    sudo make flash

Running the Lab

  1. Open the serial terminal:

    make terminal

    Expected Output:
    You should see repeated messages containing RISC-V logo data (e.g., ASCII art patterns).

    RISC-V Logo

  2. Press Ctrl+A → Ctrl+Q to exit picocom.


Notes

  1. If /dev/ttyUSB0 is unavailable, update PICO_DEVICE in the Makefile.
  2. The RISC-V toolchain must be in your PATH (configured in prerequisites).
  3. Ensure all hardware connections match the table above for UART communication.

About

Fork of beginner RISC cpu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 77.6%
  • Assembly 11.9%
  • Verilog 6.2%
  • Linker Script 2.5%
  • Makefile 1.1%
  • BitBake 0.4%
  • Shell 0.3%