Xilinx makes a number of great products that we have worked with in the past. If you haven’t used an FPGA-based platform before, it is amazing what you can do with these devices. You can literally build hardware accelerators, meet hard real-time deadlines in silicon, make changes to the FPGA logic in the field with OTA updates, and many more applications. I think we’re just getting started with understanding how to apply FPGAs to real-world problems.
With this complexity comes a huge amount of complexity in the toolset. Imagine the complexity that goes into compilers – and then imagine configuring asynchronous logic in silicon across millions of configuration settings – and you’ll understand how complex these tools need to be to enable development. Additionally, most FPGAs these days contain a “hard core” and configurable logic. The hard core is a traditional CPU, fixed in the silicon. The FPGA fabric connects to the hardcore to allow an infinite number of configuration options. The Xilinx Unified Installer for 2020.1 tools is over 35 GB!!! Yikes!
The Unified Installer contains both Vivado and Vitis. Vivado Design Suite is a platform for synthesis and analysis of hardware description language (HDL) designs – the FPGA portion of the device. Verilog and VHDL are the two most popular HDLs, and they are used with FPGAs to design for the configurable portion of the silicon. Vitis IDE, on the other hand, is an embedded software development platform targeted towards Xilinx embedded processors. With Vitis, the developer can debug their application code together with the hardware designs created with Vivado.
Due to this enormous complexity, the toolset requires a fairly specific environment to run in. At DojoFive we’re mostly a Mac shop, but Xilinx prefers to run on Ubuntu 18.04.4. We’ll setup an example environment for the Zynq 7Z007S on an Avnet MiniZed development board to show you how we do it – and hopefully speed up your own development in the process!
Create a Virtual Machine
Since macOS is not one of the supported operating systems for installing Vivado and Vitis, a virtual machine is needed for hosting a supported OS. This can be done with software such as VirtualBox and Parallels. In this blog post, we are using Parallels. To test out the software, you can download the 14-day free trial version and follow the installation instructions on their site.
Once Parallels is installed, we want to download an ISO image to create a virtual machine. Since Ubuntu is one of the supported OSes, download an Ubuntu ISO image. Vivado and Vitis only work on the following versions of Ubuntu, so take care that your ISO is of one of these versions.
Supported Ubuntu Linux Version - 16.04.5 - 16.04.6 - 18.04.1 - 18.04.2 - 18.04.3 - 18.04.4 LTS (64-bit)
What if You Use the Wrong Ubuntu Version
Vivado will throw an error when you try to open it on an Ubuntu version that is not supported. When that happens, you have to download the correct ISO image, create a new virtual machine, and install Vitis again. To remove the unsupported virtual machine, go to the control center, right-click on the virtual machine, and click “Remove <VM_NAME>…`
On the Parallels window, select “Install Windows or another OS from a DVD or image file” and point it to the ISO image you just downloaded. Continue with the instructions to create the Ubuntu virtual machine.
Re-size Virtual Machine Disk Space
With the default disk space, it is not enough to install both Vitis and Vivado. To update the disk space, shut down your virtual machine, go to the control center of Parallels, and click on the Settings icon to open the configuration windows. Under Hard Disk â†’ Advanced Settings, click on Properties and drag the slider to the desired disk space. Since installing Vitis and Vivado requires 78 GB, and you’ll need even more space for your designs to be built, I suggest setting the VM’s disk space size to 256GB.
Once it’s ready, start up your virtual machine, install a partition management tool called
gparted, and run it with the following commands.
# Install gparted $ sudo apt-get install gparted # Run gparted $ sudo gparted
By running gparted, a window will be opened. You should see the newly available space and you can drag it to the right to take up all available space. Under
Edit, click on
Apply all operations. You are now ready to download the Vivado Design Suite.
What if you don’t re-size the disk space
The following error will show up in the last step of installing Vitis and Vivado.
Download Vitis and Vivado Design Suite
Once the disk space is updated, download the latest version of
Xilinx Unified Installer: Linux Self Extracting Web Installer from the Xilinx website. Since the installer is a .bin file, run it with the following steps.
# Make the .bin file executable $ chmod +x Xilinx_Unified_<version>_0602_1208_Lin64.bin # Run the installer $ ./Xilinx_Unified_<version>_0602_1208_Lin64.bin
On the installer window, select Vitis to be installed. It will include Vivado Design Suite. To reduce the install size, remove all devices except the one used in your project on the “customize your installation” screen. For our example Zynq-7000 project, only
Zynq-7000 is selected.
Run Vivado or Vitis
Finally, to run Vivado or Vitis on ubuntu, you need to source the
settings64.sh file and create a directory as the workspace. You can also add the source commands to the
~/.bashrc file so that you don’t have to source the shell script every time you want to run Vivado or Vitis.
# Add the source commands of both Vivado and Vitis to the ~/.bashrc file # in your virtual machine (Only have to do it once) source /opt/Xilinx/Vivado/<VERSION>/settings64.sh source /opt/Xilinx/Vitis/<VERSION>/settings64.sh # Create a directory as the workspace (Only have to do it once) mkdir ~/<VIVADO_WORKSPACE> mkdir ~/<VITIS_WORKSPACE> # Run Vivado cd ~/<VIVADO_WORKSPACE> vivado & # Run Vitis cd ~/<VITIS_WORKSPACE> vitis &
TADA! You’ve done it! There is a pretty steep learning curve to using these tools, but a number of good resources exist. Check out AvNet’s ZedBoard pages, Element14, and Xilinx’s documentation.
And please let us know if you’re using the Xilinx tools or any FPGA in your embedded work. We’d love to hear about what others are doing and how we can all bring embedded to the next level!
DojoFive brings modern tools, techniques, and best-practices from the web and mobile development environments, paired with leading-edge innovations in firmware to our customers to help them build successful products and successful clients. We have talented engineers on hand ready to help you with all aspects of your EmbedOps journey. Bring your interesting problems that need solving – we are always happy to help out. You can reach out at any time on LinkedIn or through email!