You are here: Home / Past Courses / Spring 2011 - ECPE 293B / Tutorials / Hardware Initial Setup

Hardware Initial Setup

In order to do hardware development for the NetFPGA platform, several steps must be taken to prepare your environment on the main server. You will need to perform these steps in the account of each user that wants to do hardware development.

First, on your local machine, make sure your X11 server is running.  On a Linux desktop, the server is already running. If you're using a Windows machine, we recommend the XMing program (download both the server and the fonts package). Then, enable X11 tunneling in your SSH client, and log in via SSH to ecs-network.serv.pacific.edu.

On the server, edit the .bashrc file in your home directory. This file is read by the default shell (bash) automatically when you log on, and is a convenient place to save settings that will automatically take effect.

emacs ~/.bashrc &

Note: If (for some crazy reason) Emacs is not your favorite text editor, gedit and vi are also available, or you could request another editor be installed.

 

NetFPGA Environment Variables

Copy and paste the following lines at the bottom of your .bashrc file. These lines are required by the various Makefiles in the NetFPGA project. Of specific interest are the first two lines to be added. The first line records the location of the base NetFPGA library. You will not need to modify this project directly, but will instead customize and override these default files within your own projects directly. The location of the specific project directory you are currently developing is recorded in the second line.

# NetFPGA variables
export NF_ROOT=${HOME}/netfpga
export NF_DESIGN_DIR=${NF_ROOT}/projects/reference_nic
export NF_WORK_DIR=/tmp/${USER}

export PYTHONPATH=${PYTHONPATH}:${NF_ROOT}/lib/python
export PERL5LIB=${PERL5LIB}:${NF_ROOT}/lib/Perl5
export LD_LIBRARY_PATH=${NF_ROOT}/lib/java/NetFPGAFrontEnd/bin:${LD_LIBRARY_PATH}

if [ ! -d ${NF_WORK_DIR} ]; then
mkdir ${NF_WORK_DIR}
fi

if [ ! -d ${HOME}/.qt ]; then
mkdir ${HOME}/.qt
fi

if [ -f ${NF_ROOT}/bin/nf_profile ]; then
source ${NF_ROOT}/bin/nf_profile
fi

 

Xilinx Environment Variables

Xilinx-specific environment variables must be set to run the Xilinx tools. These settings are stored in  /Xilinx/10.1/ISE/settings64.sh.  Add the following line to your .bashrc file.

# Xilinx variables
source  /Xilinx/10.1/ISE/settings64.sh
export XKEYSYMDB=/usr/share/X11/XKeysymDB

Tip: If using Xilinx coregen and it prompts you for the path to the PDF viewer, enter "usr/bin/evince"

 

ModelSim Environment Variables

To execute the ModelSim simulator properly using the Pacific site license, add the following lines to your .bashrc file.

# ModelSim variables
PATH=$PATH:/modeltech/linux_x86_64
export LM_LICENSE_FILE="1717@ecs-srv1.stk.pacific.edu"

 

When you have finished making the changes to the .bashrc file, exit gedit, log out of SSH, and log in again for your settings to be automatically loaded.

Verify your installation by running (for example), Xilinx Core Generator or ISE

coregen &
ise &

 

Xilinx License Files

The NetFPGA design uses commercial IP libraries from Xilinx for some key functions, including the Gigabit Ethernet MAC and PCI bus controller. These cores require a license file in order to be used. These licenses are stored on a per-user basis in your home directory at ~/.Xilinx/Coregen/CoreLicenses/. To obtain the licenses, make a special folder in your home directory, and copy the license to it.

cd ~
mkdir -p .Xilinx/Coregen/CoreLicenses
cp /exports/provided/Xilinx.lic ~/.Xilinx/Coregen/CoreLicenses/