background image

6. Running the OPAE in a Non-Virtualized Environment

This section shows OPAE examples running directly on the Bare Metal operating

system without a virtual machine or SR-IOV. The host links to the FPGA with a single

PCIe physical function (PF).

Figure 3.

OPAE Driver in Non-Virtualized Mode

OPAE

PCIe

Host

FPGA

PF

Driver

Application

6.1. Loading the AFU Image into the FPGA

Use the 

fpgaconf

 utility to load the AFU image.

sudo fpgaconf <AFU image>

The tool also accepts PCIe Bus:Device:Function (BDF) as an additional optional
arguments if multiple cards are connected to the server. Use the help text (

-h

) for the

OPAE tools to see how additional arguments must be passed. For example: 

sudo

fpgaconf -h

.

To identify the BDF run the following command:

 lspci | grep 0b2b

Sample output:

37:00.0 Processing accelerators: Intel Corporation Device 0b2b (rev 01)

In the Sample Output, the PCIe Bus is 0x37, the Device is 0x00, and the Function is

0x0.

UG-20202 | 2019.08.05

Send Feedback

Intel Corporation. All rights reserved. Agilex, Altera, Arria, Cyclone, Enpirion, Intel, the Intel logo, MAX, Nios,

Quartus and Stratix words and logos are trademarks of Intel Corporation or its subsidiaries in the U.S. and/or

other countries. Intel warrants performance of its FPGA and semiconductor products to current specifications in

accordance with Intel's standard warranty, but reserves the right to make changes to any products and services

at any time without notice. Intel assumes no responsibility or liability arising out of the application or use of any

information,  product,  or  service  described  herein  except  as  expressly  agreed  to  in  writing  by  Intel.  Intel

customers  are  advised  to  obtain  the  latest  version  of  device  specifications  before  relying  on  any  published

information and before placing orders for products or services.

*Other names and brands may be claimed as the property of others.

ISO

9001:2015

Registered

Summary of Contents for D5005

Page 1: ...ack Quick Start Guide Intel FPGA Programmable Acceleration Card D5005 Updated for Intel Acceleration Stack for Intel Xeon CPU with FPGAs 2 0 Subscribe Send Feedback UG 20202 2019 08 05 Latest document...

Page 2: ...FPGA Diagnostics 15 6 Running the OPAE in a Non Virtualized Environment 17 6 1 Loading the AFU Image into the FPGA 17 6 2 Running the Hello FPGA Example 18 7 Running the OPAE in a Virtualized Environm...

Page 3: ...ded by Intel FPGA Interface Manager FIM Provided by Intel User Intel and Third Party Open Programmable Acceleration Engine OPAE Provided by Intel Accelerator Function AF User Intel and Third Party IP...

Page 4: ...Intel FPGA SDK for OpenCL Pro Edition Programming Guide 1 Introduction to the Intel FPGA Programmable Acceleration Card D5005 UG 20202 2019 08 05 Intel Acceleration Stack Quick Start Guide Intel FPGA...

Page 5: ...form factor pluggable QSFP interfaces Micro USB Card extender mounting bracket Card extender mounting screws 1 Refer to the Supported Server List for power cable details UG 20202 2019 08 05 Send Feedb...

Page 6: ...damaging the Intel FPGA PAC and server follow these ESD prevention guidelines Wear a grounded ESD strap during the Intel FPGA PAC installation Leave the Intel FPGA PAC in its ESD safe packaging until...

Page 7: ...SR IOV Virtualization Technology 2 Select the following options and packages during initial installation Base Environment Server with GUI Add ons Development Tools Compatibility Libraries Virtualizati...

Page 8: ...If you have admin and network access Select No If you do not have admin and network access After the installation follow the manual steps listed in section Installing the OPAE Software Package 5 Accep...

Page 9: ...for OpenCL 7 Run the initialization script to set the required environment variables QUARTUS_HOME OPAE_PLATFORM_ROOT and other OpenCL variables source home username inteldevstack init_env sh Note To...

Page 10: ...ga_mgr_mod 14693 1 intel_fpga_fme 2 Verify the OPAE library installation rpm qa grep opae Sample output opae tools extra 1 1 4 3 x86_64 opae intel fpga driver 1 1 4 3 x86_64 opae libs 1 1 4 3 x86_64 o...

Page 11: ...ng and Installing the Intel FPGA Driver and the OPAE Software Development Kit SDK Complete the following steps to install the OPAE framework 1 Install the FPGA driver a Remove any previous version of...

Page 12: ...ae devel 1 1 4 3 x86_64 4 Edit the init_env sh file to include setup_permission sh script cd OPAE_PLATFORM_ROOT Add the following command at the end of file init_env sh vim init_env sh if ls dev intel...

Page 13: ...aa2 d 1 1 4 3 1 0 12 1 0 15 2 0 Pre Beta a9f2d0f3 b398 57b0 b34f d226bf364fee 1 1 4 1 1 0 6 1 0 6 If your FIM and BMC firmware version correspond to the most recent version for Acceleration Stack 2 0...

Page 14: ...l contains BMC Firmware FW version max10_darby_revd_v1 0 12 hex BMC MAX10 RTL version max10_darby_revd_v1 0 15_cfm1_auto rpd The script execution takes few mins 2 Power cycle the Intel FPGA PAC 3 Reru...

Page 15: ...70267380 670269109 0 0 VL0_Rd_Count VL0_Wr_Count 0 0 Finished Executing NLB FPGA DIAG Tests Built in Self Test Completed 3 Configure two 1 GB hugepages for DMA AFU diagnostics sudo sh c echo 2 sys ker...

Page 16: ...one Running fpga_dma_test test PASS Bandwidth 12708 MB s Finished Executing DMA Tests Built in Self Test Completed 5 Running FPGA Diagnostics UG 20202 2019 08 05 Intel Acceleration Stack Quick Start G...

Page 17: ...the Sample Output the PCIe Bus is 0x37 the Device is 0x00 and the Function is 0x0 UG 20202 2019 08 05 Send Feedback Intel Corporation All rights reserved Agilex Altera Arria Cyclone Enpirion Intel the...

Page 18: ..._ROOT sw 4 Extract the tar file tar xf opae tar gz 5 Change to the OPAE directory cd opae 6 Compile the example gcc o hello_fpga std gnu99 rdynamic ljson c luuid lpthread lopae c lm Wl rpath lopae c O...

Page 19: ...mmands sudo fpgaconf OPAE_PLATFORM_ROOT hw samples nlb_mode_3 bin gbs sudo sh c echo 20 sys kernel mm hugepages hugepages 2048kB nr_hugepages sudo nlb3 Refer to the README file available under the exa...

Page 20: ...FU image sudo fpgaconf OPAE_PLATFORM_ROOT hw samples nlb_mode_0 bin nlb_mode_0 gbs UG 20202 2019 08 05 Send Feedback Intel Corporation All rights reserved Agilex Altera Arria Cyclone Enpirion Intel th...

Page 21: ...server_name root rd lvm lv cl_ server_name swap rhgb quiet 7 2 Configuring the VF Port on the Host By default the PF controls the AFU port The following procedure transfers AFU control to the VF Afte...

Page 22: ...endor ID and Device ID for the VF Device lspci n s 04 00 1 Sample output 04 00 1 1200 8086 0b2c 8 Bind the VF to the vfio pci driver Use the Vendor ID and Device ID from previous step sudo sh c echo 8...

Page 23: ...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 p...

Page 24: ...19 08 05 Send Feedback Intel Corporation All rights reserved Agilex Altera Arria Cyclone Enpirion Intel the Intel logo MAX Nios Quartus and Stratix words and logos are trademarks of Intel Corporation...

Page 25: ...l down the board After this configurable wait time elapses the pacd service programs the specified AFU Ensure that the AFU host application that you develop monitors for a SIGHUP signal and exits pacd...

Page 26: ...lt systemd service configuration directory typically etc sysconfig RHEL sudo cp usr bin pacd conf etc sysconfig 3 Edit the pacd service file to update EnvironmentFile entry to reflect where the pacd c...

Page 27: ...ot be initiated from a Virtual Machine Hence pacd cannot run on a Virtual Machine 8 To stop the service systemctl stop pacd service For more information about the pacd tool refer to the Open Programma...

Page 28: ...erface Manager FIM and BMC Firmware Version on page 13 B 2 How do I flash the FIM or program the AFU in a multicard system The OPAE commands fpgaflash fpgabist and fpgaconf use the PCIe bus device and...

Page 29: ...t actions do I take if I see the error message Error enumerating resources no driver available 1 Validate that your card is detected by PCIe lspci grep 0b2b If it is not detected remove the card and t...

Reviews: