MicroZed Chronicles: Vitis Acceleration — Creating a VM & Setup

How to install Vitis on a Linux VM to be able to accelerate applications in programmable logic.

One of the great things about Vitis is that 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 determinism as well

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

To implement this Vitis Linux installation, 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 Runtime.

With this in place, I can then walk through how to create our own acceleration platforms. Obviously, 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.

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

To use Vitis for acceleration, we need to install three elements:

  • Install Vitis — Contains Vitis IDE, Vitis HLS, Vivado and Vivado HLS
  • Install OpenCL Client Driver — OpenCL drivers
  • Install the Xilinx Runtime — XRT for OpenCL

Installing Vitis is easiest using the unified Xilinx nstaller.

After Vitis is installed, we can install the Open CL client drivers for an Ubuntu installation with 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.

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

sudo apt install ./<xrt>

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

In this case, we need to refer to answer record 73055 that 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.

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

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.

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.

Adam Taylor
Adam Taylor is an expert in design and development of embedded systems and FPGA’s for several end applications (Space, Defense, Automotive)
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles