In this post I’ll explore a bit the Open Source toolchain for Xilinx Series 7 FPGAs and will focus the Artix 7. The post will detail how to run the complete flow using Docker containers avoiding local toolchain installs and homogenizing the process for most platforms (Linux, Mac, Windows).
As seen above, the architecture and dependency is not a walk in the park but abstracting them with straightforward tools like FuseSoc, Edalize and containers makes things a bit easier.
Installing the pre-requisites
Unfortunately not everything is in containers or work on them and you need to install some pre-requisites on your computer for this.
First Docker on Linux or Docker Desktop on your Mac or Windows. This is the runtime that runs the containers. If using Windows I recommend using WSL2 as it makes things easier providing the command line tools.
Second, you need a local Python 3 install to run FuseSoc. It can be downloaded from https://www.python.org/.
Finally the programming tool that can transfer the bitstream to your FPGA. This task is still not straightforward to run on a container in Windows and Mac since Docker Desktop runs in a virtual machine and is not able to access your locally connected USB devices. I recommend getting the pre-built OpenOCD binaries on https://github.com/xpack-dev-tools/openocd-xpack/releases or using
brew install open-ocd if using a Mac.
Build the Docker image locally
Since the container image targeting Xilinx Artix7 FPGAs will be a hefty 23GB (due to the device databases), I did not upload it to DockerHub. Instead I recommend building it locally. It's quite fast depending mostly on your download speeds.
You need two files, the entrypoint script that sets environment and the Dockerfile itself. Both are embedded here: