Visible to Intel only — GUID: ewa1458566469247
Ixiasoft
Product Discontinuance Notification
1. Intel® FPGA SDK for OpenCL™ Pro Edition Getting Started Guide
2. Getting Started with the Intel® FPGA SDK for OpenCL™ Pro Edition for Windows
3. Getting Started with the Intel® FPGA SDK for OpenCL™ Pro Edition for Linux
A. Intel® FPGA SDK for OpenCL™ Pro Edition Getting Started Guide Archives
B. Document Revision History of the Intel® FPGA SDK for OpenCL™ Pro Edition Getting Started Guide
2.1. Downloading the Intel® FPGA SDK for OpenCL™ Pro Edition
2.2. Installing the Intel® FPGA SDK for OpenCL™ Pro Edition
2.3. Setting the Intel® FPGA SDK for OpenCL™ Pro Edition User Environment Variables
2.4. Verifying Software Installation
2.5. Installing an FPGA Board
2.6. Verifying Host Runtime Functionality via Emulation
2.7. Creating the FPGA Hardware Configuration File of an OpenCL Kernel
2.8. Updating the Hardware Image on the FPGA
2.9. Executing an OpenCL Kernel on an FPGA
2.10. Uninstalling an FPGA Board
2.11. Uninstalling the Software
3.1. Downloading the Intel® FPGA SDK for OpenCL™ Pro Edition
3.2. Installing the Intel® FPGA SDK for OpenCL™ Pro Edition
3.3. Setting the Intel® FPGA SDK for OpenCL™ Pro Edition User Environment Variables
3.4. Verifying Software Installation
3.5. Installing an FPGA Board
3.6. Verifying Host Runtime Functionality via Emulation
3.7. Creating the FPGA Hardware Configuration File of an OpenCL Kernel
3.8. Updating the Hardware Image on the FPGA
3.9. Executing an OpenCL Kernel on an FPGA
3.10. Uninstalling an FPGA Board
3.11. Uninstalling the Software
Visible to Intel only — GUID: ewa1458566469247
Ixiasoft
2.6.4. Emulating Your OpenCL Kernel
To emulate your OpenCL™ kernel, run the emulation .aocx file on the platform on which you build your kernel.
To emulate your kernel, perform the following steps:
- To run the host application for emulation, first define the number of emulated devices by invoking the set CL_CONFIG_CPU_EMULATE_DEVICES=<number_of_devices> command and then run the host application.
This command specifies the number of identical emulation devices that the Emulator needs to provide. By default, the emulator platform provides a single emulator device. Therefore, if your host code requires only a single device, you do not need to set the CL_CONFIG_CPU_EMULATE_DEVICES environment variable. The host application for the hello_world design example only requires a single device, so you may skip setting this environment variable.Remember: When you compile the host and run for the emulator platform, only the emulated devices are available, that is, access to all physical boards is disabled.
- After you run the host application, unset the CL_CONFIG_CPU_EMULATE_DEVICES variable by invoking the set CL_CONFIG_CPU_EMULATE_DEVICES= command.
Upon successful emulation of your kernel, you should see the following output:
...
...
...
Using AOCX: hello_world.aocx
Kernel initialization is complete.
Launching the kernel...
Thread #2: Hello from Intel FPGA OpenCL Compiler!
Kernel execution is complete.
Related Information