Intel® Acceleration Stack User Guide: Intel® FPGA Programmable Acceleration Card N3000-N/2
ID
683362
Date
11/01/2021
Public
1. About this Document
2. System Requirements
3. Hardware Installation
4. Installing the OPAE Software
5. Identify the Intel® MAX® 10 BMC Version
6. Intel XL710 Driver Installation and Firmware Update
7. Updating the Retimer Firmware
8. OPAE Tools
9. Sample Test: Native Loopback
10. Configuring Ethernet Interfaces
11. Testing Network Loopback Using Data Plane Development Kit (DPDK)
12. Graceful Shutdown
13. Single Event Upset (SEU)
14. Document Revision History for Intel Acceleration Stack User Guide: Intel® FPGA PAC N3000-N/2
A. Troubleshooting
B. fpgabist Sample Output
9. Sample Test: Native Loopback
This section describes how to run a memory copy test using the Intel provided FPGA factory image and hello_fpga.c host program. The FPGA factory image includes logic to support this test and an internal register with the expected AFU UUID. The hello_fpga.c only works with an FPGA image with this AFU UUID. The acceleration logic (NLB) in the FPGA is programmed to copy CSR_NUM_LINES (cache lines) from source to destination buffer on the host system. For more information refer to the Native Loopback Accelerator Functional Unit (AFU) User Guide for Intel FPGA Programmable Acceleration Card N3000.
Make sure the hugepage is allocated:
- For CentOS:
$ sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/hugepages-2048kB/\ nr_hugepages"
- For RHEL:
# echo 20 > /proc/sys/vm/nr_hugepages
Note: Commands must be run as root.
$ cd /home/<user>/intelrtestack/sw_sample
$ gcc -o hello_fpga -std=gnu99 -rdynamic -ljson-c -luuid -lpthread \ -lopae-c -lm -Wl,-rpath -lopae-c hello_fpga.c
$ sudo ./hello_fpga
Sample output:
Running Test Running on bus 0x8a. dfh = 100000008000001f id[0] = c000c9660d824272 id[1] = 9aeffe5f84570612 dfh = 2000000080000000 id[0] = a9149a35bace01ea id[1] = ef82def7f6ec40fc dfh = 2000000080000000 id[0] = a9149a35bace01ea id[1] = ef82def7f6ec40fc dfh = 2000000080000000 id[0] = a9149a35bace01ea id[1] = ef82def7f6ec40fc dfh = 2000000080000000 id[0] = a9149a35bace01ea id[1] = ef82def7f6ec40fc dfh = 1000010080001070 id[0] = f89e433683f9040b id[1] = d8424dc4a4a3c413 Found NLB0 at offset 0x28000 Done Running Test
Note: On a multi card system, pass PCIe bus argument -B 0x<xx>