Visible to Intel only — GUID: baa1522448299608
Ixiasoft
1. About This Document
2. Introduction
3. Getting Started
4. Installing the OPAE Software Package
5. Identifying the Flash Image and BMC Firmware
6. Running FPGA Diagnostics
7. Running the OPAE in a Non-Virtualized Environment
8. Running the OPAE in a Virtualized Environment
9. Intel® Acceleration Stack Quick Start Guide for Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA Archives
10. Document Revision History for Intel® Acceleration Stack Quick Start Guide for Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA
A. Updating the FIM and BMC Firmware
B. Handling Graceful Thermal Shutdown
C. FPGA Device Access Permission
D. Memlock Limit
E. Hugepage Settings
F. Troubleshooting Frequently Asked Questions (FAQ)
G. Documentation Available for the Intel® Acceleration Stack for Intel® Xeon® CPU with FPGAs 1.2.1 Release
F.1. Why do I see a 'No Suitable slots found' message when running fpgaconf on my AFU image?
F.2. How do I flash the FIM or program the AFU in a multicard system?
F.3. Which environment variables are required?
F.4. What actions do I take if I see the error message 'Error enumerating resources: no driver available'?
F.5. Troubleshooting OPAE Installation on RHEL
Visible to Intel only — GUID: baa1522448299608
Ixiasoft
7.2.1. Running the Hello FPGA Example
The hello_fpga sample host application uses the OPAE library to test the hardware in native loopback mode (NLB). Load the FPGA with the nlb_mode_0 AFU image to run this example.
Run the following commands to test the hello_fpga sample host application:
- Run the following command to load the AFU image:
sudo fpgasupdate $OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_0/bin/\ nlb_mode_0_unsigned.gbs
- Configure the system hugepages to allocate 20, 2 MB hugepages that this utility requires. This command requires root privileges:
sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/\ hugepages-2048kB/nr_hugepages"
- Compile the source code for hello_fpga located at $OPAE_PLATFORM_ROOT/sw/opae*/samples/hello_fpga.c:
cd $OPAE_PLATFORM_ROOT/sw
- Extract the tar file:
tar xf opae*.tar.gz
Note: This step is only necessary if you installed the OPAE software from binaries. For more information, refer to section Installing the OPAE Software from Prebuilt Binaries. - Move to the OPAE directory:
cd opae*
- Compile the example:
RHEL:
gcc -o hello_fpga -std=gnu99 -rdynamic \ -ljson-c -luuid -lpthread -lopae-c -lm -Wl,-rpath \ -lopae-c $OPAE_PLATFORM_ROOT/sw/opae*/samples/hello_fpga.c
Ubuntu:gcc -o hello_fpga -std=gnu99 -rdynamic \ -ljson-c -luuid -lpthread -lopae-c -lm -Wl,--no-as-needed \ -lopae-c -luuid $OPAE_PLATFORM_ROOT/sw/opae*/samples/hello_fpga.c
- To run the example, type the following command:
Option Description For the OPAE RPM installation: sudo ./hello_fpga
For an OPAE installation from source: sudo LD_LIBRARY_PATH=\ $LD_LIBRARY_PATH:/<path to opae install>/\ lib64 ./hello_fpga
Sample output:
Running Test Done Running Test
For more information about the hello_fpga example, refer to the following files:- Source code located at $OPAE_PLATFORM_ROOT/sw/opae*/samples/hello_fpga.c
- Native Loopback Accelerator Functional Unit (AFU) User Guide for AFU register descriptions.
Related Information