Skip to content

Reference Operating System Setup Guide

Benedikt Rudolph edited this page Jan 22, 2016 · 40 revisions

Introduction

NetFPGA-SUME development should be possible on any Linux distribution which supports the Xilinx Vivado Design Suite. We are currently using Xilinx Vivado Design Suite 2014.4. Xilinx provides a list of officially-supported Linux distributions for Vivado Design Suite 2014.4 under Architecture Support and Requirements section of UG973.

In this guide, we will provide instructions on setting up Vivado Design Suite, and programming solutions for NetFPGA-SUME board on Ubuntu 14.04.2 LTS. The screen shot are taken from a machine running Ubuntu 14.04 LTS.

Change host name

You can skip this step, if you don't wish to change the host name. Modifying the following files based to get your desired host name.

vi /etc/hostname

vi /etc/hosts

source : http://ubuntuhandbook.org/index.php/2014/04/change-hostname-ubuntu1404/

Enable root login

Running Xilinx tools using root privileges saved us a lot of time by avoiding random errors (due to permissions and path settings). We have noticed that Vivado tools can also be run with user privileges with less hassles. But we are yet to test it.

Create your own configuration file (in our case 50-neels.conf)

vi /usr/share/lightdm/lightdm.conf.d/50-neels.conf

and write the following contents into it.

[SeatDefaults]
allow-guest=false
greeter-show-remote-login=false
greeter-show-manual-login=true

Then update root password

sudo su -
passwd root
{write your password}

source 1 : http://ubuntuforums.org/showthread.php?t=2205637

source 2 : http://jbob.io/wiki/index.php/Ubuntu_14.04

Delete other users

deluser username

Overcoming the error when you login as root.

if we login as root, we get an error due to the problem is in /root/.profile. This is because in graphical mode "mesg assumes that its standard input is connected to your terminal".

To overcome this problem, replace

mesg n

with:

if `tty -s`; then
mesg n
fi

source: http://ubuntuforums.org/showthread.php?t=2270923

Disable ipv6

We need to disable ipv6 as interferes with our python testing framework.

Append the following into /etc/sysctl.conf

   #disable ipv6
   net.ipv6.conf.all.disable_ipv6=1
   net.ipv6.conf.default.disable_ipv6=1
   net.ipv6.conf.lo.disable_ipv6=1

Disable Avahi daemon

Please follow the suggestions in the following link to disable avahi daemon. As it interferes with the test infrastructure.

https://ubuntuusertips.wordpress.com/2012/09/13/get-rid-of-avahi-service/

Additional Required Packages

Depending on how you install the Linux distributions, the operating system can be configured with different set of packages. The following list of packages are needed so that your environment is ready for development for NetFPGA-SUME board. Please install the following packages using package manager that comes with your distribution, e.g. apt for Ubuntu.

First update all your packages using the following command.

$ apt-get update

To run package installation in Ubuntu:

$ apt-get install <package_name>

To search package in Ubuntu:

$ apt-cache search <regular_expression>

Here are the list of mandatory packages:

Package How to Install Used for
gcc g++ apt-get install gcc g++ installing gcc and gcc C++ compiler (package gcc-g++ on other distos)
minicom apt-get install minicom RS-232 link to NetFPGA-SUME card
libusb-devel apt-get install libusb-dev Third-party driver for Xilinx JTAG programming cable
glibc.i686 apt-get install libc6-i386 32-bit statically-linked Microblaze compiler and binutils
pySerial apt-get install python-serial Python access for the serial port
wxpython apt-get install python-wxgtk2.8 Python GUI library
scapy apt-get install python-scapy Packet generator / receiver
Install ia32-libs apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 Otherwise, if you run mb-gcc, it will report: mb-gcc file not found error.
Install 32-bit libstdc++ apt-get install lib32stdc++6 Otherwise, if you run mb-gcc, it will report libstdc++ cannot be found
Install development tools apt-get install linux-headers-$(uname -r) build-essential linux headers
git apt-get install git for git repository
patch apt-get install patch for patching files
vim apt-get install vim for vim users

Patching pySerial

Open /usr/lib/python2.7/dist-packages/serial/tools/list_ports_posix.py

Insert the following line after line 67:

dev = popen(['cat', sysfs_path + '/devnum'])

Serial Port Privilege

You need change /dev/ttyUSB1 (usually this one) to rw-rw-rw- so that your user will have access to serial port:

$ sudo chmod 666 /dev/ttyUSB1

Install Xilinx Vivado Design Suite 2014.4

Xilinx Vivado Design Suite 2014.4 will work on most of the Linux distributions. You can download Xilinx Vivado Design Suite 2014.4 from here. You can use webinstall or download the full installation package. If you download the full package, please check the MD5 SUM Value before installation to make sure that the package is not corrupted.

If you downloaded webinstall, you can use the following commands:

$ chmod +x Xilinx_Vivado_SDK_2014.4_1119_1_Lin64.bin

$ ./Xilinx_Vivado_SDK_2014.4_1119_1_Lin64.bin

If you downloaded the full package, follow the next two steps: To extract the package, you can use the following command:

$ tar zxvf Xilinx_Vivado_SDK_2014.4_1119_1.tar.gz

Get into the extraction directory (usually Xilinx_Vivado_SDK_2014.4_1119_1), run xsetup with root previlidge.

$ sudo ./xsetup

The following steps are common to all installation modes:

Read and Accept License Agreements and select Vivado System Edition in Select Edition to Install page. In Vivado System Edition page, deselect Vivado High Level Synthesis (if you are not going to use it), select Software Development Kit and Install Cable Drivers as shown in the figure below:

Vivado Installation Configuration

The installation may takes several minutes to half an hour to finish depending on your computer performance.

After the installation, to start Vivado Design Suite, open a command prompt, source the environment setting script and start vivado:

$ source /opt/Xilinx/Vivado/2014.4/settings64.sh

$ vivado &

To test if the Vivado Cable driver works or not, connect NetFPGA-SUME to your PC, turn on the power supply for NetFPGA-SUME board, and click Open Hardware Manager in Vivado Welcom Window. Click Open Target on the green bar in the Hardware Manager window, and select Open New Target.... The Open New Hardware Target dialog will appear and click Next until Sleect Hardware Target tab. In the tab, you should see a Xilinx_tcf type target shows up in the Hardware Targets table, and xc7vx690t and xc2c512 device showed up in Hardware Devices table. If you see both of them available, the driver has been successfully installed.

NetFPGA-SUME Adept Tools Test

Install / Check Xilinx Licenses

see Licensing page.

Access Xilinx Documentation with DocNav (optional)

see corresponding section in Reference Operating System Setup Guide for Vivado 2015, method should also work for DocNav as part of Vivado 2014.

Installation of Digilent Adept Tools

You need to install Digilent Adept Tools to write bitfiles to the Flash. The on-board Flash is divided into 4 sections and you can configure which section to load the bitfile from when the board is powered up (please refer to the FPGA configuration section of NetFPGA-SUME Reference Manual). Digilent Adept Tools can be downloaded from Software->Adept2 section on Digilent Website. You need to download and install both Adept 2.16.1 Runtime and Adept 2.2.1 Utilities. Both of them are distributed in three format: DEB package, RPM package or compressed file with installation scripts. You can use DEB package for Ubuntu distribution.

To install the DEB package in Ubuntu:

$ sudo dpkg -i digilent.adept.runtime_2.16.1-2_amd64.deb

$ sudo dpkg -i digilent.adept.utilities_2.2.1-amd64.deb

To test the installation of Digilent Adept Tools, power on the NetFPGA-SUME board and connect it to your PC using the micro-USB cable. Open up a terminal and in command line:

  • Enumerate the devices (discover and list) with

$ djtgcfg enum

  • Initialize JTAG Scan Chain

$ djtgcfg init -d NetSUME

  • Enumerate devices with dsumecfg

$ dsumecfg enum

  • Configure NetFPGA-SUME with bitfile stored in Flash section 0

$ dsumecfg reconfig -d NetSUME -s 0

and you should get something like the screen shot below:

NetFPGA-SUME Adept Tools Test

Clone this wiki locally