Getting Started

Ā 

If you already have Vivado installed and would like to extend your trial license skip to Load License (Existing Install)

If you are developing on the AWS FPGA Developer AMI skip to Install AWS F1 Repo and beware of the one extra step required under Vivado Simulation/Synthesis.

If you are just getting started and do not have Vivado installed, begin below.

Ā 

Ā 

This page describes how to install Vivado, SDAccel, and an extended competition license from Xilinx for on-premise development. With this install you will be able to run both Vivado and the AWS F1 SDAccel flow locally.

This will work on AWS EC2 but if you are working on AWS we highly recommending using the AWS FPGA AMI as the tools and license are pre-installed. See https://github.com/supranational/vdf-fpga/blob/master/docs/aws_f1.md, and you can jump forward in this guide to see how to run hardware emulation, SDAccel synthesis, Vivado behavioral simulation, and Vivado out-of-context synthesis.

If Vivado is already installed: This assumes a from scratch install. If you already have Vivado installed and want to extend the license or add SDAccel you can skip ahead to Load License. It is important to note that if you originally installed Vivado using sudo then it must be run with sudo to add or remove devices!

Ā 

Host/OS

This document assumes Ubuntu 18.04 LTS. The tools and OS require about 63GB of disk space.

Generate License

In order to use the extended competition license you will need to redeem your code at https://www.xilinx.com/getlicense.

After logging in (you will need an account) enter your voucher number and select ā€œRedeem Nowā€.

Select the licenses below and click ā€œGenerate Node-Locked Licenseā€.

You will have to provide the host MAC address to bind the license to. Be sure to choose a host where you will have long term access. You can find the MAC address by running ā€˜ifconfigā€™ in Linux. Look for the wired ethernet connection, then the colon separated 12 digit hex value after ā€œetherā€.

The new license will be emailed to you. You will need to download it and make it available on the target host.

Installing Vivado

Download and Launch

Download the ā€œVivado Design Suite - HLx Editions - 2018.3 Full Product Installationā€ Web installer from https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/vivado-design-tools/2018-3.html ā€“ Be sure to get the installer, not the update!

Once you have the file start the installation process:

chmod 755 Xilinx_Vivado_SDK_Web_2018.3_1207_2324_Lin64.bin sudo mkdir -p /tools/Xilinx sudo chown $USER:$USER /tools/Xilinx ./Xilinx_Vivado_SDK_Web_2018.3_1207_2324_Lin64.bin

!!! DO NOT UPGRADE !!!

AWS does not support 2019.1 yet! Click ā€˜Continueā€™ and not ā€˜Get Latestā€™.

Install HL Design Edition

Devices

Install the minimum set of required devices. From here click Next, use the default installation directory, say Yes to create the directory, and Install to proceed.

Load License (New Install)

Once the install is done the License install window will appear.

Select Load License, then Copy License, and browse to the license file you generated earlier.

Load License (Existing Install)

If you are looking to extend your license or add SDAccel, launch Vivado then select Help -> Manage Licenseā€¦

Select Load License, then Copy License, and browse to the license file you generated earlier.

License Status

After loading the license select View License Status. It resemble the screen below. In particular you should see PartialReconfiguration, XCVU9P, and ap_opencl.

Add Vivado to path

Add Vivado to your path. You can also append this line to ~/.profile to add it to future login sessions.

export PATH=/tools/Xilinx/Vivado/2018.3/bin:$PATH

Ā 

Install SDAccel

SDAccel (SDx) is the environment used by AWS F1. In order to develop bitstreams for F1 you will need to install SDx and associated tools.

Add Tools

Launch Vivado, then select Help -> Add Design Tools or Devices...

Note that if Vivado was installed with sudo you must run it again with sudo to add devices or you will see a blank screen when you attempt to install SDx.

SDx Install

Select SDx Development Environments

SDAccel, Spartan-7, and UltraScale+ should be enabled.

If you get a blank screen after clicking Next see the note above about running with sudo.

toolchain.sh error

If you receive this error you can ignore it as it does not seem to impact the installation.

Add SDx to Path

You can also add these to the end of your ~/.profile file so that they are automatically set in the future.

export XILINX_SDX=/tools/Xilinx/SDx/2018.3 export PATH=$PATH:$XILINX_SDX/bin

Install XRT

The Xilinx runtime is required to build SDAccel targets.

Install Dependencies

Use bash instead of dash

Various scripts expect a full shell, not the minimal dash shell shipped with Ubuntu.

http://www.humbug.in/2012/configure-ubuntu-to-use-bash-as-default-shell-instead-of-dash/

Run the following command and select ā€œNoā€ when prompted.

Install XRT from GitHub

https://www.xilinx.com/html_docs/xilinx2019_1/sdaccel_doc/installing-sdx-environments-tik1504034261337.html

https://github.com/Xilinx/XRT/blob/master/src/runtime_src/doc/toc/build.rst

Create /bin/env

This is expected by some of the AWS scripts.

Fix up xrt libraries

On Ubuntu there seem to be compatibility issues with the xrt version of libstdc++.so.6. Change it to use the OS installed libary.

Install AWS F1 repo

Clone the AWS F1 environment.

Run hardware emulation

If sdaccel_setup.sh fails to complete successfully for any reason it tends to leave the shell in a broken state. This can lead to strange tool errors. In this case it is best to start fresh from a new shell.

Run synthesis

Once hardware emulation completes you can perform synthesis to generate a bitstream. This takes several hours.

Vivado Simulation/Synthesis

You can also run behavioral simulation and out-of-context synthesis in Vivado. This provides a more interactive environment for development with fast simulation, waveform viewing, GUI based synthesis and design exploration. It is convenient to develop and tune the design here prior to using SDAccel.

To run Vivado choose either the ā€œsimpleā€ or ā€œOzturkā€ multiplier and launch Vivado using the provided script.

Ā 

NOTE: AWS FPGA AMI ONLY

If you are running this on an AWS FPGA AMI the above commands will fail due to lack of support for the Spartan-7 family. You can manually select the vu9p part by running the following sed command in vivado_simple of vivado_ozturk.

NOTE: AWS FPGA AMI ONLY

Behavioral Simulations

You can run behavioral simulations using the GUI as shown. The test is self checking and should print ā€œSUCCESSā€.

In addition to ā€œSUCCESSā€, the simulation prints cycles per squaring statistics. This, along with synthesis timing results, provides an estimate of latency per squaring.

Synthesis

To perform synthesis first make sure the correct part (vu9p) is selected by navigating to Settings ā†’ Project Device:

Note: If you are an AWS FPGA Developer AMI the vu9p should already be selected

Select part xcvu9p-fsgd2104-2L-e:

Run out-of-context synthesis + Implementation to understand and tune performance. A pblock is set up to mimic the AWS F1 Shell exclusion zone. In our experience these results are pretty close to what you will get on F1 and and provide an easier/faster/more intuitive interface for improving the design.

Ā