仅对英特尔可见 — GUID: mwh1391807306172
Ixiasoft
1. Intel® FPGA RTE for OpenCL™ Pro Edition入门指南
2. Intel® FPGA RTE for OpenCL™ Pro Edition for 64-Bit Windows入门
3. Intel® FPGA RTE for OpenCL™ Pro Edition for x86_64 Linux Systems入门
4. Intel® FPGA RTE for OpenCL™ Pro Edition for Intel® ARMv7-A SoC FPGA入门
A. Intel® FPGA RTE for OpenCL™ Pro Edition入门指南存档
B. Intel® FPGA RTE for OpenCL™ Pro Edition入门指南文档修订历史
4.1.1. 下载 Intel® FPGA SDK for OpenCL and the SoC EDS
4.1.2. 安装 Intel® FPGA SDK for OpenCL Pro Edition for SoC FPGA
4.1.3. 安装 Intel® SoC FPGA Embedded Development Suite Pro Edition
4.1.4. 重新编译Linux Kernel Driver
4.1.5. 在SoC FPGA板级上安装Intel FPGA RTE for OpenCL Pro Edition
4.1.6. 安装 Intel® Arria® 10 SoC Development Kit
4.1.7. 在SoC FPGA上执行OpenCL Kernel
4.1.8. 卸载 Intel® FPGA RTE for OpenCL™
4.2.1. 下载 Intel® FPGA SDK for OpenCL™和SoC EDS
4.2.2. 安装 Intel® FPGA SDK for OpenCL Pro Edition for SoC FPGA
4.2.3. 安装 Intel® SoC FPGA Embedded Development Suite Pro Edition
4.2.4. 重新编译Linux Kernel Driver
4.2.5. 在SoC FPGA板级上安装Intel FPGA RTE for OpenCL Pro Edition
4.2.6. 安装 Intel® Arria® 10 SoC Development Kit
4.2.7. 在SoC FPGA上执行OpenCL Kernel
4.2.8. 卸载 Intel® FPGA RTE for OpenCL™
仅对英特尔可见 — GUID: mwh1391807306172
Ixiasoft
2.7.1. 构建主机应用程序
<local_path_to exm_opencl_hello_world>\hello_world\hello_world.sln文件包含主机解决方案。在Microsoft Visual Studio中打开此.sln文件后,您可以在main.cpp文件中构建OpenCL™主机应用程序。
如果您使用Microsoft Visual Studio,那么您需要FCD和Khronos提供的Installable Client Driver (ICD)。ICD驱动程序将主机链接到OpenCL.dll,这需要安装FPGA Client Driver (FCD)。关于安装FCD,请参考安装FPGA板级。
要使用FCD和ICD设置Microsoft Visual Studio,需要在构建主机应用程序前执行以下任务:
- 使用 aocl diagnose -icd-only 命令来验证是否正确设置了FCD和ICD。如果FCD和ICD都被正确地安装,那么您应该会看到以下输出:
ICD System Diagnostics -------------------------------------------------------------------- Using the following location for ICD installation: HKEY_LOCAL_MACHINE\Software\Khronos\OpenCL\Vendors Found 1 icd entry at that location: <INTELFPGAOCLSDKROOT>\windows64\bin\alteracl_icd.dll REG_DWORD 0x0 Checking validity of found icd entries: <INTELFPGAOCLSDKROOT>\windows64\bin\alteracl_icd.dll REG_DWORD 0x0 is correctly registered on the system Using the following location for fcd installations: HKEY_LOCAL_MACHINE\Software\Intel\OpenCL\Boards Found 1 fcd entry at that location: <path_to_OpenCL_BSP>\a10_ref\windows64\bin\altera_a10_ref_mmd.dll REG_DWORD 0x0 Checking validity of found fcd entries: <path_to_OpenCL_bsp>\a10_ref\windows64\bin\altera_a10_ref_mmd.dll REG_DWORD 0x0 is correctly registered on the system Number of Platforms = 1 1. Intel(R) FPGA SDK for OpenCL(TM) | Intel(R) Corporation | OpenCL 1.0 Intel(R) FPGA SDK for OpenCL(TM), Version <version_number> -------------------------------------------------------------------- ICD diagnostics PASSED --------------------------------------------------------------------
- 如果FCD和ICD都没有被正确设置,那么请参考安装FPGA板级来了解FCD设置,参考Intel FPGA SDK for OpenCL Pro Edition Programming Guide的Accessing Custom Platform-Specific Functions和Linking Your Host Application to the Khronos ICD Loader Library部分来了解更多信息。
- 将主机应用程序链接到OpenCL.lib库。
- 在Solution下,右击主机应用程序名称并选择Properties,然后选择Configuration Properties > Linker > Input。
- 在Additional Dependencies域中,输入OpenCL.lib。
注意: 由于您使用FCD和ICD,所以请不要将主机程序链接到alteracl.lib或者直接链接到Custom Platform的MMD库。
请执行以下任务来构建hello_world主机应用程序:
- 在Microsoft Visual Studio中打开 <local_path_to_exm_opencl_hello_world>\hello_world\hello_world.sln文件。
- 验证构建配置是否正确。默认的构建配置是Debug,但您可以使用Release。您必须选择与解决方案平台匹配的选项(例如,对于x64架构,选择x64)。
- 通过选择Build > Build Solution菜单选项或者按下F7键来构建解决方案。
hello_world.exe可执行文件位于 <local_path_to_exm_opencl_hello_world>\hello_world\bin文件夹中。
- 验证构建是否正确。一个以类似于下图所示消息为结尾的输出通知您构建成功:
1> Build succeeded. 1> 1> Time Elapsed 00:00:03:29 ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
注意: 您可以忽略LNK4009: PDB 'vc90.pdb' was not found with...警告消息,因为它们对构建没有影响。如果您使用以前版本的Microsoft Visual Studio构建了Windows库,那么编译器可能会发出此类警告消息。