Prerequisites
Host OS
Linux or Linux WSL.
Vivado
Vivado ML Edition V2023.1, Linux version:
Make sure you also install your Arty A7 board files. Digilent has excellent instructions for installing Vivado and Digilent board files:
https://digilent.com/reference/programmable-logic/guides/installing-vivado-and-vitis
RISCV Toolchain
RISCV Compiler Toolchain rv32imcb. This is the cross-compiler for building the code that'll run on the Ibex processor. I'm using the 20220210-1 pre-built binaries from lowRISC:
https://github.com/lowRISC/lowrisc-toolchains/releases
Add the toolchain's bin/ directory to your PATH. E.g.:
export RISCV_TOOLCHAIN=$HOME/lowrisc-toolchain-gcc-rv32imcb-20220210-1
export PATH=$PATH:$RISCV_TOOLCHAIN/bin
GNU Make
Version 4.2.1 or later.
sudo apt-get install make
Bender
Version 0.28.1:
https://github.com/pulp-platform/bender/releases/tag/v0.28.1
Add bender to your PATH.
OSS CAD Suite (CoCoTB, iverilog, GTKWave, openFPGALoader, OpenOCD)
Version 2024-03-18.
Installation instructions: https://github.com/YosysHQ/oss-cad-suite-build#installation
Ncurses
sudo apt-get install libncurses5-dev libncursesw5-dev libncursesw5
CMake
Version 3.24 or later.
On Ubuntu, follow these instructions: https://apt.kitware.com/
Make sure that the correct CMake version is first in your PATH. The Vivado /tools/Xilinx/Vivado/2023.1/settings64.sh script adds an old version of CMake to your path. I override that by re-adding /usr/bin to the front of the PATH after sourcing the Vivado script:
source /tools/Xilinx/Vivado/2023.1/settings64.sh
export PATH=/usr/bin:$PATH
Pip
sudo apt-get install python3-pip
LiteX (optional)
The source code generated by LiteX is checked into the BoxLambda source tree so LiteX itself is not needed to build any of the BoxLambda projects.
A LiteX installation is only needed if for some reason you want to regenerate the LiteDRAM memory controller code (see.
To install the BoxLambda fork of LiteX, go through the following steps:
cd <boxlamdba src tree>/sub/litex
./litex_setup.py --init --install --user
SDL2 (optional)
SDL2 is needed to run Verilator simulation testcases involving the VERA graphics core.
https://wiki.libsdl.org/SDL2/Installation
Also, make sure to set environment variable SDL2_DIR to point to the SDL2 directory containing files SDL2Config.cmake or sdl2-config.cmake. In my case (Ubuntu 22.04), I added the following line to my ~/.bashrc:
export SDL2_DIR=/usr/lib/x86_64-linux-gnu/cmake/SDL2/
PortAudio (optional)
PortAudio is needed to run Verilator simulation testcases involving the YM2149 PSG sound core.
sudo apt-get install libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg
Chromaprint (optional)
Chromaprint is needed to run Verilator simulation testcases involving the YM2149 PSG sound core.
sudo apt-get install libchromaprint-tools
NumPy, SciPy, SoundDevice, and Matplotlib (optional)
These Python modules are needed to run Verilator simulation testcases involving the YM2149 PSG sound core.
pip install numpy scipy sounddevice matplotlib
Perl (optional)
Perl is only required if you would like to tinker with the usb_hid_host firmware. Your system most likely already has Perl installed. If not:
sudo apt-get install perl.
Gforth (optional)
Gforth is only required if you would like to tinker with the usb_hid_device firmware.
sudo apt-get install gforth
Ninja and Meson (optional)
Ninja and Meson are only required if you want to rebuild the Picolibc library.
sudo apt-get install ninja-build
sudo apt-get install meson
Jekyll (optional)
Jekyll is only required if you want to build the BoxLambda Blog website.
sudo apt-get install rubygems ruby-bundler
Switch to the gh-pages branch:
git checkout gh-pages
Run Bundle install:
bundle install
MkDocs (optional)
MkDocs is only required if you want to build the BoxLambda read-the-docs website.
pip install mkdocs
pip install mkdocs-material
pip install pymdown-extensions