-
Notifications
You must be signed in to change notification settings - Fork 46
Projects
The NetFPGA-SUME code base comes with a small set of projects to be used as models for building your own, and hence are typically referred to as "reference projects" or "reference designs".
The following is a list of links to the documentation for each of the reference projects in the code base, along with the Acceptance Test:
- NetFPGA-SUME Acceptance Test
- NetFPGA-SUME Reference NIC
- NetFPGA-SUME Reference Learning Switch
- NetFPGA-SUME Reference Learning Switch (Lite)
- NetFPGA-SUME Reference Router
- NetFPGA-SUME Acceptance Test
- NetFPGA-SUME Reference NIC
- NetFPGA-SUME Reference Learning Switch
- NetFPGA-SUME Reference Learning Switch (Lite)
- NetFPGA-SUME Reference Router
Here we consider a reference project (reference_nic) and explain how to build a project from scratch to running the hardware tests.
- Make sure you clone the latest version of the NetFPGA package. Please ensure that you have the necessary packages installed. The current testing infrastructure is Python based.
git clone https://github.com/NetFPGA/NetFPGA-SUME-live.git
- Make sure the ~/tools/settings.sh file is updated in your system.
Check if the variables like SUME_FOLDER, NF_DESIGN_DIR are set in the right path, e.g.:
export NF_PROJECT_NAME=reference_nic
Try to do an echo $SUME_FOLDER , echo $NF_DESIGN_DIR refer to the path you want.
To set up the environment variables, source both relevant settings files, e.g.:
source ~/NetFPGA-SUME-live/tools/settings.sh source /opt/Xilinx/Vivado/2014.4/settings64.sh
- Do a
make
only the first time when you have a fresh repository. It is not necessary to repeat thismake
every time you want to build a new project unless you have made any changes to the IP cores.
[root@nf-test109 ~]# cd $SUME_FOLDER [root@nf-test109 NetFPGA-SUME-live]# make
- Program the FPGA with the right bitfile using XMD (Xilinx tool).
- If you want to run the Hardware tests with the pre-existing bitfile provided in the base repo:
[root@nf-test109 reference_nic]# cd bitfiles [root@nf-test109 bitfiles]# xmd
On the xmd console, use fpga -f reference_nic.bit
to program the FPGA with the bitfile. Reboot the machine.
- If you want to create your own bitfile and run the Hardware tests:
[root@nf-test109 reference_nic]# make [root@nf-test109 reference_nic]# cd bitfiles [root@nf-test109 bitfiles]# xmd
On the xmd console, use fpga -f reference_nic.bit
to program the FPGA with the bitfile. Reboot the machine.
- Check if the bit file is loaded using the following command.
[root@nf-test109 scripts]# lspci –vxx | grep Xilinx
If you don't see the Xilinx device, you need to reprogram the FPGA and reboot as mentioned earlier.
- Build the driver for the NetFPGA SUME board and check if the built kernel module is loaded.
When building as non-root user you need to append
sudo
to all commands of themodules_install
target.
[root@nf-test109 ~]# cd $DRIVER_FOLDER [root@nf-test109 sume_riffa_v1_0_0]# make all [root@nf-test109 sume_riffa_v1_0_0]# make install [root@nf-test109 sume_riffa_v1_0_0]# modprobe sume_riffa [root@nf-test109 sume_riffa_v1_0_0]# lsmod | grep sume_riffa
Then run ifconfig -a
to check if you are able to see the 'nfX' interfaces.
- Running the test
The top level file nf_test.py file can be found inside NetFPGA-SUME-live/tools/scripts. Tests are run using the nf_test.py command followed by the arguments indicating if it is a hardware or simulation test and what is the specific test that we would like to run. So when running the test, test mode should be specified (sim or hw). For instance:
[root@nf-test109 scripts]#./nf_test.py hw --major loopback --minor minsize
or
[root@nf-test109 scripts]#./nf_test.py sim --major loopback --minor minsize
For a complete list of arguments type ./nf_test.py --help.
You can find more information related to hardware and simulation tests here:
The test infrastructure is based on the python. You can find the tests inside the projects/{project_name}/test folder.
The 10G NIC on NetFPGA is similar to other NICs. In the following sections, we will show how to run a iperf test between NetFPGA and another machine.