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

ID 683846
Date 3/28/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

11.1.7.1. Compiling a Library for Simulation (-march=simulator)

To compile an OpenCL™ library for simulation, include the -march=simulator option in your aoc command. To enable collecting the waveform during the simulation, include the -ghdl option in your aoc command. Use the optional <depth> attribute with the -ghdl option as -ghdl[=<depth>] to specify how many levels of hierarchy are logged. If you do not specify a value for the <depth> attribute, all waveform signals are logged.
  • Before you perform library simulation, 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 Intel® Quartus® Prime Pro Edition software installation folder.
  • To simulate library 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™ Pro Edition User Environment Variables section of the Intel® FPGA SDK for OpenCL™ Pro 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™ Pro Edition User Environment Variables section in the Intel® FPGA SDK for OpenCL™ Pro Edition Getting Started Guide.
  • To compile a simulation that targets a specific board, invoke the aoc -march=simulator -ghdl -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 debug support allows you to pinpoint the origins of functional errors in your kernel source code.