VSDSquadron FPGA mini Lab: Basic Message Display on RISC-V core
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
- Clone the repository:
cd ~ git clone https://github.com/vsdip/vsdfpga_labs
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 |
- Connect the VSDSquadron FPGA mini board to one USB port.
- Connect the CH340 module to another USB port.
- 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
-
Build the firmware and FPGA bitstream:
cd ~/vsdfpga_labs/basicRISCV/RTL make clean make build
-
Flash to FPGA:
sudo make flash
-
Open the serial terminal:
make terminal
Expected Output:
You should see repeated messages containing RISC-V logo data (e.g., ASCII art patterns). -
Press
Ctrl+A → Ctrl+Q
to exitpicocom
.
- If
/dev/ttyUSB0
is unavailable, updatePICO_DEVICE
in theMakefile
. - The RISC-V toolchain must be in your
PATH
(configured in prerequisites). - Ensure all hardware connections match the table above for UART communication.