Simulate Your Kernel (Beta)
- Set theCL_CONTEXT_MPSIM_DEVICE_INTELFPGAenvironment variable to enable the simulation device:export CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1When the environment variableCL_CONTEXT_MPSIM_DEVICE_INTELFPGAis 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_INTELFPGAYou might need to setCL_CONTEXT_COMPILER_MODE_INTELFPGA=3if the host program cannot find the simulator device.
- 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-Xsghdlflag, 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. Thevsim.wlffile is written to the same directory from which you ran your host program.