Intel Acceleration Stack Quick Start Guide for Intel® Programmable Acceleration Card with Intel® Arria® 10 GX FPGA

ID 683633
Date 12/04/2020
Document Table of Contents

8.3. Running the Hello FPGA Example on Virtual Machine

This section assumes that you have set up the Virtual Machine (VM) and connected to the virtual function (VF) device with ID 09c5. On the virtual machine, install the Intel FPGA Driver and OPAE Software. For instructions, refer to section Installing the OPAE Software Package.

Complete the following steps to test the operation of the NLB mode 0 AFU in a virtualized environment:

  1. 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-\
  2. Complete the following commands to extract the .tar file:
    tar xf $OPAE_PLATFORM_ROOT/sw/opae*.tar.gz
    cd opae*
  3. To compile, type the following command:
    gcc -o hello_fpga -std=gnu99 -rdynamic \
    -ljson-c -luuid -lpthread -lopae-c -lm -Wl,-rpath -lopae-c \
  4. Run the example:
    sudo ./hello_fpga

    Sample output:

    Running Test
    Done Running Test
    For more information about the hello_fpga sample host application, 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.