Intel® FPGA SDK for OpenCL™ Pro Edition: Custom Platform Toolkit User Guide

ID 683085
Date 3/28/2022
Public
Document Table of Contents

1.4.4. Setting Up the FPGA Client Driver

The Intel® FPGA SDK for OpenCL™ Pro Edition supports the FPGA Client Driver custom extension. The FPGA Client Driver (FCD) allows the SDK to automatically find and load the Custom Platform libraries at host run time.
Attention: To allow SDK users to use FCD, you must remove the MMD library from the linklibs element in the board_env.xml file.

Enumerating the Custom Platform FCD on Windows

Specify the Custom Platform libraries in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Intel\OpenCL\Boards. Specify the value name to be the path to the library, and specify the data to be a DWORD that is set to 0.

For example:

[HKEY_LOCAL_MACHINE\SOFTWARE\Intel\OpenCL\Boards] "c:\board_vendor a\my_board_mmd.dll"=dword:00000000

To enumerate Custom Platform FCDs on Windows, the FCD Loader scans the value in the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Intel\OpenCL\Boards. For each value in this key, the name specifies the path to a DLL and the data is a dword. If the dword data is 0, the Installable Client Driver (ICD) Loader attempts to open the corresponding DLL. If the DLL is an MMD library, then the SDK attempts to open any board that is associated with that library.

In this case, the FCD opens the library c:\board_vendor a\my_board_mmd.dll.

If the registry key specifies multiple libraries, the Loader loads the libraries in the order that they appear in the key. If there is an order dependency between the libraries available with your Custom Platform, ensure that you list the libraries accordingly in the registry key.

Enumerating the Custom Platform FCD on Linux

Enter the absolute paths of Custom Platform libraries in a .fcd file (formerly, a .acd file). Store the .fcd file in the /opt/Intel/OpenCL/Boards/ directory.

To enumerate Custom Platform FCDs on Linux, the FCD Loader scans the files with the extension .fcd in the path /opt/Intel/OpenCL/Boards/. The FCD Loader opens each .fcd file in this path as a text file. Each .fcd file should contain the absolute path to every library in the Custom Platform, one library per line. The ICD Loader attempts to open each library. If the library is an MMD library, then the SDK attempts to open any board that is associated with that library.

For example, consider the file /opt/Intel/OpenCL/Boards/PlatformA.fcd. If it contains the line /opt/PlatformA/libPlatformA_mmd.so, the FCD Loader loads the library /opt/PlatformA/libPlatformA_mmd.so.

If the .fcd file specifies multiple libraries, the Loader loads the libraries in the order that they appear in the file. If there is an order dependency between the libraries available with your Custom Platform, ensure that you list the libraries accordingly in the .fcd file.

Starting in the Intel® FPGA SDK for OpenCL™ version 16.1, FCD allows the SDK users to load multiple heterogeneous boards from different Custom Platforms and use them together in a single host application. However, this feature has limited support for legacy Custom Platforms that are released prior to 16.1.

For more information about how SDK users link their host applications to the ICD and FCD, refer to the Linking Your Host Application to the Khronos ICD Loader Library section in the Intel® FPGA SDK for OpenCL™ Pro Edition Programming Guide.