Installing Vivado w/ SDK 2018.2 on Ubuntu 16.04 LTS

As an initial disclaimer, I have to say that Xilinx’s tools are quite the memory space hogs. Having experience with it both on Windows and Linux and on different hardware, the following system requirements are what I’ve found to make your life much easier:

  • 100GB free space on your HD (Vivado needs 52GB - 54GB just to be installed initially, then you still want to leave room for your future projects)

  • 16GB RAM minimum

  • Dual-core i7 minimum

Now I am fully aware that Ubuntu 18.04 Bionic Beaver is out and available, but I don’t have the heart to update yet as I know it’ll probably break something within my Xilinx install here. I’ve already noticed Xilinx’s forums have cropped up with issues between their tools and Ubuntu 18.04 so personally I’d prefer to give Xilinx some time to get their stuff stable with Bionic Beaver. The installation notes in UG973 for Vivado 2018.2 also specify Ubuntu 16.04 as being the only version of Ubuntu officially supported.

There are a few other things we have to do to prep Ubuntu itself before we get to the Xilinx Downloads page. I’ll list out the specific ones I found that were needed for me to get a Hello World project on a Zynq dev board up and running. Side Note: every time that I upgrade major versions of Vivado (major as in when I upgrade the year like I did going from 2017.3 to 2018.2), I do a Hello World project on my dev of choice just to get an idea of how Xilinx has inevitably rearranged buttons, menus, functionality, etc.. Now I discovered all of these the hard way, but I found that I could have cheated by referring to the reference guide for PetaLinux & it’s installation (which I will post a separate blog for) in UG1144 starting on page 9.

Packages Ubuntu Needs Installed Prior to Vivado Install:

Multi-arch: It’s more than likely that you’re running the 64-bit version of Ubuntu, in which case you’ll need the ability to install/run 32-bit software since some of the tools and packages within the Vivado IDE are apparently 32-bit. Specifically, the i386 architecture is what you need to add using the Debian package manager dpkg:

sudo dpkg --add-architecture i386

Once you enable/install the i386 architecture, there are a few things you need to do to fully allow it “full rein” of your system:

sudo apt-install chrpath socat texinfo gcc-multilib libsdl1.2-dev xinetd tofrodos iproute
gawk gcc git-core make net-tools ncurses-dev libcurses5-dev zlib1g-dev flex bison lib32z1
lib32ncurses5 lib32stdc++6 libselinux1 xvfb autoconf libtool libbz2-1.0 xinetd tftpd tftp  
lib32stdc++6 libgtk2.0-0:i386 libfontconfig1:i386 libx11-6:i386 libxext6:i386 libxrender1:i386 libsm6:i386 libssl-dev libqtgui4:i386

In case you didn’t catch it, that third command enabled tftp for the i386 architecture, which you now need to configure the service for. Within the xinetd directory, (xinetd is what starts any programs that provide internet services that weren’t already started at runtime in Linux) you can use nano to do this:

sudo nano /etc/xinetd.d/tftp
service tftp
    protocol = udp 
    port = 69
    socket_type = dgram
    wait = yes
    user = nobody 
    server = /usr/sbin/in.tftpd
    server_args = /tftpboot
    disable = no

Don’t forget to save the file using ctrl+O before exiting nano with ctrl+x (I have this weird habit of forgetting to save things before I exit a text editor like nano for some reason…). Then you’ll need to create the folder we passed to the server_args parameter:

sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot

Now you just need to restart the tftp service to allow for all the edits to take effect.

sudo /etc/init.d/xinetd stop 
sudo /etc/init.d/xinetd start

Linux Shell: Xilinx’s IDEs aren’t guaranteed to get along well with your shell being dash, so you’ll want to switch it over to bash:

sudo dpkg-reconfigure dash

Select the yes option on this when it pops up.

Serial terminals: If you would like to use UART in any of your FPGA designs to talk via a serial console (for you fans of print statement debugging), you’ll need to configure a few things to allow for SDK to access your computer’s USB ports. First you’ll need to install grep and screen:

sudo apt-get install grep 
sudo apt install screen

The grep tool allows for Linux to search for & list the serial port names available on your computer, and screen is basically the Linux equivalent of PuTTY or TeraTerm on Windows. Side Note: screen isn’t 100% necessary since Xilinx’s SDK has its own version built-in, but I have come across times in trouble-shooting where it’s helpful to have this tool as an external verification. If you plan install PetaLinux however, screen is a necessary requirement.

I am reading between the lines here, but I’m pretty sure that the built-in serial console in Xilinx’s SDK uses the grep tool to list the serial ports available to then establish a connection because until I installed grep, I was never able to get SDK to see any of the available serial ports on my machine.

Downloading the Vivado Installer:

Now that you have Ubuntu prepped and ready to go, it’s finally time to navigate to the Downloads page on Xilinx’s website. There are several options of packages to download on this page, the one you want is “Vivado Design Suite - HLx Editions - 2018.2 Full Product Installaion“. You’ll also want to have UG973 open for this part starting at chapter 3 on page 16 (just make sure that it is the UG973 version specific to Vivado 2018.2 that was published on July 23, 2018 which you can find here). It’s super detailed and very clear, so I’m not going to bother copying specific steps here, but just point you in the right direction. There are two options for installers that Xilinx makes available: a web-based installer and a single-file download installer. I highly recommend the latter option for a couple of reasons:

1 - If your internet connection drops out during the download of the installer, it's not a huge deal, just restart the download. However, if your internet goes down during the installation process while using a web-based installer, you're probably going to have a bad day...

2 - In a professional setting, project recreation (and the speed at which you can recreate a project) is a huge deal. One of the most prominent roadblocks in project recreation is version incompatibility, particularly with compilers because the main thing that changes between versions is how your code is being compiled. For example: I've had numerous occasions where Verilog I wrote in 2015.4 and worked like a charm, but left a giant smoking hole in the middle of my project in 2017.2. A single file installer package allows for you to zip up that specific version of Vivado and check it into your repo with the rest of your code and you don't have to worry about it again. The person that comes after you will also thank you immensely… Consider it an action of paying-it-forward and creating some good karma for yourself.

Once you have selected your installer option, the next step is to verify your download. This verification not only serves to protect you against corruption due to connection hiccups, but also against malicious attacks that would result in your downloading anything other than Xilinx's legitimate software. I won't go into too much more detail because I'll just be copying + pasting from UG973, so flip over to that and start on page 17. Come back here once you have completed through page 23.

Side note #1: Make sure you execute all of these commands within the same folder you have saved all of the downloads to.

Side note #2: Notice that your download file's name will be slightly different from the name in the tutorial, be sure to make those slight changes if you're copy+pasting from the UG into the terminal.

Once your download & verification is complete, navigate to your Downloads folder and make the .bin file an executable:

chmod +x vivado-installer-file-name.bin

Then simply run the executable:

sudo ./vivado-installer-file-name.bin

At this point, a GUI will pop up and walk you through the rest of the installation. One of the first screens will ask you for your Xilinx login credentials. You would have had to have created one already to download the installer from Xilinx's website, so you'll just re-enter that same login here. Below that, you have two options to either download and have the installation kick off immediately, or the GUI will exit after the download and you'll have to kick off the installation yourself at some point in time.

Unless you have Matlab installed on your computer already and you're ready to tackle more DSP intensive tasks, select the second option 'Vivado HL Design Edition'. You can always come back later and install the extra packages, but save yourself the disk space for the moment if you're not ready to use it. On the next page, double and triple check that the little box next to the 'Software Development Kit (SDK)' is checked. For some reason, this isn't checked by default. I'd be lying if I said that I hadn't gone through the full installation of Vivado in the past and spent 10 minutes afterwards trying to launch SDK, only to realized I had forgotten to check this stupid little box.

The next page will let you choose your install directory for Vivado. If you get an error that says something along the lines of "Cannot write to..." or "Permissions blah blah" written in red text, no worries, just open up a separate terminal and use chmod 777 to change the permissions of that folder such that Xilinx's installer can write/read to/from it. Just make sure your install directory isn't in a vulnerable location such that it having full permissions available like this would open you up to a malicious attack. You may need to hit the back button in the installer window to go back a page then return to the install directory selection page before the installer will recognize the updated permissions of the folder.

After you hit next, go grab a snack and do something else for a while, the install takes about an hour (give or take depending on the specs of your computer).

Once the installation is complete, there is one extra thing in Linux that you have to do. There are drivers that Xilinx's programming cables require that must be installed using root access, so after the overall installation is complete you can run the cable driver installation script using super user access. You can find the script by navigating here:

<Vivado Install Dir>/data/xicom/cable_drivers/lin64/install_script/install_drivers/

Run the script you find here as root:

sudo ./install_drivers 

Now be sure you don’t have any programming cables or dev boards plugged into your computer before you run this script.

Xilinx license manager will pop up also directly after the installer has finished running, I just exit out of it. Unless you're looking to use any of the more specialized IP, I've found you can still generate a bitstream and export to SDK without a specific license.

There you have it! You’re ready to start developing!