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 \
$OPAE_PLATFORM_ROOT/sw/opae*/samples/hello_fpga.c
4. Run the example:
sudo ./hello_fpga
Sample output:
Running Test
Done Running Test
7.4. Disconnecting the VF from the VM and Reconnecting to the PF
1. Uninstall the driver on the VM:
yum remove opae-intel-fpga-driver.x86_64
2. Detach the VF from the VM.
On the host machine, unbind the VF PCI device from the vfio-pci driver:
sudo sh -c "echo -n 0000:04:00.1 > /sys/bus/pci/drivers/vfio-pci/unbind"
3. Bind the VF to the intel-fpga driver:
sudo sh -c "echo -n 0000:04:00.1 > \
/sys/bus/pci/drivers/intel-fpga-pci/bind"
4. To ensure you have the correct
$pci_path
for disconnection, type:
export port_path=$(find /sys/class/fpga/intel-fpga-dev.* \
-maxdepth 1 -follow -iname intel-fpga-port.*)
export link_path=$(readlink -m /$port_path/../)
export pci_path=$link_path/../../
5. Set to 0 VFs and disable SR-IOV:
sudo sh -c "echo 0 > $pci_path/sriov_numvfs"
6. Assign the port to PF using fpgaport tool:
sudo fpgaport assign /dev/intel-fpga-fme.* 0
7. Running the OPAE in a Virtualized Environment
UG-20202 | 2019.08.05
Intel Acceleration Stack Quick Start Guide: Intel FPGA Programmable
Acceleration Card D5005
23