-
Notifications
You must be signed in to change notification settings - Fork 22
Building Your First Project
Download the project repository.
# git clone git@github.com:NetFPGA/NetFPGA-PLUS-dev.git
# git clone https://github.com/netfpga/NetFPGA-PLUS.git
Check that you have a proper Vivado version (2020.2). If you don't have it, download it from Xilinx Vivado download page.
source /[installation_folder]/Xilinx/Vivado/2020.2/settings64.sh
Modify settings.sh
to match your environment and source it.
This file is included in NetFPGA-PLUS-dev directory.
# vim tools/settings.sh
### User defined
export NFPLUS_FOLDER=${HOME}/NetFPGA-PLUS
export BOARD_NAME=au280
export NF_PROJECT_NAME=reference_switch
# source tools/settings.sh
Supported FPGA Card | BOARD_NAME |
---|---|
Xilinx VCU1525 | vcu1525 |
Xilinx Alveo U200 | au200 |
Xilinx Alveo U250 | au250 |
Xilinx Alveo U280 | au280 |
XAPP1511 CAM is used in Switch OPL for BCAM and router for TCAM and BCAM.
Download Xilinx Application 1151 CAM which could be found on the Xilinx website by searching for "xapp1151".
Copy it to two locations in the library and run command make update
respectively.
# cp xapp1151_Param_CAM.zip $NFPLUS_FOLDER/hw/lib/xilinx/cam_v1_1_0/
# make -C $NFPLUS_FOLDER/hw/lib/xilinx/cam_v1_1_0/ update
# cp xapp1151_Param_CAM.zip $NFPLUS_FOLDER/hw/lib/xilinx/tcam_v1_1_0/
# make -C $NFPLUS_FOLDER/hw/lib/xilinx/tcam_v1_1_0/ update
Get open-nic-driver which is linux native network driver to operate open-nic shell.
$ cd $NFPLUS_FOLDER
$ git submodule update --init --recursive
Move to the NetFPGA-PLUS-dev directory and compile the hardware library.
$ cd $NFPLUS_FOLDER
$ make
Compile the project.
$ make -C $NF_DESIGN_DIR/hw
$ cd $NF_DESIGN_DIR/bitfiles
$ xsdb
$ connect
$ fpga -f <name of bitfile .bit>
$ exit
Reboot the machine (may not be required in future releases)
Compile and load the driver. If this make
failed, please make sure your version of kernel is compatible.
$ cd $NFPLUS_FOLDER/sw/driver
$ make
$ sudo insmod open-nic-driver/onic.ko
Compile the control application.
$ cd $NFPLUS_FOLDER/sw/app
$ make
To read register:
$ ./rwaxi -a <address>
To write register:
$ ./rwaxi -a <address> -w <value>