We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 

MicroZed Chronicles: Vitis Acceleration - Creating a VM & Set Up

Xilinx Employee
Xilinx Employee
0 0 606

Editor’s Note: This content is republished from the MicroZed Chronicles, with permission from the author and Hackster.io.


One of the great things about Vitis is it enables us to accelerate our applications from the sequential software world into the parallel programmable logic world.

Of course, when we perform acceleration, we achieve an increase in not only performance but also determinism.

To accelerate applications using Vitis we need to use a Linux Machine which has the following requirements.

323_Fig1.jpgVitis Acceleration Requirements

To implement this Vitis Linux installation, to save my hard drive space and allow me to have several different versions of Vivado and now Vitis for clients. I have started using virtual machines on external solid state drives connected over USB C.

In this blog I am going to walk though the creation of the VM and installation of Vitis and Xilinx Run Time.

With this in place I can then walk through how to create our own acceleration platforms. Of course our Vitis platforms need both hardware and software elements created using Vivado and PetaLinux.

To create the virtual machine I use an Orcale VM and one of the supported Ubuntu releases. I chose to install 16.04.05 LTS on my virtual machine.

Before we run up the VM to install Vitis make sure you adjust the settings to provide sufficient memory and processor capability to ensure the VM has the capability to do what is asked of it.

323_Fig2.jpgSetting the Number of Processors

Once the VM has Ubunutu Linux installed (see here for a great guide) we can download and install Vitis

323_Fig3.jpgUnified Installer

To use Vitis for acceleration we need to install three elements

  • Install Vitis - Contains Vitis IDE, Vitis HLS, Vivado & Vivado HLS
  • Install OpenCL Client Driver - OpenCL drivers
  • Install the Xilinx Run Time - XRT for OpenCL

Installing Vitis is easiest using the unified Xilinx Installer.

323_Fig4.jpgInstalling Vitis

After Vitis is installed, we can install the Open CL client drivers for an Ubuntu installation we need the following

  • ocl-icd-libopencl1
  • opencl-headers
  • ocl-icd-opencl-dev

We install these with the command

sudoapt-getinstall <driver name>

With the drivers installed we are ready to install the Xilinx Runtime, we obtain the correct Xilinx Runtime by following the link in the installation guide for the appropriate Linux distribution.

323_Fig5.jpgSelecting the appropriate Run Time

Once XRT is downloaded we an install it from a terminal using the command

sudo apt install ./<xrt>


323_Fig6.jpgInstalling the XRT

However, if your Linux installation does not have the correct version of PYOPENCL installed you may see an error message like below

323_Fig7.jpgPYOPENCL failure message

In this case we need to refer to answer record 73055 which details how to correct this from occurring.

When I tried this on my Ubuntu installation the error persisted. However, when I changed the line sudo python -m pip install numpyto sudo python -m pip install pyopencl I was able to successfully install XRT.

323_Fig8.jpgInstalling pyopencl

As pyopencl is now installed at the latest version, the XRT installation process will skip the pyopencl installation as it is already present.

323_Fig9.jpgSuccessful XRT Installation

Once Vitis, is installed we can launch the IDE and obtain the Vitis Acceleration Example Repository. We can do this by selecting from the Menu Xilinx -> Examples.

323_Fig10.jpginstalling the Vitis Acceleration examples

We can also further download the Vitis acceleration libraries by selecting Xilinx->Libraries this will down load the Vitis Libraries.

Now we can start creating a acceleration platform which we will be looking at over the next few blogs.


See My FPGA / SoC Projects: Adam Taylor on Hackster.io

Get the Code: ATaylorCEngFIET (Adam Taylor)

Access the MicroZed Chronicles Archives with over 300 articles on the FPGA / Zynq / Zynq MpSoC updated weekly at MicroZed Chronicles.