Cora Z7 1: Cora Z7 and Installing Vivado

I recently purchased a Cora Z7-10 from Digilent.

The Cora Z7-10 features a Xilinx Zynq 7010 System on Chip (SoC) which sports two ARM Cortex-A9 processing cores, a broad array of IO, dual abalog to digitla converters and programmable logic. Details of the board features can be found in the reference manual. Over the next several months I will work on several small projects with a end goal of creating an embedded system to control one or more brushed or brushless DC servomotors . The first step in this process is to install the necessary development tools.

Install Xilinx Vivado

Development on the Cora Z7 boards are supported by the Xilinx Vivado Design Suite. I will be using the latest Webpack version of this suite. At the time this project was started this was Vivado HLX 2018.3. I will be installing Vivado on a Ubuntu 16.04. I have installed Vivado on Windows 10 and got a “Hello Cora” project up and running but I found that the SDK would crash without an error message. Checking the Xilinx forums I found that a work around for the problem was to disable the automatic build setting in the Vivado SDK. To disable just uncheck “Automatic Build” under the “Project” menu of the SDK.

If you haven’t already registered an account with Xilinx you will need to do so before you can download Vivado. Once your account is set up, download the Vivado Design Suite suite from Xilinx.

https://www.xilinx.com/support/download.html

I downloaded

Extract the archive into a working directory. Open up an terminal. Decide where you want Vivado installed. The default for Vivado 2018.3 /tools/Xilinx. I had previously installed Vivado 2016.4 in /opt/Xilinx so will be installing in the /opt/Xilinx directory. If your directory doesn’t already exist create it. In my case

sudo mkdir /opt/Xilinx

Check the file permissions.

ls -al /opt

drwxr-xr-x 5 root root 4096 May 2 21:11 .
drwxr-xr-x 25 root root 4096 Apr 27 07:36 ..
drwxr-xr-x 9 root root 4096 Apr 25 21:44 Xilinx

If your permissions do not allow “other” read and execute permissions use the “chmod” command set the correct permissions.

sudo chmod 755 /opt/Xilinx

Start the installer.

cd Xilinx_Vivado_SDK_2018.3_1207_2324/
sudo ./xsetup

You will get the “Welcome” dialog box.

Note the comment circled in red. I will return to this later. Click “Next >”

Accept the license terms and conditions.

Click “Next >”

Select the edition that you have or for which you can obtain a license. I am using the free WebPACK.

Click “Next >”

These are the default WebPACK selections. I chose these.

Click “Next >” once your selection are made.

Click “Next >”

A summary of the installation choices will be displayed. You may go back and make changes if required.

Click “Install” when ready to proceed.

Installation progress will be updated.

When finished you will be notified.

Once installed, configure the settings file to run by adding the following lines to your .bashrc file in your home directory.

source /opt/Xilinx/Vivado/2018.3/settings64.sh

Make sure to use your install path. After starting up a new terminal Vivado can be run from the command line using

vivado &

The Xilinx SDK can be run from the command line using

xsdk &

I am using the “Unity” desktop environment. To launch Vivado and the SDK from the Unity Launcher create the following two files in ~/.local/share/applications

Vivado_2018.desktop
SDK_2018.desktop

The contents of these file respectively is

[Desktop Entry]
Name=Vivado_2018
Comment=Xilinx Design Suite for HDL design
Exec=/opt/Xilinx/Vivado/2018.3/bin/vivado
Icon=/opt/Xilinx/Vivado/2018.3/doc/images/vivado_logo.ico
Terminal=false
Type=Application

[Desktop Entry]
Name=SDK_2018
Comment=Xilinx Software Development Kit
Exec=env SWT_GTK3=0 /opt/Xilinx/SDK/2018.3/bin/xsdk
Icon=/opt/Xilinx/SDK/2018.3/data/sdk/images/sdk_logo.ico
Terminal=false
Type=Application

Obtain a Vivado License

Start Vivado ether from the command line or the launcher. Start the License Manager under the Help menu.

Help->Manage License…

Click “Obtain License“.

Select the appropriate entry for your install and click “Connect Now“. Login to your Xilinx account. Click “Next” to proceed license entitlement page. Choose your license(s). Click “Generate Node-Locked License”. The “Generate Node License” dialog will come up. Add any comment that you like.

Click “Next“.

Review the license request.

Click “Next“.

The license file will be emailed to the email address set up in your Xilinx account. Close the email notification dialog.

When you receive the email, save the attached license file to a convenient location. From the Vivado License Manager click “Load License”.

Click “Copy License…“. Browse to the location that you save the license file that you received by email. Select it. Click “Open“.

Click “OK”. Select “View License Status” in the License Manager to view the updated License status.

Close the license manager. Exit Vivado.

Additional Library Installation

NOTE: None of this may be necessary.

Remember way back on the “Welcome” dialog for the installation of Vivado there was a comment about “Additional library installation required” for a Ubuntu install.

There is an answer in Xilinx support which addresses this issue.

https://www.xilinx.com/support/answers/66184.html

That being said I have had no problem without following the procedure in this answer; and like they say … “If it ain’t broke don’t fix it. I did go part way through the procedure to try and discover the which libraries that my install missed. If I run into issues in the future I will need to revisit this answer.

A Perl script is provided to check for required libraries and libraries that are missing on a Linux system. Download the Perl script from

https://sourceforge.net/projects/recursive-ldd/

Save the script to a convenient location. Open a terminal and navigate to that directory. Check that Perl is installed on your system. Execute the command on the terminal.

which perl

If it exists and is found you should get a response something like.

/usr/bin/perl

If not found install Perl.

The Vivado environment needs to be set up by sourcing “settings64.sh”. This should already be done if you added the line

source /opt/Xilinx/Vivado/2018.3/settings64.sh

to your .bashrc file as directed above. Run (with your install path substituted)

perl ldd-recursive.pl /opt/Xilinx/Vivado/2018.3/bin/unwrapped/lnx64.o/vivado -uniq

You will get an output something like the following.

librdi_commonmain.so => not found
/lib64/ld-linux-x86-64.so.2
librdi_common.so => not found
libtcmalloc.so.4 => not found
/lib/x86_64-linux-gnu/libc.so.6
linux-vdso.so.1
/lib/x86_64-linux-gnu/libm.so.6
/lib/x86_64-linux-gnu/libgcc_s.so.1
libboost_signals.so => not found

I found all of the libraries that the script reported missing in

/opt/Xilinx/Vivado/2018.3/lib/lnx64.o/

and

/opt/Xilinx/SDK/2018.3/lib/lnx64.o/

Install Cable Drivers

The Linux install of Vivado does not install the JTAG cable drivers. These can be installed by running a script as super-user. Change to the directory containing the script.

cd /opt/Xilinx/Vivado/2018.3/data/xicom/cable_drivers/lin64/install_script/install_drivers/

Run the “install_drivers” script as super-user.

sudo ./install_drivers

Install Digilent Boards Files

Before you can do much useful work with Cora Z7, a board definition file needs to be installed. Download the archive of Digilent Vivado boards repository from

https://github.com/Digilent/vivado-boards/archive/master.zip?_ga=2.189455785.301761015.1557099321-30372036.1524673665

Unpack the archive into a convenient location. Edit the “init.tcl” file in the “utility” subdirectory of the boards repository that you just unpacked. The Vivado_init.tcl file is for Vivado versions before 2016.4. Change the path in the script to the extracted location of the Digilent Vivado board files. My script looks like this. Note that environment variables will not work in this script.

set_param board.repoPaths [list “/home/glenafield/Xilinx/Vivado/vivado-boards-master/new/board_files”]

Save the file and exit the editor. In a terminal, as super-user, copy the edited “init.tcl” file into “$HOME/.Xilinx/Vivado/

sudo cp init.tcl $HOME/.Xilinx/Vivado/

Vivado should now be setup and configured for the Digilent Cora Z7 board. In the next post I will create a simple “Hello Cora” application to run on one of the Cora Z7’s Zynq processors.