Syfala toolchain dependencies

The Syfala toolchain is a compilation toolchain of Faust programs onto AMD-Xilinx FPGA targets. This document explains how to install and run the version 0.10.0 of the toolchain on a Linux machine. In practice, installing the Syfala toolchain means:

Linux platforms

We recommend using Ubuntu (>= 18.04 LTS) for installing and using the toolchain, since it is officially supported by AMD-Xilinx. While it is still possible to use other distributions, such as Archlinux, you may encounter unresolved bugs, which won't necessarily appear in our Troubleshooting section below.

Ubuntu/Debian dependencies

sudo apt-get update 
sudo apt-get install git libncurses5 libtinfo-dev build-essential default-jre pkg-config g++-multilib gtk+2.0 locales

Archlinux dependencies

# faust (required)
sudo pacman -S faust

# for xilinx vivado/vitis etc.
yay -S ncurses5-compat-libs libxcrypt-compat libpng12 lib32-libpng12 xorg-xlsclients gtk2

Faust

It is recommended to clone Faust from the official github repository: https://github.com/grame-cncm/faust

git clone https://github.com/grame-cncm/faust.git 
cd faust
make -j8
sudo make install

Vivado, Vitis & Vitis HLS (2024.1 version)

A) Using flatpak

B) Manually

chmod a+x FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023_Lin64.bin
./FPGAs_AdaptiveSoCs_Unified_2024.1_0522_2023_Lin64.bin

Choosing the components to install (for both installation methods)

export XILINX_ROOT_DIR=$HOME/Xilinx
set -x XILINX_ROOT_DIR $HOME/Xilinx
export XILINX_FLATPAK=TRUE

Installing Cable Drivers on Linux

cd $XILINX_ROOT_DIR/Vivado/2024.1/data/xicom/cable_drivers/lin64/install_script/install_drivers
./install_drivers
# Allow JTAG-USB connection:
sudo cp 52-xilinx-digilent-usb.rules /etc/udev/rules.d

Installing Digilent Board Files

Cloning the Syfala repository

To clone and install the latest stable version of the Syfala toolchain, you can use the following commands:

git clone https://github.com/inria-emeraude/syfala 
cd syfala
make install
syfala --help

In order to use the Syfala toolchain to compile your first example, please report to the main README file located in the repository's root directory.

Troubleshooting

On Archlinux, if you see an error like this one

/lib/../lib64/crti.o: file not recognized: File format not recognized

you'll have to rename the Vivado/202x.x/tps/lnx64/binutils-2.26 (Vitis will then search in the system libraries).

Vitis/Java issues

On recent systems (or with Archlinux), you might have problems compiling the host-side (ARM) application. The problem is caused by system libraries requiring newer versions of GCC than the one provided by Vitis. Replacing GCC target in Vitis' path by system GCC works:

cd $XILINX_ROOT_DIR/Vitis/202x.x/lib/lnx64.o/Default
mv libstdc++.so.6 libstdc++.so.6.old
rm -rf libstdc++.so (symlink)
sudo ln -s /usr/lib/libstdc++.so.6 libstdc++.so.6

Installing the 2022 patch (AMD-Xilinx toolchain v2020.2 only)

Vivado and Vitis tools that use HLS in the background are also affected by this issue. HLS tools set the ip_version in the format YYMMDDHHMM and this value is accessed as a signed integer (32-bit) that causes an overflow and generates the errors below (or something similar).

cd $XILINX_ROOT_DIR
export LD_LIBRARY_PATH=$PWD/Vivado/2020.2/tps/lnx64/python-3.8.3/lib/
Vivado/2022.2/tps/lnx64/python-3.8.3/bin/python3 y2k22_patch/patch.py