Now I usually don't install every version of the FPGA tools released per year that I use. I usually stick to major yearly updates/upgrades (ie - I went from 2022.1 to 2023.1 and skipped 2022.2 since the differences were minor enough that my tutorials remained relevant). However, even before AMD's release of 2023.2, I noticed the announcement of the new Vitis Unified IDE in the pop-up window that appeared during the launch of Vitis 2023.1 so I knew I'd be updating versions again this year.
I have validated the following installation steps on Ubuntu 18.04, Ubuntu 20.04, and Ubuntu 22.04, however I did notice in the UG973 that 2023.2 is the final release that will support any version of Ubuntu 18.04 and Ubuntu 20.04 - 20.04.3. Since I've validated this on a range of Ubuntu OS versions, I figured it was worth another write-up.
DependenciesIf you have not previously installed any versions of Vivado, Vitis, or PetaLinux on your machine, be sure to add the 32-bit architecture and changing the system shell from dash to bash:
~$ sudo dpkg-reconfigure dash
~$ sudo dpkg --add-architecture i386
As I've mentioned in previous installation guides, it is theoretically possible to install all of these package dependencies at once in a single command line of apt-get install
. However, I've found the best chance of avoid weird issues is to use the following sequence:
~$ sudo apt-get install gparted xinetd gawk gcc net-tools ncurses-dev openssl libssl-dev flex bison xterm autoconf libtool texinfo zlib1g-dev
~$ sudo apt-get install iproute2 make libncurses5-dev tftpd libselinux1 wget diffstat chrpath socat tar unzip gzip python tofrodos lsb libftdi1 libftdi1-2
~$ sudo apt-get install lib32stdc++6 libgtk2.0-0:i386 libfontconfig1:i386 libx11-6:i386 libxext6:i386 libxrender1:i386 libsm6:i386 tree openssh-server
~$ sudo apt-get install debianutils iputils-ping libegl1-mesa libsdl1.2-dev pylint3 python3 cpio tftpd-hpa gnupg zlib1g:i386 haveged perl xvfb
~$ sudo apt-get install gcc-multilib build-essential automake screen putty pax g++ python3-pip xz-utils python3-git python3-jinja2 python3-pexpect
~$ sudo apt-get install liberror-perl mtd-utils xtrans-dev libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev
~$ sudo apt-get install util-linux sysvinit-utils cython google-perftools patch diffutils ocl-icd-libopencl1 opencl-headers ocl-icd-opencl-dev
~$ sudo apt-get install libncurses5 libncurses5-dev libncursesw5:amd64 libncursesw5-dev libncurses5:i386 libtinfo5 libstdc++6:i386 libgtk2.0-0:i386 dpkg-dev:i386
It's worth noting that I discovered some new dependencies for 2023.2 even compared to 2023.1, but these are all backwards compatible with previous versions.
TFTP Server for PetaLinuxPetaLinux allows for users to create embedded Linux images for AMD FPGAs to be booted over the network using TFTP boot, and this requires a TFTP service to be configured on the host machine. It is possible to still install PetaLinux without creating a TFTP server on your machine, but be prepared for warning messages and obviously you won't be able to generate an embedded Linux image with TFTP boot. Skip this step if you've already created this for a previous installation of PetaLinux, as it is not necessary to create a new one for different versions of PetaLinux.
Create/open the TFTP configuration file in the Linux internet services directory:
~$ sudo gedit /etc/xinetd.d/tftp
And configure it as such:
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
Next, create the directory for the files to be transferred to/from on the host PC during the TFTP boot process and give it the appropriate permissions:
~$ sudo mkdir /tftpboot
~$ sudo chmod -R 777 /tftpboot
~$ sudo chown -R nobody /tftpboot
~$ sudo /etc/init.d/xinetd stop
~$ sudo /etc/init.d/xinetd start
Then update and upgrade the full environment just to make sure everything is good:
~$ sudo apt update
~$ sudo apt upgrade
USB Port Access for UserAgain if already done for a previous AMD installation or if you have been using USB devices already with your Ubuntu installation this step can be skipped. However, a fresh install of Ubuntu needs to have you user added to the dial out group so Vitis/Vivado can access the USB ports of the machine:
~$ sudo adduser $USER dialout
I found however that I didn't have to do this on my Dell XPS that came shipped with Ubuntu natively installed (the first installation of Ubuntu I've used that I didn't install myself) so that was nice.
Download Vitis InstallerNow I have heard you all in the comments about the installation size of Vitis/PetaLinux and trust me I feel your pain as I'm feeling the space squeeze too. But I still recommend the single file download over the self-extracting web installers if at all possible. I do delete the zipped version once I have extracted it (or move it to an external hard drive for future use), then I also delete the installer once the installation is complete.
The whole point of Vitis Unified IDE is to combine what was the original Vitis, Vitis Analyzer, and Vitis HLS into a single tool, so naturally it's going to be a larger footprint on your hard drive. From my personal experience so far, it has streamlined the development flow particularly for accelerated applications for everything to be in the same IDE vs separate ones. I will demonstrate this in my upcoming tutorials. Overall, I have found this pro of everything in one tool to outweigh the con of the large installation.
Select the desired version of the installer (single file download to Linux web installer) and log in with your AMD website credentials when prompted. Provide you information as necessary and click download.
Install Vitis & VivadoOne downloaded, extract the single file installer and run the xsetup
script within it or make the.bin file of the web installer an executable and run it.
~$ cd ./Downloads/FPGAs_AdaptiveSoCs_Unified_2023.2_1013_2256/
~/Downloads/FPGAs_AdaptiveSoCs_Unified_2023.2_1013_2256$ sudo ./xsetup
If it never launches you're probably missing a package dependency, so go double-check that in the above steps (can you tell I've made that mistake before??? haha).
Once the installer launches, follow the setup wizard to select the AMD tools you want to install. The option of Vitis at the top is the superset option of everything listed below it (expect PetaLinux) so select Vitis unless you know you only want Vivado or something else.
The default options for the Design Tools and Devices to install on the next screen are good for 99% of users (you'll know if you need any of the other options). Then you'll check "I Agree" several times on the next screen before selecting the installation directory for Vitis. I highly recommend the default location in /tools
but if you select elsewhere, just be sure it's not in a directory like /dev
that Linux uses for other functionalities (Vitis is not a physical device lol).
Finally, verify your selections on the next screen and click "Install".
Once the installation is complete, a prompt will appear to run a script to validate that all package dependencies have been installed.
While I've got this install process pretty much down to a science at this point with the above steps, I still like to run this script just in case I missed something or something new has been added I didn't notice (thus, part of how I discovered the new packages above to add above):
~/Downloads/FPGAs_AdaptiveSoCs_Unified_2023.2_1013_2256$ cd /tools/Xilinx/Vitis/2023.2/scripts/
/tools/Xilinx/Vitis/2023.2/scripts$ sudo ./installLibs.sh
After running that script, there is another to install all of the necessary cable drivers for talking to dev boards and AMD devices:
/tools/Xilinx/Vitis/2023.2/scripts$ cd /tools/Xilinx/Vivado/2023.2/data/xicom/cable_drivers/lin64/install_script/install_drivers/
/tools/Xilinx/Vivado/2023.2/data/xicom/cable_drivers/lin64/install_script/install_drivers$ sudo ./install_drivers
I do still run this script with every new installation of Vivado/Vitis, especially when there are major IDE upgrades like when we went from XSDK to Vitis (2019.1 to 2019.2) and now Vitis to Vitis Unified (2023.1 to 2023.2).
Finally, before moving on to the PetaLinux installation, I like to launch both Vivado and Vitis from separate terminal windows just to make sure both environment sourcing scripts work ok and launch independently:
~$ source /tools/Xilinx/Vivado/2023.2/settings64.sh
~$ vivado
~$ source /tools/Xilinx/Vitis/2023.2/settings64.sh
~$ vitis
And while it's super rare, you'd be surprised at the weird underlying Python issues I've caught here that have done things like prevent Vivado from launching altogether, but that's a story for another day.
I also discovered a bug with Parallels version 19 and the USB controller on Intel-based MacBooks because I also like to open Hardware Manager in Vivado and connect to a dev board as part of my testing/validation of the installation. I was unable to connect to any FPGA board with the hw_server in Vivado and Vitis. I kept getting the [Labtoolstcl 44-494] There is no active target available for server at localhost. Targets(s) ", jsn1" may be locked by another hw_server.
error, and I noticed the USB device wasn't binding to the FTDI driver in Linux properly after attempting to connect to it with Vivado/Vitis.
TL;DR was that I ended up having to revert back to Parallels version 18. I honestly wasn't upset about it because my whole VM setup has been a mess since I made the mistake of clicking "yes" when the option to update Parallels popped up a few months ago. I believe they've been more focused on ARM-based Apple silicon chips, as that was the majority of the upgrades introduced with Parallels version 19. My advice is for Intel-based Mac users to stay put in version 18, but that also means staying on Mac OS Ventura as version 19 also introduced support for Mac OS Sonoma.
Download PetaLinux InstallerThe PetaLinux installer can be downloaded either from the downloads area of the website directly, or by running the Vitis installer again and selecting PetaLinux as the tool for installation.
To be clarify, the download of the PetaLinux installer is the only thing the Vitis installer does. It does not actually run the PetaLinux installer. So I personally just grad it from the website:
While the Vitis installer creates the installation directory for you, you'll need to manually create the installation directory for PetaLinux and give it the appropriate 755 permissions and user permissions:
~$ sudo mkdir -p /tools/Xilinx/PetaLinux/2023.2/
~$ sudo chmod -R 755 /tools/Xilinx/PetaLinux/2023.2/
~$ sudo chown -R <user>:<user> /tools/Xilinx/PetaLinux/2023.2/
Again, you can select your own desired installation location for PetaLinux but I like to put it within the installation directory of the rest of the corresponding version of Vitis. I find it to be a necessity when I have multiple versions of Vitis and PetaLinux installed on one machine.
While the installation directory requires 755 permissions, the installer.run file itself needs full read/write permissions of 777:
~$ sudo chmod 777 ./Downloads/petalinux-v2023.2-10121855-installer.run
Once the installation directory has been prepped and the installer given the appropriate permissions, run the installer and specify the location of the target installation directory:
~$ ./Downloads/petalinux-v2023.2-10121855-installer.run --dir /tools/Xilinx/PetaLinux/2023.2/
When the license agreements appear in the terminal window, press Q to exit it then press Y to accept or N to reject the license agreement.
Once the installation is complete, I test it by sourcing the PetaLinux tools to the environment and verifying that the commands are then available by typing out petalinux
then double tapping the tab key:
~$ source /tools/Xilinx/PetaLinux/2023.2/settings.sh
~$ petalinux- ***double tap tab to get all options to appear***
I hope I can save some souls some time with these install guides.. Stay tuned for future tutorials for the new workflow in the new Vitis Unified IDE!
Comments
Please log in or sign up to comment.