Intel® FPGA SDK for OpenCL™ Standard Edition: Programming Guide

ID 683342
Date 4/22/2019
Public
Document Table of Contents

8.2. Compiling a Kernel for Emulation (-march=emulator)

To compile an OpenCL™ kernel for emulation, include the -march=emulator option in your aoc command.
  • Before you perform kernel emulation, perform the following tasks:
    • Install a Custom Platform from your board vendor for your FPGA accelerator boards.
    • Verify that the environment variable QUARTUS_ROOTDIR_OVERRIDE points to the Intel® Quartus® Prime Standard Edition software installation directory.
  • To emulate your kernels on Windows systems, you need the Microsoft linker and additional compilation time libraries. Verify that the PATH environment variable setting includes all the paths described in the Setting the Intel® FPGA SDK for OpenCL™ Standard Edition User Environment Variables (Windows) section of the Intel® FPGA SDK for OpenCL™ Standard Edition Getting Started Guide.

    The PATH environment variable setting must include the path to the LINK.EXE file in Microsoft Visual Studio.

  • Ensure that your LIB environment variable setting includes the path to the Microsoft compilation time libraries.

    The compilation time libraries are available with Microsoft Visual Studio.

  • Verify that the LD_LIBRARY_PATH environment variable setting includes all the paths described in the Setting the Intel® FPGA SDK for OpenCL™ Standard Edition User Environment Variables (Linux) section in the Intel® FPGA SDK for OpenCL™ Standard Edition Getting Started Guide.
  • To create kernel programs that are executable on x86-64 host systems, invoke the aoc -march=emulator <your_kernel_filename>.cl command.
  • To compile a kernel for emulation that targets a specific board, invoke the aoc -march=emulator -board=<board_name> <your_kernel_filename>.cl command.
  • For Linux systems, the Intel® FPGA SDK for OpenCL™ Offline Compiler offers symbolic debug support for the debugger.
    The offline compiler's debug support allows you to pinpoint the origins of functional errors in your kernel source code.