Xilinx Vivado: Difference between revisions

From ArchWiki
(→‎Dependencies: no need to keep "accuracy dispute" flag for ncurses5 library because it is corrected by the original author.)
(update status of external links)
 
(120 intermediate revisions by 27 users not shown)
Line 2: Line 2:
[[ja:Xilinx Vivado]]
[[ja:Xilinx Vivado]]
[[zh-hans:Xilinx Vivado]]
[[zh-hans:Xilinx Vivado]]
{{Style|Write a PKGBUILD}}
Arch Linux is not officially supported by Vivado, but as happens with [[Xilinx ISE WebPACK]], most of its features can be used with a bit of hacking.
ArchLinux is not officially supported by Vivado, but as happens with [[Xilinx ISE WebPACK]], most of its features can be used with a bit of hacking.
 
== Prerequisites ==
 
Xilinx Vivado can be downloaded from its official website [http://www.xilinx.com/products/design-tools/vivado.html]. It's recommended to download "Vivado HLx <year>.<version>: All OS installer Single-File Download" tarball, but make sure not to be in a hurry, as it's a large download (near 19 GB). Update tarballs can also be downloaded and installed later.
 
=== Dependencies ===
Installer needs ncurses5 libs, and will not work with ncurses 6 available at official repos. You can work-around this problem by installing {{AUR|ncurses5-compat-libs}}  from the [[Arch User Repository]]. You will also need to install {{Pkg|libpng12}} and {{Pkg|lib32-libpng12}} for Xilinx Document Navigator to launch.
 
SDK 2018.3 (potentially also other versions) needs gtk2 library. You may need to install {{Pkg|gtk2}} if you are planning to use SDK.


== Installation ==
== Installation ==


You must install the main package, and it is also recommended to install the latest update patch.
Xilinx Vivado can be downloaded from its official website [https://www.xilinx.com/products/design-tools/vivado.html]. It is recommended to download "Vivado HLx <year>.<version>: All OS installer Single-File Download" tarball, but make sure not to be in a hurry, as it is a large download (over 70 GB). Update tarballs can also be downloaded and installed later.


=== Vivado and SDK  ===
=== AUR Package ===
{{Warning |heading=Vivado 2018.1 |align=center |The patch below is not longer needed in the 2018.1 version. Just unpack and run the xsetup file.}}


Once downloaded and unpacked the tarball, the install script must be patched to be able to properly detect the machine architecture. You can do it by going to the directory where installer is extracted and running:
The {{AUR|vivado}} package can be used to create a Vivado installation managed by [[pacman]]. Since the download of the installer is locked behind a login wall, it needs to be downloaded manually as outlined above and placed in the same directory as the [[PKGBUILD]]. The package only builds the latest major version (<year>.<version>), not the minor updates (<year>.<version>.<update>); if these are required, install Vivado manually instead.


$ sed -i.original 's/uname -i/uname -m/' xsetup
=== Digilent USB-JTAG Drivers ===


Install script will be patched and original will be backed up as {{ic|xsetup.original}}, just in case you need to restore it later. Once patched, just run the script; it should work perfect and install the suite without a problem:
To use Digilent Adept USB-JTAG adapters (e.g. the onboard JTAG adapter on the [https://www.zedboard.org ZedBoard]{{Dead link|2023|10|29|status=400}}) from Vivado, you need to install the Digilent [https://store.digilentinc.com/digilent-adept-2-download-only/ Adept Runtime].


# ./xsetup
Make sure you have installed {{AUR|fxload}}.  


It is recommended to install the suite at the default location {{ic|/opt/Xilinx}}, as further instructions in this page will assume the suite is installed there.
To install the Digilent Adept Runtime, it is recommended to install {{AUR|digilent.adept.runtime}}.


=== Update patch ===
In addition, installing {{AUR|digilent.adept.utilities}} may do good to configuring your board.
{{Warning |heading=Vivado 2018.1 |align=center |The patch below is not longer needed in the 2018.1 version.}}


It is recommended to install the latest update patch, and repeat the process each time a new patch is released. Note that update patches cannot be applied to WebPACK installs. If you installed Vivado WebPACK, skip this section.
== Tips and tricks ==


To install the update, repeat the same hack used to install the suite. Once downloaded and unpacked, go to the directory containing the extracted tarball, patch the install script and run it:
=== Enable display scaling ===


$ sed -i.original 's/uname -i/uname -m/' xsetup
Start Vivado, then set the scaling rate through ''Tools > Setting > Display > Scaling''.
# ./xsetup


=== Licensing ===
=== Disable WebTalk ===
{{Warning |heading=Vivado 2018.1 |align=center |In the 2018.1 Webpack version there is not longer required download an explicit license file, it just works.}}


If you already have a license file, you can load it using Vivado License Manager. Unfortunately, if you want to obtain a WebPack license, further steps are needed. Vivado installs old stdc++ libraries, causing problems when spawning programs not included with Vivado Suite (like your default browser). To fix this, do the following steps:
The free WebPACK license does not let you disable this feature which uploads usage data to Xilinx's servers when generating a bitstream, but synthesis will complete just fine if the connection fails. A simple way to make it fail consistently for Vivado tools only is to set an invalid HTTPS proxy for it.


# cd /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/
{{hc|head=/opt/Xilinx/Vivado/<version>/bin/setupEnv.sh|output=
# mv libstdc++.so.6 libstdc++.so.6.orig
...
# ln -s /usr/lib/libstdc++.so.6


Close any running Vivado Suite program, and launch license manager:
export HTTPS_PROXY=localhost}}


$ /opt/Xilinx/Vivado/2015.4/bin/vlm
This method will not pollute your environment, only the temporary environment that is configured upon startup of the tools, so it should not break anything else.


If you try obtaining a WebPack license, your default browser should open, and the license should be generated normally. If Vivado License Manager fails to automatically load the generated license, download the .lic file, and manually load it.
== Troubleshooting ==


=== Digilent USB-JTAG Drivers ===
=== HTML links under Help menu do not open in browser ===
To use Digilent Adept USB-JTAG adapters (e.g. the onboard JTAG adapter on the [http://www.zedboard.org ZedBoard]) from Vivado, you need to install the Digilent [http://store.digilentinc.com/digilent-adept-2-download-only/ Adept Runtime].


Make sure you have installed {{AUR|fxload}}  from the [[Arch User Repository]] .  
See https://support.xilinx.com/s/article/76524?language=en_US


To install the Digilent Adept Runtime, it is recommended to install {{AUR|digilent.adept.runtime}} from the [[Arch User Repository]].
Create file
{{hc|head=/Xilinx_path/Vitis_HLS/yyyy.Q/bin/compat_firefox|output=
#!/bin/sh
unset LD_LIBRARY_PATH
firefox $@
}}


In addition, installing {{AUR|digilent.adept.utilities}} may do good to configuring your board.
then configure the script at ''Window > Preferences > Web Browser''.


=== Linux cable driver ===
=== Vitis HLS no response or only splash screen visible ===
Run as root privilege:


$ {vivado_install_dir}/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_drivers
See https://support.xilinx.com/s/question/0D52E00006hpY4PSAU/vitishls-20202-not-starting-only-splash-screen-visible


== Tips and tricks ==
When you run {{ic|/Xilinx_path/Vitis_HLS/yyyy.Q/bin/vitis_hls}} (the path of Vitis_HLS in *.Desktop file), you may get
{{hc|head=/Xilinx_path/Vitis_HLS/yyyy.Q/bin/vitis_hls|output=
****** Vitis HLS - High-Level Synthesis from C, C++ and OpenCL v2021.2 (64-bit)
  **** SW Build 3367213 on Tue Oct 19 02:47:39 MDT 2021
  **** IP Build 3369179 on Thu Oct 21 08:25:16 MDT 2021
    ** Copyright 1986-2021 Xilinx, Inc. All Rights Reserved.


=== Create .desktop files ===
source /opt/Xilinx/Vitis_HLS/2021.2/scripts/vitis_hls/hls.tcl -notrace
INFO: [HLS 200-10] Running '/opt/Xilinx/Vitis_HLS/2021.2/bin/unwrapped/lnx64.o/vitis_hls'
INFO: [HLS 200-10] For user 'username' on host 'hostname' (Linux_x86_64 version 5.14.16-arch1-1) on Sun Nov 07 21:57:50 CST 2021
INFO: [HLS 200-10] On os "Arch Linux"
INFO: [HLS 200-10] In directory '$HOME'
INFO: [HLS 200-10] Bringing up Vitis HLS GUI ...
}}
Then it is stuck here or exit directly.


{{Note |For 2018.3 and later, there is no need to write .desktop file manually}}
To fix this issue, first change the file {{ic|/Xilinx_path/Vitis_HLS/yyyy.Q/common/scripts/autopilot_init.tcl}} line 40


To ease launching programs, you can create the following .desktop files for Vivado IDE, SDK and DocNav:
from
----%r&-'%rl%&n$&lt'v-=
to
----%r&-'%rl%&n$&lt'v->


{{hc|head=~/.local/share/applications/Xilinx-VivadoIDE.desktop|output=
Then add
#!/usr/bin/env xdg-open
osgi.locking=none
[Desktop Entry]
to file
Version=1.0
Type=Application
Name=Xilinx Vivado IDE
Exec=sh -c "unset LANG && unset QT_PLUGIN_PATH && source /opt/Xilinx/Vivado/2018.1/settings64.sh && vivado"
Icon=/opt/Xilinx/Vivado/2018.1/doc/images/vivado_logo.png
Categories=Development;
Comment=Vivado Integrated Development Environment}}


{{hc|head=~/.local/share/applications/Xilinx-SDK.desktop|output=
{{ic|/Xilinx_path/Vitis_HLS/yyyy.Q/lnx64/tools/eclipse/configuration/config.ini}}
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Name=Xilinx SDK
Exec=sh -c "unset LANG && unset QT_PLUGIN_PATH && source /opt/Xilinx/SDK/2018.1/settings64.sh && xsdk"
Icon=/opt/Xilinx/SDK/2018.1/data/sdk/images/sdk_logo.png
Categories=Development;
Comment=Xilinx Software Development Kit}}
{{hc|head=~/.local/share/applications/Xilinx-DocNav.desktop|output=
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Name=Xilinx Documentation Navigator
Exec=sh -c "/opt/Xilinx/DocNav/docnav"
Icon=/opt/Xilinx/DocNav/resources/doc_nav_application_48.png
Categories=Development;
Comment=Xilinx Documentation Navigator}}
 
=== Enable display scaling ===
Start vivado, then set the scaling rate as follow:
 
Tools -> Setting -> Display -> Scaling
 
== Troubleshooting ==


=== Synthesis segfaults ===
=== Synthesis segfaults ===


See https://forums.xilinx.com/t5/Synthesis/Vivado-crashes-on-Arch-Linux-when-performing-synthesis/td-p/706847
See https://support.xilinx.com/s/feed/0D52E00006hpUycSAE?language=en_US


You'll need to recompile glibc (just take the PKGBUILD from the abs) with {{ic|--disable-lock-elision}}. Instead of patching the system libc in /usr/lib, copy the newly
You will need to recompile {{Pkg|glibc}} (just take the [[PKGBUILD]] from the [[abs]]) with {{ic|--disable-lock-elision}}. Instead of patching the system libc in {{ic|/usr/lib}}, copy the newly
compiled {{ic|libpthread-2.25.so}} and {{ic|libc-2.25.so}} to {{ic|/opt/Xilinx/Vivado/2016.4/ids_lite/ISE/lib/lin64}}
compiled {{ic|libpthread-2.25.so}} and {{ic|libc-2.25.so}} to {{ic|/opt/Xilinx/Vivado/2016.4/ids_lite/ISE/lib/lin64}}
Don't forget to repeat this when glibc gets upgraded.
Do not forget to repeat this when {{Pkg|glibc}} gets upgraded.


=== xsct segfault ===
=== xsct, xsdb, xmd, and tclsh segfault ===


xsct might crash with message:
The Xilinx Vivado command-line tools xsct, xsdb, xmd, and tclsh may crash with a message similar to the following:


  Xilinx/SDK/2018.1/bin/xsct: line 141: 5611 Segmentation fault     (core dumped) "$RDI_BINROOT"/unwrapped/"$RDI_PLATFORM$RDI_OPT_EXT"/rlwrap -rc -f "$RDI_APPROOT"/scripts/xsdb/xsdb/cmdlist -H "$HOME"/.xsctcmdhistory "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"
  Segmentation fault (core dumped) "$RDI_BINROOT"/unwrapped/"$RDI_PLATFORM$RDI_OPT_EXT"/rlwrap -rc -f "$RDI_APPROOT"/scripts/xsdb/xsdb/cmdlist -H "$HOME"/.xsctcmdhistory "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"


This is a problem with the rlwrap version bundled with vivado, probably due the lack of legacy vsyscall emulation in Archlinux.
This is a problem with the rlwrap version bundled with Vivado, probably due to the lack of legacy vsyscall emulation in Arch Linux.
To fix this issue either drop rlwrap altogether (losing history and autocompletion in xsct) or install {{Pkg|rlwrap}} from the official repo, and edit the corresponding line in the xsct startup script:
To fix this issue, either drop rlwrap altogether (losing command history and auto-completion), or install {{Pkg|rlwrap}} and edit the path to the rlwrap binary in the affected command startup script(s) from:


{{hc|head=../Xilinx/SDK/2018.1/bin/xsct|output=
{{hc|head=/opt/Xilinx/{Vivado,SDK}/YYYY.Q/bin/{xsct,xsdb,xmd,tclsh}|output=
# Use rlwrap to invoke XSCT
# Use rlwrap to invoke the tool
/usr/bin/rlwrap -rc -f "$RDI_APPROOT"/scripts/xsdb/xsdb/cmdlist -H "$HOME"/.xsctcmdhistory "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"
"$RDI_BINROOT"/unwrapped/"$RDI_PLATFORM$RDI_OPT_EXT"/rlwrap ...
# OR run xsct without rlwrap
#"$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"
}}
}}


=== Vivado HLS testbench error with GCC ===
To the following:


Vivado requires an older version of glibc (2.26 as of vivado 2018.1).
{{hc|head=/opt/Xilinx/{Vivado,SDK}/YYYY.Q/bin/{xsct,xsdb,xmd,tclsh}|output=
# Use rlwrap to invoke the tool
/usr/bin/rlwrap ...
# OR run the tool without rlwrap
#"$RDI_BINROOT"/loader -exec rdi_{xsct,xsdb,xmd,tclsh} "${RDI_ARGS[@]}"
}}


The solution proposed in [https://forums.xilinx.com/t5/High-Level-Synthesis-HLS/Testbench-error-with-gcc/td-p/756773 this thread] from Xilinx forums suggests to update the fixed headers shipped by Xilinx.
=== Vivado HLS testbench error with GCC ===


For vivado version 2016, run:
Vivado requires an older version of {{Pkg|glibc}} (2.26).


  # /opt/Xilinx/Vivado_HLS/<version>/lnx64/tools/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/install-tools/mkheaders /opt/Xilinx/Vivado_HLS/<version>/lnx64/tools/gcc/
The solution proposed in [https://support.xilinx.com/s/question/0D52E00006iHuVySAK/testbench-error-with-gcc this thread] from Xilinx forums suggests to update the fixed headers shipped by Xilinx.


For vivado 2017 and newer, run:
Run:


   # /opt/Xilinx/Vivado/2018.1/lnx64/tools/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/install-tools/mkheaders /opt/Xilinx/Vivado/2018.1/lnx64/tools/gcc
   # /opt/Xilinx/Vivado/2018.1/lnx64/tools/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/install-tools/mkheaders /opt/Xilinx/Vivado/2018.1/lnx64/tools/gcc
Line 174: Line 147:
}}
}}


Switch to using Xorg instead of Wayland. The version of Java Vivado uses has compatibility problems with Wayland.
Switch to using [[Xorg]] instead of [[Wayland]]. The version of Java Vivado uses has compatibility problems with Wayland.
 
=== To update Vivado from 2020.1 to Vivado 2020.1.1 ===
 
If your 2020.1 installation failed to launch and needed to be installed in batch mode, you will need to update using batch mode:
 
# ./xsetup -b Update
 
If Vivado was originally installed by the root user, you will need to launch the update as the root user.
 
=== Configuring an IP in Vivado 2021.2 causes a crash ===
See [https://support.xilinx.com/s/question/0D52E000072ruzYSAQ/why-vivado-crashes-when-i-try-to-recustomize-ip]
 
When editing an IP with Vivado 2021.2, Vivado may crash and report the following error:
{{hc|head=hs_err_pid*.log|output=
#
# An unexpected error has occurred (11)
#
Stack:
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib//server/libjvm.so(+0xbefecb) [0x7fd1e21efecb]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib//server/libjvm.so(JVM_handle_linux_signal+0xd1) [0x7fd1e21f6c81]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib//server/libjvm.so(+0xbead23) [0x7fd1e21ead23]
/usr/lib/libc.so.6(+0x42560) [0x7fd246e38560]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libharfbuzz.so(+0x3574d) [0x7fd1bc03574d]
/usr/lib/libharfbuzz.so.0(hb_font_funcs_set_glyph_shape_func+0x36) [0x7fd24503e886]
/usr/lib/libharfbuzz.so.0(+0x9a802) [0x7fd2450ab802]
/usr/lib/libharfbuzz.so.0(hb_ft_font_create+0x37) [0x7fd2450abcc7]
/usr/lib/libfreetype.so.6(+0x5e2f0) [0x7fd2464912f0]
/usr/lib/libfreetype.so.6(+0x6b7ad) [0x7fd24649e7ad]
/usr/lib/libfreetype.so.6(FT_Load_Glyph+0x681) [0x7fd2464471a1]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libfontmanager.so(+0x7abf) [0x7fd1bc407abf]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libfontmanager.so(Java_sun_font_FreetypeFontScaler_getGlyphAdvanceNative+0x14) [0x7fd1bc4082b4]
[0x7fd1c8e87710]
}}
 
This is due to a conflict between Vivado's and system's version of {{Pkg|harfbuzz}} library.
 
A possible workaround is to force Vivado to use the system {{ic|libharfbuzz}}, by renaming the {{ic|.so}}
 
# mv /opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libharfbuzz.so /opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libharfbuzz.so.bak
 
=== Synthesis fails on certain locales ===
 
If your system locale does not use a dot {{ic|.}} as the decimal seperator, but for example a comma {{ic|,}} (e.g. {{ic|de_DE}}), synthesis may fail with errors such as wrong operator types for {{ic|+}}.
 
A possible workaround is to force Vivado to use {{ic|en_US.UTF-8}} as the locale for numerics. This can be easily done by appending
 
export LC_NUMERIC=en_US.UTF-8
 
to {{ic|<your-vivado-installation-path>/bin/setupEnv.sh}}.
 
=== Fonts ignore system anti-aliasing settings ===
 
With OpenJDK 11 and Vivado display scaling activated, the menu and other UI element fonts may render without any anti-antialiasing regardless of desktop environment settings.  This can be fixed by editing the Vivado launch script to append {{ic|1=awt.useSystemAAFontSettings=on}} to the JVM options.
 
Assuming Vivado is installed in the default location of {{ic|/opt/Xilinx/Vivado/YYYY.Q}} where {{ic|YYYY.Q}} is the verion (i.e. 2020.2), modify {{ic|vivado}} to include the following:
 
{{hc|/opt/Xilinx/Vivado/YYYY.Q/bin/vivado|output=
...
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
...
}}
 
=== Blank/grey UI when using WM (non-reparenting window manager) ===
 
This is a common issue in a number of window managers. (DWM, Awesome, bspwm) Java does not play well with these window managers.
 
{{hc|/opt/Xilinx/Vivado/YYYY.Q/bin/vivado|output=
...
export _JAVA_AWT_WM_NONREPARENTING=1
...
}}
 
=== Vitis: Can't load library: ... libswt-pi4-gtk.so ...===
 
You run vitis:
 
$ /tools/Xilinx/Vitis/2022.2/bin/vitis
 
You get error messages here
 
{{hc|/home/<user>/.Xilinx/Vitis/2022.2/<a-long-numbers>.log |output=
...
no swt-pi4-gtk-4932r18 in java.library.path: [/tools/Xilinx/Vitis/2022.2/tps/lnx64/java-cef-95.0.4638.69/bin/lib/linux64, /tools/Xilinx/Vitis/2022.2/tps/lnx64/javafx-sdk-11.0.2/lib, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/tps/lnx64/jre11.0.11_9/lib/, /tools/Xilinx/Vitis/2022.2/tps/lnx64/jre11.0.11_9/lib//server, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/tps/lnx64/python-3.8.3/lib, /tools/Xilinx/Vitis/2022.2/aietools/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/bin/../lnx64/tools/dot/lib, /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
no swt-pi4-gtk in java.library.path: [/tools/Xilinx/Vitis/2022.2/tps/lnx64/java-cef-95.0.4638.69/bin/lib/linux64, /tools/Xilinx/Vitis/2022.2/tps/lnx64/javafx-sdk-11.0.2/lib, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/tps/lnx64/jre11.0.11_9/lib/, /tools/Xilinx/Vitis/2022.2/tps/lnx64/jre11.0.11_9/lib//server, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/tps/lnx64/python-3.8.3/lib, /tools/Xilinx/Vitis/2022.2/aietools/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/bin/../lnx64/tools/dot/lib, /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
Can't load library: /home/<user>/.swt/lib/linux/x86_64/libswt-pi4-gtk-4932r18.so
Can't load library: /home/<user>/.swt/lib/linux/x86_64/libswt-pi4-gtk.so
...
}}
 
This problem is due to {{ic|libstdc++.so.6}}.
 
Make sure {{ic|libstdc++.so.6}} has been installed in your computer.
$ find /usr/lib -iname 'libstdc++.so.6'
 
Let's fix it:
 
# cd /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default/
# mv libstdc++.so.6 libstdc++.so.6.bak
# ln -sf /usr/lib/libstdc++.so.6 ./libstdc++.so
 
Above way should solve this problem when you run Vitis.
 
== Licensing ==
 
Xilinx Vivado contains modules called Intelectual Property (IP) cores and as the name suggests, you should expect licenses to be required for these modules. Two modes of licensing are possible: Floating (server) or Nodelocked (license file).
 
=== Floating License ===
 
Set the environment variable {{ic|XILINX_LICENSE_FILE}} to point to a floating server license. You will have to be on the same network as the server, so connecting with a VPN might me required.
 
{{hc|''your-vivado-installation-path''/bin/setupEnv.sh|output=
...
# Add your floating license
export XILINXD_LICENSE_FILE=2100@<server_name>
}}
 
=== Nodeblocked License ===
 
Generate a license file at https://www.xilinx.com/getlicense . You will shortly receive an automatically generated email with the license file {{ic|Xilinx.lic}}. Download this to {{ic|${HOME}/.Xilinx}} directory.

Latest revision as of 11:58, 3 March 2024

Arch Linux is not officially supported by Vivado, but as happens with Xilinx ISE WebPACK, most of its features can be used with a bit of hacking.

Installation

Xilinx Vivado can be downloaded from its official website [1]. It is recommended to download "Vivado HLx <year>.<version>: All OS installer Single-File Download" tarball, but make sure not to be in a hurry, as it is a large download (over 70 GB). Update tarballs can also be downloaded and installed later.

AUR Package

The vivadoAUR package can be used to create a Vivado installation managed by pacman. Since the download of the installer is locked behind a login wall, it needs to be downloaded manually as outlined above and placed in the same directory as the PKGBUILD. The package only builds the latest major version (<year>.<version>), not the minor updates (<year>.<version>.<update>); if these are required, install Vivado manually instead.

Digilent USB-JTAG Drivers

To use Digilent Adept USB-JTAG adapters (e.g. the onboard JTAG adapter on the ZedBoard[dead link 2023-10-29 ⓘ]) from Vivado, you need to install the Digilent Adept Runtime.

Make sure you have installed fxloadAUR.

To install the Digilent Adept Runtime, it is recommended to install digilent.adept.runtimeAUR.

In addition, installing digilent.adept.utilitiesAUR may do good to configuring your board.

Tips and tricks

Enable display scaling

Start Vivado, then set the scaling rate through Tools > Setting > Display > Scaling.

Disable WebTalk

The free WebPACK license does not let you disable this feature which uploads usage data to Xilinx's servers when generating a bitstream, but synthesis will complete just fine if the connection fails. A simple way to make it fail consistently for Vivado tools only is to set an invalid HTTPS proxy for it.

/opt/Xilinx/Vivado/<version>/bin/setupEnv.sh
...

export HTTPS_PROXY=localhost

This method will not pollute your environment, only the temporary environment that is configured upon startup of the tools, so it should not break anything else.

Troubleshooting

HTML links under Help menu do not open in browser

See https://support.xilinx.com/s/article/76524?language=en_US

Create file

/Xilinx_path/Vitis_HLS/yyyy.Q/bin/compat_firefox
#!/bin/sh
unset LD_LIBRARY_PATH
firefox $@

then configure the script at Window > Preferences > Web Browser.

Vitis HLS no response or only splash screen visible

See https://support.xilinx.com/s/question/0D52E00006hpY4PSAU/vitishls-20202-not-starting-only-splash-screen-visible

When you run /Xilinx_path/Vitis_HLS/yyyy.Q/bin/vitis_hls (the path of Vitis_HLS in *.Desktop file), you may get

/Xilinx_path/Vitis_HLS/yyyy.Q/bin/vitis_hls
****** Vitis HLS - High-Level Synthesis from C, C++ and OpenCL v2021.2 (64-bit)
  **** SW Build 3367213 on Tue Oct 19 02:47:39 MDT 2021
  **** IP Build 3369179 on Thu Oct 21 08:25:16 MDT 2021
    ** Copyright 1986-2021 Xilinx, Inc. All Rights Reserved.

source /opt/Xilinx/Vitis_HLS/2021.2/scripts/vitis_hls/hls.tcl -notrace
INFO: [HLS 200-10] Running '/opt/Xilinx/Vitis_HLS/2021.2/bin/unwrapped/lnx64.o/vitis_hls'
INFO: [HLS 200-10] For user 'username' on host 'hostname' (Linux_x86_64 version 5.14.16-arch1-1) on Sun Nov 07 21:57:50 CST 2021
INFO: [HLS 200-10] On os "Arch Linux"
INFO: [HLS 200-10] In directory '$HOME'
INFO: [HLS 200-10] Bringing up Vitis HLS GUI ...

Then it is stuck here or exit directly.

To fix this issue, first change the file /Xilinx_path/Vitis_HLS/yyyy.Q/common/scripts/autopilot_init.tcl line 40

from

----%r&-'%rl%&n$&lt'v-=

to

----%r&-'%rl%&n$&lt'v->

Then add

osgi.locking=none

to file

/Xilinx_path/Vitis_HLS/yyyy.Q/lnx64/tools/eclipse/configuration/config.ini

Synthesis segfaults

See https://support.xilinx.com/s/feed/0D52E00006hpUycSAE?language=en_US

You will need to recompile glibc (just take the PKGBUILD from the abs) with --disable-lock-elision. Instead of patching the system libc in /usr/lib, copy the newly compiled libpthread-2.25.so and libc-2.25.so to /opt/Xilinx/Vivado/2016.4/ids_lite/ISE/lib/lin64 Do not forget to repeat this when glibc gets upgraded.

xsct, xsdb, xmd, and tclsh segfault

The Xilinx Vivado command-line tools xsct, xsdb, xmd, and tclsh may crash with a message similar to the following:

Segmentation fault (core dumped) "$RDI_BINROOT"/unwrapped/"$RDI_PLATFORM$RDI_OPT_EXT"/rlwrap -rc -f "$RDI_APPROOT"/scripts/xsdb/xsdb/cmdlist -H "$HOME"/.xsctcmdhistory "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"

This is a problem with the rlwrap version bundled with Vivado, probably due to the lack of legacy vsyscall emulation in Arch Linux. To fix this issue, either drop rlwrap altogether (losing command history and auto-completion), or install rlwrap and edit the path to the rlwrap binary in the affected command startup script(s) from:

/opt/Xilinx/{Vivado,SDK}/YYYY.Q/bin/{xsct,xsdb,xmd,tclsh}
# Use rlwrap to invoke the tool
"$RDI_BINROOT"/unwrapped/"$RDI_PLATFORM$RDI_OPT_EXT"/rlwrap ...

To the following:

/opt/Xilinx/{Vivado,SDK}/YYYY.Q/bin/{xsct,xsdb,xmd,tclsh}
# Use rlwrap to invoke the tool
/usr/bin/rlwrap ...
# OR run the tool without rlwrap
#"$RDI_BINROOT"/loader -exec rdi_{xsct,xsdb,xmd,tclsh} "${RDI_ARGS[@]}"

Vivado HLS testbench error with GCC

Vivado requires an older version of glibc (2.26).

The solution proposed in this thread from Xilinx forums suggests to update the fixed headers shipped by Xilinx.

Run:

 # /opt/Xilinx/Vivado/2018.1/lnx64/tools/gcc/libexec/gcc/x86_64-unknown-linux-gnu/4.6.3/install-tools/mkheaders /opt/Xilinx/Vivado/2018.1/lnx64/tools/gcc

Vivado Crashes with Wayland

If Vivado crashes and the error file contains something similar to this:

hs_err_pid*.log
#
# An unexpected error has occurred (11)
#
Stack:
/opt/Xilinx/Vivado/2018.2/tps/lnx64/jre/lib/amd64/server/libjvm.so(+0x923da9) [0x7fced0c19da9]
/opt/Xilinx/Vivado/2018.2/tps/lnx64/jre/lib/amd64/server/libjvm.so(JVM_handle_linux_signal+0xb6) [0x7fced0c203f6]
/opt/Xilinx/Vivado/2018.2/tps/lnx64/jre/lib/amd64/server/libjvm.so(+0x9209d3) [0x7fced0c169d3]
/usr/lib/libc.so.6(+0x368f0) [0x7fcf0ea408f0]
/opt/Xilinx/Vivado/2018.2/tps/lnx64/jre/lib/amd64/libawt_xawt.so(+0x42028) [0x7fceb1a20028]
/opt/Xilinx/Vivado/2018.2/tps/lnx64/jre/lib/amd64/libawt_xawt.so(+0x42288) [0x7fceb1a20288]
/opt/Xilinx/Vivado/2018.2/tps/lnx64/jre/lib/amd64/libawt_xawt.so(Java_sun_awt_X11_XRobotPeer_getRGBPixelsImpl+0x17c) [0x7fceb1a1867c]
[0x7fcec0cb94cf]

Switch to using Xorg instead of Wayland. The version of Java Vivado uses has compatibility problems with Wayland.

To update Vivado from 2020.1 to Vivado 2020.1.1

If your 2020.1 installation failed to launch and needed to be installed in batch mode, you will need to update using batch mode:

# ./xsetup -b Update

If Vivado was originally installed by the root user, you will need to launch the update as the root user.

Configuring an IP in Vivado 2021.2 causes a crash

See [2]

When editing an IP with Vivado 2021.2, Vivado may crash and report the following error:

hs_err_pid*.log
#
# An unexpected error has occurred (11)
#
Stack:
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib//server/libjvm.so(+0xbefecb) [0x7fd1e21efecb]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib//server/libjvm.so(JVM_handle_linux_signal+0xd1) [0x7fd1e21f6c81]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib//server/libjvm.so(+0xbead23) [0x7fd1e21ead23]
/usr/lib/libc.so.6(+0x42560) [0x7fd246e38560]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libharfbuzz.so(+0x3574d) [0x7fd1bc03574d]
/usr/lib/libharfbuzz.so.0(hb_font_funcs_set_glyph_shape_func+0x36) [0x7fd24503e886]
/usr/lib/libharfbuzz.so.0(+0x9a802) [0x7fd2450ab802]
/usr/lib/libharfbuzz.so.0(hb_ft_font_create+0x37) [0x7fd2450abcc7]
/usr/lib/libfreetype.so.6(+0x5e2f0) [0x7fd2464912f0]
/usr/lib/libfreetype.so.6(+0x6b7ad) [0x7fd24649e7ad]
/usr/lib/libfreetype.so.6(FT_Load_Glyph+0x681) [0x7fd2464471a1]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libfontmanager.so(+0x7abf) [0x7fd1bc407abf]
/opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libfontmanager.so(Java_sun_font_FreetypeFontScaler_getGlyphAdvanceNative+0x14) [0x7fd1bc4082b4]
[0x7fd1c8e87710]

This is due to a conflict between Vivado's and system's version of harfbuzz library.

A possible workaround is to force Vivado to use the system libharfbuzz, by renaming the .so

# mv /opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libharfbuzz.so /opt/Xilinx/Vivado/2021.2/tps/lnx64/jre11.0.11_9/lib/libharfbuzz.so.bak

Synthesis fails on certain locales

If your system locale does not use a dot . as the decimal seperator, but for example a comma , (e.g. de_DE), synthesis may fail with errors such as wrong operator types for +.

A possible workaround is to force Vivado to use en_US.UTF-8 as the locale for numerics. This can be easily done by appending

export LC_NUMERIC=en_US.UTF-8

to <your-vivado-installation-path>/bin/setupEnv.sh.

Fonts ignore system anti-aliasing settings

With OpenJDK 11 and Vivado display scaling activated, the menu and other UI element fonts may render without any anti-antialiasing regardless of desktop environment settings. This can be fixed by editing the Vivado launch script to append awt.useSystemAAFontSettings=on to the JVM options.

Assuming Vivado is installed in the default location of /opt/Xilinx/Vivado/YYYY.Q where YYYY.Q is the verion (i.e. 2020.2), modify vivado to include the following:

/opt/Xilinx/Vivado/YYYY.Q/bin/vivado
...
export _JAVA_OPTIONS="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true"
...

Blank/grey UI when using WM (non-reparenting window manager)

This is a common issue in a number of window managers. (DWM, Awesome, bspwm) Java does not play well with these window managers.

/opt/Xilinx/Vivado/YYYY.Q/bin/vivado
...
export _JAVA_AWT_WM_NONREPARENTING=1
...

Vitis: Can't load library: ... libswt-pi4-gtk.so ...

You run vitis:

$ /tools/Xilinx/Vitis/2022.2/bin/vitis

You get error messages here

/home/<user>/.Xilinx/Vitis/2022.2/<a-long-numbers>.log 
...
	no swt-pi4-gtk-4932r18 in java.library.path: [/tools/Xilinx/Vitis/2022.2/tps/lnx64/java-cef-95.0.4638.69/bin/lib/linux64, /tools/Xilinx/Vitis/2022.2/tps/lnx64/javafx-sdk-11.0.2/lib, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/tps/lnx64/jre11.0.11_9/lib/, /tools/Xilinx/Vitis/2022.2/tps/lnx64/jre11.0.11_9/lib//server, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/tps/lnx64/python-3.8.3/lib, /tools/Xilinx/Vitis/2022.2/aietools/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/bin/../lnx64/tools/dot/lib, /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
	no swt-pi4-gtk in java.library.path: [/tools/Xilinx/Vitis/2022.2/tps/lnx64/java-cef-95.0.4638.69/bin/lib/linux64, /tools/Xilinx/Vitis/2022.2/tps/lnx64/javafx-sdk-11.0.2/lib, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/tps/lnx64/jre11.0.11_9/lib/, /tools/Xilinx/Vitis/2022.2/tps/lnx64/jre11.0.11_9/lib//server, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default, /tools/Xilinx/Vitis/2022.2/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/tps/lnx64/python-3.8.3/lib, /tools/Xilinx/Vitis/2022.2/aietools/lib/lnx64.o, /tools/Xilinx/Vitis/2022.2/bin/../lnx64/tools/dot/lib, /usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib]
	Can't load library: /home/<user>/.swt/lib/linux/x86_64/libswt-pi4-gtk-4932r18.so
	Can't load library: /home/<user>/.swt/lib/linux/x86_64/libswt-pi4-gtk.so
...

This problem is due to libstdc++.so.6.

Make sure libstdc++.so.6 has been installed in your computer.

$ find /usr/lib -iname 'libstdc++.so.6'

Let's fix it:

# cd /tools/Xilinx/Vitis/2022.2/lib/lnx64.o/Default/
# mv libstdc++.so.6 libstdc++.so.6.bak
# ln -sf /usr/lib/libstdc++.so.6 ./libstdc++.so

Above way should solve this problem when you run Vitis.

Licensing

Xilinx Vivado contains modules called Intelectual Property (IP) cores and as the name suggests, you should expect licenses to be required for these modules. Two modes of licensing are possible: Floating (server) or Nodelocked (license file).

Floating License

Set the environment variable XILINX_LICENSE_FILE to point to a floating server license. You will have to be on the same network as the server, so connecting with a VPN might me required.

your-vivado-installation-path/bin/setupEnv.sh
...
# Add your floating license
export XILINXD_LICENSE_FILE=2100@<server_name>

Nodeblocked License

Generate a license file at https://www.xilinx.com/getlicense . You will shortly receive an automatically generated email with the license file Xilinx.lic. Download this to ${HOME}/.Xilinx directory.