Xilinx Vivado (简体中文)

From ArchWiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
翻译状态:本文是 Xilinx_Vivado翻译。上次翻译日期:2021-05-13。如果英文版本有所更改,则您可以帮助同步翻译。

Tango-preferences-desktop-locale.png本文或本节需要翻译。要贡献翻译,请访问简体中文翻译团队Tango-preferences-desktop-locale.png

附注: Some content is not translated.(在 Talk:Xilinx Vivado (简体中文)# 中讨论)

Archlinux 并不受 Vivado 的正式支持,但是从 Xilinx ISE WebPACK 的使用体验上看,只需要一点修改便能正常使用所有功能。

安装

可以从官方网址[1]下载Xilinx Vivado。我们建议您下载“Vivado HLx <year>.<version>: All OS installer Single-File Download”。别心急,因为这个文件(写作时最新版本为2020.3)有将近50GB。

AUR包

vivadoAUR AUR 包可以由pacman管理安装. 由于vivado安装程序需要登陆后提交个人信息才能下载,因此需要像上面那样手动下载,并将其放置在与 PKGBUILD 相同的目录中. 该软件包只构建最新的主要版本(< 年份 >.< 版本 >) , 而不是较小的更新(< 年份 >.< 版本 >.<更新版本> ) 。如果需要,请手动安装 Vivado。

手动安装

依赖

安装程序需要 ncurses5 库,并且不能使用官方仓库里的 ncurses6。您可以通过安装 Arch User Repository 中的 ncurses5-compat-libsAUR 来解决这个问题。您可能需要安装 libpng12lib32-libpng12 以便使用 Xilinx Document Navigator。

SDK 2018.3(以及其他可能的版本)需要 gtk2 库。如果您打算使用 SDK,您可能需要安装 gtk2.Vitis需要安装 xorg-xlsclients 来正常工作.

可以使用xilinx-vivado-dummyAUR 进行替代安装所有这些依赖项。

在一些平铺式窗口管理器上 (例如 dwmXmonad), 您可能需要在启动 xsetup 之前设置这个环境变量(否则安装 GUI 将不呈现).

$ export _JAVA_AWT_WM_NONREPARENTING=1

您必须安装主程序包,并且还建议安装最新的更新补丁。

默认的字体可能难以阅读,并导致一些 UI 元素被切断错误渲染。通过安装 noto-fonts 来修复。

PetaLinux Tools的依赖

在启动 petalinux-tools 之前,请安装:

git diffstat unzip texinfo python chrpath wget xterm sdl rpcsvc-proto socat cpio inetutils python2 net-tools tftp-hpa python-virtualenv xorg-server-xvfb bison flex gnupg ncurses autoconf libtool tar gcc sdl sdl2 glib2 screen pax pax-utils libstdc++5 python-django iproute2 lib32-zlib openssl gawk python-pexpect python-pip python-gitpython python-jinja xz iputils python-pylint

AUR中的

pod2manAUR libselinuxAUR debianutilsAUR

启用 multilib 库 并安装multilib-devel 包组

启用 tftp-hpa

$ sudo systemctl enable tftpd.service
$ sudo systemctl start tftpd.service

Vivado 与 SDK

建议在默认位置 /opt/Xilinx 安装该套件,因为本页中的进一步说明将假定该套件安装在那里。

警告: 2018.1及以后版本不再需要以下补丁。请直接解压后执行 xsetup 文件。

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:

$ sed -i.original 's/uname -i/uname -m/' xsetup

Install script will be patched and original will be backed up as 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:

# ./xsetup

It is recommended to install the suite at the default location /opt/Xilinx, as further instructions in this page will assume the suite is installed there.

更新补丁

警告: 2018.1 及以后版本不再需要以下补丁。

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.

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:

$ sed -i.original 's/uname -i/uname -m/' xsetup
# ./xsetup

证书

警告: 2018.1及以后的 Webpack 版本不再需要手动下载证书文件。

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:

# cd /opt/Xilinx/Vivado/2015.4/lib/lnx64.o/
# 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:

$ /opt/Xilinx/Vivado/2015.4/bin/vlm

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.

Digilent USB-JTAG 驱动

要使用来自 Vivado 的 Digilent Adept USB-JTAG 适配器(例如内置在 ZedBoard 上的 JTAG 适配器) ,你需要安装 Digilent Adept Runtime

确保您已经从 AUR 安装了 fxloadAUR

要安装 Digilent Adept Runtime,建议从 AUR 安装 digilent.adept.runtimeAUR

此外,安装 digilent.adept.utilitiesAUR 可以很好地配置你的开发板。

桌面与应用程序菜单快捷方式

安装过程必须作为 root 用户运行,以便对/opt/Xilinx 进行写访问。如果需要应用程序菜单中的快捷方式,则必须将它们从根帐户移动到/usr/share。桌面快捷方式应该移动到用户桌面。

以下命令假定只有 Xilinx 已经安装到根帐户,并且用户具有用户名.

复制应用程序菜单快捷方式:

# mv /root/.local/share/applications/* /usr/share/applications/
# mv /root/.local/share/desktop-directories/* /usr/share/desktop-directories/
# mv /root/.config/menus/applications-merged/* /etc/xdg/menus/applications-merged/

复制桌面快捷方式:

# chown username /root/Desktop/*
# mv /root/Desktop/* /home/username/Desktop/

Linux cable 驱动

以 root 权限运行以下脚本:

$ {vivado_install_dir}/data/xicom/cable_drivers/lin64/install_script/install_drivers/install_drivers

提示和技巧

启用屏幕缩放功能

启动 Vivado,然后按照以下方式启用屏幕缩放功能:

Tools -> Setting -> Display -> Scaling

禁用WebTalk

免费的WebPACK许可证不允许你禁用这一功能,该功能在生成比特流时将使用数据上传到赛灵思的服务器,但即使连接失败,综合仍会顺利完成。一个简单的方法是为Vivado工具设置一个无效的HTTPS代理,使其无法链接到服务器。

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

export HTTPS_PROXY=localhost

这个方法不会污染您的工作环境,只是在工具启动时配置的临时环境,它不会破坏其他任何东西。

故障排除

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 segfault

xsct might crash with message:

 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[@]}"

This is a problem with the rlwrap version bundled with vivado, probably due the lack of legacy vsyscall emulation in Archlinux. To fix this issue either drop rlwrap altogether (losing history and autocompletion in xsct) or install rlwrap from the official repo, and edit the corresponding line in the xsct startup script:

../Xilinx/SDK/2018.1/bin/xsct
# Use rlwrap to invoke XSCT
/usr/bin/rlwrap -rc -f "$RDI_APPROOT"/scripts/xsdb/xsdb/cmdlist -H "$HOME"/.xsctcmdhistory "$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"
# OR run xsct without rlwrap
#"$RDI_BINROOT"/loader -exec rdi_xsct "${RDI_ARGS[@]}"

Vivado HLS testbench error with GCC

Vivado requires an older version of glibc (2.26 as of vivado 2018.1).

The solution proposed in this thread[失效链接 2021-11-19 ⓘ] from Xilinx forums suggests to update the fixed headers shipped by Xilinx.

For vivado version 2016, run:

 # /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/

For vivado 2017 and newer, 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.