Visible to Intel only — GUID: nac1542410380604
Ixiasoft
1. About this Document
2. System Requirements and Release Installation
3. Installing the OPAE Software Package
4. Identify the FPGA Interface Manager (FIM) and BMC Firmware Version
5. Running FPGA Diagnostics
6. Running the OPAE in a Non-Virtualized Environment
7. Running the OPAE in a Virtualized Environment
8. Intel® Acceleration Stack Quick Start Guide: Intel® FPGA PAC D5005 Archives
9. Document Revision History for Intel® Acceleration Stack Quick Start Guide: Intel® FPGA PAC D5005
A. Handling Graceful Thermal Shutdown
B. FPGA Device Access Permission
C. Memlock Limit
D. Troubleshooting Frequently Asked Questions (FAQ)
D.1. Why do I see a 'No Suitable slots found' message when running fpgasupdate on my AFU image?
D.2. Which environment variables are required?
D.3. What actions do I take if I see the error message 'Error enumerating resources: no driver available'?
D.4. Command lsmod | grep fpga shows no output after installing the OPAE driver. How to successfully install the OPAE driver?
D.5. Command rpm -qa | grep opae does not return the installed opae rpm package. How to successfully install the packages?
D.6. What action do I take if the Intel® FPGA PAC D5005 does not show up on the PCIe bus?
D.7. Why does the PCIe not detect the Intel® FPGA PAC D5005 card?
Visible to Intel only — GUID: nac1542410380604
Ixiasoft
6.2. Running the Hello FPGA Example
The hello_fpga sample host application uses the OPAE library to test the hardware in a native loopback (NLB) configuration. Load the FPGA with the nlb_mode_0 AFU image to run this example.
- Run the following command to load the hello_fpga sample host application:
sudo fpgasupdate $OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_0/bin/\ nlb_mode_0_unsigned.gbs
Note: The fpgasupdate tool accepts PCIE B:D.F (for example: 04:00.0) as an argument - 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"
Note: The above configuration is for a single card system. For multiple cards, set the number of 2 MB hugepages to 20*<number_of_cards>. - Change to the source code directory 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
- Change to the OPAE directory:
cd opae*
- Extract the tar file:
- Compile the example:
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
- To run the example, type the following command:
sudo ./hello_fpga
Sample output:
Running Test Running on Bus 0x3b Done Running Test
The Acceleration Stack 2.0.1 Release includes the following working AFU images in the $OPAE_PLATFORM_ROOT/hw/samples directory:
- dma_afu/bin/dma_afu_unsigned.gbs
- streaming_dma_afu/bin/streaming_dma_afu_unsigned.gbs
- hello_afu/bin/hello_afu_unsigned.gbs
- hello_intr_afu/bin/hello_intr_afu_unsigned.gbs
- hello_mem_afu/bin/hello_mem_afu_unsigned.gbs
- nlb_mode_0/bin/nlb_mode_0_unsigned.gbs
- nlb_mode_3/bin/nlb_mode_3_unsigned.gbs
- nlb_mode_0_stp/bin/nlb_mode_0_stp_unsigned.gbs
- hssi_prbs/bin/hssi_prbs_unsigned.gbs
- byte_enable/bin/byte_enable_afu_unsigned.gbs
Note: For fpgasupdate to successfully program the bitstreams, all AFU bitstreams built through the AFU development process must be processed by PACSign with or without signing keys to add appropriate headers. The bitstreams provided within the sample AFUs ($OPAE_PLATFORM_ROOT/hw/<sample afu>/bin/*_unsigned.gbs) are processed with PACSign to add an appropriate header but they are not signed with any key.
The code below shows an example AFU host code compilation and execution.
sudo fpgasupdate $OPAE_PLATFORM_ROOT/hw/samples/<afu>/bin/*_unsigned.gbs
cd $OPAE_PLATFORM_ROOT/hw/samples/<afu>/sw
make
sudo ./<executable>
For sample AFU nlb_mode_0 and nlb_mode_3, the pre-compiled executables are copied to location /usr/bin.
To execute AFU sample nlb_mode_0, type the following commands:
sudo fpgasupdate \
$OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_0/bin/*_unsigned.gbs
sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/\
hugepages-2048kB/nr_hugepages"
sudo nlb0
To execute sample nlb_mode_3, type the following commands:
sudo fpgasupdate \
$OPAE_PLATFORM_ROOT/hw/samples/nlb_mode_3/bin/*_unsigned.gbs
sudo sh -c "echo 20 > /sys/kernel/mm/hugepages/\
hugepages-2048kB/nr_hugepages"
sudo nlb3
Refer to the README file available under each <example AFU> directory for additional information.