Member-only story

Using Xilinx Open Source FPGA Toolchain on Docker Containers

Carlos Eduardo
5 min readApr 23, 2021

--

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).

Open source toolchain ecosystem (https://github.com/hdl/awesome/issues/98)

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:

--

--

Carlos Eduardo
Carlos Eduardo

Written by Carlos Eduardo

Writing everything cloud and all the tech behind it. If you like my projects and would like to support me, check my Patreon on https://www.patreon.com/carlosedp

Responses (1)

Write a response