Intel® FPGA SDK for OpenCL™ Pro Edition: Programming Guide
Visible to Intel only — GUID: ewa1399503956920
Ixiasoft
Visible to Intel only — GUID: ewa1399503956920
Ixiasoft
8. Emulating and Debugging Your OpenCL Kernel
The Intel® FPGA SDK for OpenCL™ Emulator generates a .aocx file that executes on x86-64 Windows or Linux host. This feature allows you to emulate the functionality of your kernel and iterate on your design without executing it on the actual FPGA each time. For Linux platform, you can also use the Emulator to perform functional debug.
- Setting up the Emulator
If you installed the Intel® FPGA SDK for OpenCL™ Pro edition with administrator privileges, no additional setup is needed. If you did not install the Intel® FPGA SDK for OpenCL™ with administrator privileges, you must perform some additional steps to enable the emulator. - Modifying Channels Kernel Code for Emulation
To emulate applications with a channel that reads or writes to an I/O channel, modify your kernel to add a read or write channel that replaces the I/O channel, and make the source code that uses it is conditional. - Compiling a Kernel for Emulation (-march=emulator)
To compile an OpenCL™ kernel for emulation, include the -march=emulator option in your aoc command. - Emulating Your OpenCL Kernel
To emulate your OpenCL™ kernel, run the emulation .aocx file on the platform on which you built your kernel. The OpenCL Emulator uses a different OpenCL platform than when targeting FPGA hardware. - Debugging Your OpenCL Kernel on Linux
For Linux systems, you can direct the Intel® FPGA SDK for OpenCL™ Emulator to run your OpenCL kernel in the debugger and debug it functionally as part of the host application. - Limitations of the Intel FPGA SDK for OpenCL Emulator
The Intel® FPGA SDK for OpenCL™ Emulator feature has some limitations. - Discrepancies in Hardware and Emulator Results
When you emulate a kernel, your OpenCL system might produce results different from that of the kernel compiled for hardware. You can further debug your kernel before you compile for hardware by running your kernel through simulation. - Emulator Environment Variables
Several environment variables are available to modify the behavior of the emulator. - Extensions Supported by the Emulator
The emulator offers varying levels of support for different OpenCL extensions. - Emulator Known Issues
A few known issues might affect your use of the emulator. Review these issues to avoid possible problems when using the emulator.