Installing Xilinx Vitis and Vivado 2021.2 on Ubuntu Desktop 22.04
Installing Xilinx Vitis and Vivado 2021.2 on Ubuntu Desktop 22.04
Instructions on installing Xilinx Vitis and Vivado on Ubuntu 22.04.3 LTS and simulating an example visual test-bench to inspect a VHDL RTL project.
by Timothy Stotts
Understanding Xilinx tools 2021.2 installation prerequisites
When installing AMD-Xilinx tools on a Linux workstation, the best official support is to install the tools in a VirtualBox or VMware Workstation virtual machine, of one of the supported Linux distributions at the time of release of that edition of the AMD-Xilinx tools. The supported releases are documented in the release notes at https://support.xilinx.com/. For example, UG973 for 2021.2. This guarantees tool compatibility; but it may hinder synthesis performance as virtual machines tend to partially under perform when compared to a natively executing operating system.
This author’s GitHub account provides example FPGA projects, and version 3 of those projects targets the Xilinx Vitis and Vivado release 2021.2. There is a problem here. That release of the tools supports installation on Ubuntu 20.04 LTS, but not on Ubuntu 22.04 LTS, where 22.04 is the newest LTS release of Ubuntu at this time. The current release may be the normal desktop install for students and engineers designing FPGA projects on the Ubuntu Desktop.
This guide will explain how to install Xilinx Vitis and Vivado 2021.2 within an Ubuntu 22.04.3 LTS virtual machine, and then how to visually simulate the fpga-serial-acl-tester-3 VHDL project with a minimal visual VHDL test-bench. The differences between installing on the Ubuntu VM or on a native Ubuntu Desktop will be noted; however, this author did not wish to reinstall Ubuntu Desktop on his computer to guarantee an exact guide. The virtual machine software tested with these instructions is VMware Workstation 17.5.0 running natively on Ubuntu Desktop 22.04.3 LTS. These instructions were also tested with Oracle VirtualBox 7.0.12 running natively on Fedora 39, and notes are mentioned for accomplishing that based on actual experience with that procedure.
Preparing Ubuntu Desktop 22.04.3 amd64 VMware virtual machine
After installing Ubuntu Desktop 22.04.3 within a VMware virtual machine, it may be necessary to install the Open VM Tools package for display and folder sharing support. It may not be automatic. To perform this:
$ sudo apt install open-vm-tools-desktop
The command vmhgfs-fuse
is used to provide shared folder capability. It dose not appear to
be automatic. To mount a share folder from the host OS, configure the settings in VMware
Workstation for a shared folder. Then perform this:
$ cd ~/
$ mkdir hgfs
$ vmhgfs-fuse ~/hgfs
$ ls -l -h ~/hgfs
To later unmount the hgfs directory:
fusermount -u ~/hgfs
Additional libraries, tools, and headers are required for Vivado and/or Vitis to function on Ubuntu Desktop 22.04. Here are the suggested commands to install them. Note that the packages ending in -doc are optional, but useful for command-line manual pages of the prerequisite tools.
$ sudo apt install make gcc g++ gdb git gitk
$ sudo apt install bison flex gawk autoconf automake
$ sudo apt install zlib1g-dev zlib1g:i386 libtinfo5 libtinfo-dev
$ sudo apt install glibc-doc gcc-doc make-doc gdb-doc bash-doc libstdc++-11-doc
You can now download the Xilinx Unified Release 2021.2 on your host OS, extract it,
and install it from within the virtual machine. Here we assume that the full SFD
download file Xilinx_Unified_2021.2_1021_0703.tar.gz
is downloaded to
~/Downloads/ on your host Linux workstation.
Assuming the full download is in ~/Downloads on the host machine, and this folder is shared with the name Downloads, and that the Unified Install was extracted on the host to ~/Downloads/Xilinx_Unified_2021.2_1021_0703/ , you can install the tools in the VM as follows:
$ sudo mkdir -p /opt/Xilinx
$ sudo chown $USER:$USER /opt/Xilinx
$ cd ~/hgfs/Downloads/Xilinx_Unified_2021.2_1021_0703
$ ./xsetup
Within the install dialogs, set the install path prefix to /opt/Xilinx
instead of /tools/Xilinx
,
if you wish. In older releases of the Xilinx tools, the path /opt/Xilinx was the default.
Preparing Ubuntu Desktop 22.04.3 amd64 Oracle VirtualBox virtual machine
After installing Ubuntu Desktop 22.04.3 within a VirtualBox virtual machine, it will be necessary to install the VirtualBox Guest Additions for display and folder sharing support. It is not automatic. To perform this,
$ sudo apt install make gcc bison flex gawk autoconf automake
Note that manual install of Linux kernel headers might not be required on Ubuntu Desktop 22.04, whereas it was on some of the older releases.
Then, insert the Guest Additions ISO to the CD-ROM drive. Navigate to
$ cd /media/$USER/VBox_*
$ sudo ./VBoxLinuxAdditions.run
After the install, shared folders permissions may need to be installed for the guest user:
$ sudo gpasswd -a $USER vboxsf
$ reboot
Additional libraries, tools, and headers are required for Vivado and/or Vitis to function on Ubuntu Desktop 22.04. Here are the suggested commands to install them. Note that the packages ending in -doc are optional, but useful for command-line manual pages of the prerequisite tools.
$ sudo apt install g++ gdb git gitk
$ sudo apt install zlib1g-dev zlib1g:i386 libtinfo5 libtinfo-dev
$ sudo apt install glibc-doc gcc-doc make-doc gdb-doc bash-doc libstdc++-11-doc
You can now download the Xilinx Unified Release 2021.2 on your host OS, extract it,
and install it from within the virtual machine. Here we assume that the full SFD
download file Xilinx_Unified_2021.2_1021_0703.tar.gz
is downloaded to
~/Downloads/ on your host Linux workstation.
Assuming the full download is in ~/Downloads on the host machine, and this folder is shared with the name Downloads, and that the Unified Install was extracted on the host to ~/Downloads/Xilinx_Unified_2021.2_1021_0703/ , you can install the tools in the VM as follows:
$ sudo mkdir -p /opt/Xilinx
$ sudo chown $USER:$USER /opt/Xilinx
$ cd /media/sf_Downloads/Xilinx_Unified_2021.2_1021_0703
$ ./xsetup
Within the install dialogs, set the install path prefix to /opt/Xilinx
instead of /tools/Xilinx
,
if you wish. In older releases of the Xilinx tools, the path /opt/Xilinx was the default.
GIT cloning the fpga-serial-acl-tester-3 VHDL project
This author has previously created a GitHub project called fpga-serial-acl-tester-3.
FPGA Serial ACL Tester Version 3 project and source code
To clone this project with GIT with your GitHub account into a local workarea on an Ubuntu workstation, and begin setup of the example, do this:
~$ git clone git@github.com:timothystotts/vivado-boards.git
~$ git clone --recursive \
git@github.com:timothystotts/fpga-serial-acl-tester-3.git \
fpga-serial-acl-tester-3-viv21
~$ cd ./fpga-serial-acl-tester-3-viv21/ACL-Tester-Design-VHDL/Work_Dir/
To clone without a GitHub account:
~$ git clone https://github.com/timothystotts/vivado-boards.git
~$ git clone --recursive \
https://github.com/timothystotts/fpga-serial-acl-tester-3.git \
fpga-serial-acl-tester-3-viv21
~$ cd ./fpga-serial-acl-tester-3-viv21/ACL-Tester-Design-VHDL/Work_Dir/
Recreating the RTL project with Vivado 2021.2
First it is necessary to install the Digilent Inc. board files for Vivado 2021.2.
- Create an empty RTL project.
- When selecting the part, click Boards and then Refresh for the latest.
- Search for Arty A7-100, select version 1.0, and click the download icon.
- Close or cancel the empty project.
Run Vivado 2021.2 from the main menu. Then, in the TCL command-line, navigate to the GIT project’s path, such as:
cd ~/fpga-serial-acl-tester-3-viv21/ACL-Tester-Design-VHDL/Work_Dir/
Source the project’s recreation script in the TCL window:
source ./init_project_ACL-VHDL-A7-100.tcl
From the left pane, Run Simulation | Run Behavioral Simulation. Run for 10 milliseconds or longer from the menu or TCL command-line.
Conclusions
Hopefully this post has been helpful for understanding how to install Vivado and Vitis 2021.2 on a newer Ubuntu Desktop, and how to run a basic simulation. The program Xilinx Vitis and Vivado is free to use for the Standard Edition, and can be essential for FPGA projects at school, hobby, or employment.
Also, I hope that the fpga-serial-acl-tester-3 project is useful for not only RTL design, but for ideas for how to create your own Vivado projects.
See the prior post OS-VVM VHDL project simulations with GHDL 3.0 for ideas on open-source simulation of your designs.
Cheers.