Back: FPGAs
I bought myself a Radiona ULX3S from CrowdSupply, which includes the 85k Lattice ECP5 FPGA, which can be programmed to simulate the open source 32-bit RISC-V CPU with a completely open source LiteX-yosys-nextpnr, toolchain. Here is a screenshot of it running Linux over the serial connection; note the riscv32 processor:
Feb. 3, 2025
The ECP5 is a 50Mhz FPGA, which I believe is why the system runs pretty slow. I’m very excited about the purely open source toolchain, and I look forward to experimenting with faster and larger FPGAs using this toolchain in the future!
Here are the commands that I used on Ubuntu 24.04.1 LTS, while having the ULX3S connected via USB.
Install System Dependencies
sudo apt-get install python3-venv
Create Project Folder and Create Virtual Environment
mkdir litex-riscv-ulx3s && cd litex-riscv-ulx3s
python3 -m venv venv && source venv/bin/activate
Download and Setup Litex
wget https://raw.githubusercontent.com/enjoy-digital/litex/master/litex_setup.py
chmod a+x litex_setup.py && ./litex_setup.py --init --install
cd ..
Download and Setup RISC-V Compiler Toolchain
wget https://github.com/RT-Thread/toolchains-ci/releases/download/v1.4/riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
tar zxf riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14.tar.gz
cd riscv64-unknown-elf-toolchain-10.2.0-2020.12.8-x86_64-linux-ubuntu14
export PATH=$PATH:$PWD/bin
cd ..
Download and Setup and Program FPGA using Linux-on-Litex-VexRiscV
pip3 install meson ninja
git clone https://github.com/litex-hub/linux-on-litex-vexriscv.git
cd linux-on-litex-vexriscv
./make.py --board=ulx3s --device=LFE5U-85F --build --load
Booting Linux over Serial USB
The ULX3S does not support booting without an SD card inserted. I used an 8GB SD card.
litex_term --images=images/boot.json /dev/ttyUSB0
After typing the above command, you will probably see no output. You will need to press Return, which should show the Litex prompt. At the Litex prompt, you will need to type the following to reboot the device and start the firmware and software uploads:
reboot
Next steps include writing the boot data to the SD card so that I don’t need to boot over the USB serial connection each time.