Programming Guide

Contents

Simulate Your Kernel (Beta)

If you want to use the simulation flow (Beta) and view the waveforms generated during simulation, you must have either the Siemens EDA* Questa Simulator or ModelSim SE installed and available.
To run your DPC++ library through the simulator:
  1. Set the
    CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
    environment variable to enable the simulation device:
    export CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1
    When the environment variable
    CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
    is set, only the simulation devices are available. That is, access to physical boards is disabled. To unset the environment variable, run the following command:
    unset CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
    You might need to set
    CL_CONTEXT_COMPILER_MODE_INTELFPGA=3
    if the host program cannot find the simulator device.
  2. Run your host program. On Linux systems, you can use GDB or Eclipse to debug your host. If necessary, you can inspect the simulation waveforms for your kernel code to verify the functionality of the generated hardware.
    If you compiled with the
    -Xsghdl
    flag, running your compiled program produces a waveform file,
    vsim.wlf
    , that you can view in Questa*-Intel FPGA Edition software as your host code executes. The
    vsim.wlf
    file is written to the same directory from which you ran your host program.

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.