April 6, 2020

FPGA Tooling on Ubuntu 20.04

In this post, I test common FPGA tools for compatibility with Ubuntu 20.04 (AKA Focal Fossa), and my regular desktop OS: Pop!_OS 20.04. These tests are in no way exhaustive: I have tried using the applications as I usually do to exercise the main functionality. For me, the biggest gain in moving to 20.04 has been the responsiveness of the desktop.

Last updated 2020-05-23: follow WillFlux for future updates.

IceStorm Tools

  • Version: Latest from GitHub on 2020-05-19
  • Source: GitHub
  • OS: Ubuntu 20.04 and Pop!_OS 20.04
  • Extra Packages Required: see compiling, below
  • Fixes Required: No
  • Test Result: OK

Tested with iCEBreaker board.

Compiling

I have successfully compiled and installed IceStorm tools following Claire Wolf’s instructions. Prerequisites are common to this, NextPNR, and Yosys.

apt install build-essential clang bison flex libreadline-dev \
    gawk tcl-dev libffi-dev git mercurial graphviz   \
    xdot pkg-config python python3 libftdi-dev \
    qt5-default python3-dev libboost-all-dev cmake libeigen3-dev

git clone https://github.com/cliffordwolf/icestorm.git icestorm
cd icestorm
make -j$(nproc)
make install

NextPNR

  • Version: Latest from GitHub on 2020-05-19
  • Source: GitHub
  • OS: Ubuntu 20.04 and Pop!_OS 20.04
  • Extra Packages Required: see compiling, below
  • Fixes Required: No
  • Test Result: iCE40 OK (other architectures not tested)

Compiling

I have successfully compiled and installed NextPNR for iCE40 following Claire Wolf’s instructions. Prerequisites are common to this, IceStorm Tools, and Yosys.

apt install build-essential clang bison flex libreadline-dev \
    gawk tcl-dev libffi-dev git mercurial graphviz   \
    xdot pkg-config python python3 libftdi-dev \
    qt5-default python3-dev libboost-all-dev cmake libeigen3-dev

git clone https://github.com/YosysHQ/nextpnr nextpnr
cd nextpnr
cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local .
make -j$(nproc)
make install

nMigen

I’ve only recently started working with nMigen, but it looks like a promising HDL that plays nicely with existing toolchains. nMigen requires Python 3.6+ and Yosys 0.9+; both included in Ubuntu 20.04. However, I recommend updating to the latest version of Yosys from source.

  • Version: Latest from GitHub on 2020-04-07
  • Source: nMigen GitHub
  • OS: Ubuntu 20.04 and Pop!_OS 20.04
  • Extra Packages: python3-pip
  • Fixes Required: No
  • Test Result: OK

Extra Packages

On a minimal Ubuntu install you need to install pip to work with Python packages:

apt install python3-pip

Quartus

Quartus 20 lite is not yet available, so I have been trying to get version 19 running following the Ubuntu 18.04 instructions.

  • Version: Intel Quartus Prime 19.1.0.670 Lite
  • Source: intel.com
  • OS: Ubuntu 20.04 only
  • Extra Packages: see below
  • Fixes Required: TBD
  • Test Result: TBD

I don’t have an Intel/Altera board at the moment, so I’m limited in what I can test.

Extra Packages

The Quartus installation instructions call for the installation of additional packages on Ubuntu, many of them 32-bit i386. There almost weren’t any i386 packages in Ubuntu 20.04, see Statement on 32-bit i386 packages for Ubuntu 19.10 and 20.04 LTS, but in the end, all but three of them are available in 20.04.

Install the available packages:

    apt install libc6:i386 libc6-dev-i386 liblzma-dev libncurses5:i386 \
      libqt5xml5 libstdc++6:i386 libxft2 libxft2:i386 libxtst6:i386 lib32z1

The three missing packages are:

  • lib32bz2-1.0
  • lib32ncurses5
  • libpng12

libpng12 was last part of an LTS release in 16.04 Xenial! Intel suggests you download the Xenial version and install it manually.

The other two haven’t been part of Ubuntu in many years.

Status 2020-05-23: I had display issues with Ubuntu 20.04 beta (unrelated to Quartus). I plan to try again with a VM now 20.04 has been out a month.

Verilator

  • Version: Verilator 4.028 2020-02-06 rev v4.026-92-g890cecc1
  • Source: Ubuntu package
  • OS: Ubuntu 20.04 and Pop!_OS 20.04
  • Extra Packages: None
  • Fixes Required: No
  • Test Result: OK

Verilator is included as a package in Ubuntu 20.04 and is only a couple of minor releases behind veripool.org. In my initial testing, I haven’t seen any issues.

Vivado

Vivado 2020.x is not yet available, but 2019.x supports Ubuntu 18.04 and is straightforward to get running on Ubuntu 20.04.

  • Version: Xilinx Vivado 2019.2
  • Source: xilinx.com
  • OS: Ubuntu 20.04 and Pop!_OS 20.04
  • Extra Packages: libtinfo5 libncurses5
  • Fixes required: No
  • Test Result:
    • Simulation: OK
    • Synthesis: OK
    • Implementation: OK
    • Bitstream Generation: OK
    • DocNav: Not Tested
    • HLS: Not Tested

Extra Packages

Install these packages:

    apt install libtinfo5 libncurses5
  • libtinfo5 [universe] - without this Vivado GUI won’t start
  • libncurses5 [universe] - without this simulation fails to compile

Cable Drivers

After running the Vivado installer on Linux, you need to install cable drivers as root. If you don’t install cable drivers, you won’t be able to connect to boards. This is the case for all Linux installs, not just Ubuntu 20.04, but is a common oversight, so I have included details here.

    # change directory to your Vivado install, for example:
    cd /opt/Xilinx/Vivado/2019.2

    # cd into the drivers directory (the script MUST be run there)
    cd data/xicom/cable_drivers/lin64/install_script/install_drivers

    # run the cable installer with root privs
    sudo ./install_drivers

Yosys

  • Version: Yosys 0.9+2406 (git sha1 026fed31, clang 10.0.0-4ubuntu1 -fPIC -Os)
  • Source: Yosys GitHub on 2020-05-19
  • OS: Ubuntu 20.04 and Pop!_OS 20.04
  • Extra Packages Required: see compiling, below
  • Fixes Required: No
  • Test Result: OK

Yosys 0.9 is available as a package for Ubuntu 20.04. I initially tested the package version without any issues, but have since moved to compiling the latest version from GitHub. I successfully compiled and installed Yosys following Claire Wolf’s instructions. Prerequisites are common to this, IceStorm Tools, and NextPNR.

apt install build-essential clang bison flex libreadline-dev \
    gawk tcl-dev libffi-dev git mercurial graphviz   \
    xdot pkg-config python python3 libftdi-dev \
    qt5-default python3-dev libboost-all-dev cmake libeigen3-dev

git clone https://github.com/YosysHQ/yosys yosys
cd yosys
make -j$(nproc)
make install

©2020 Will Green, Project F