Simulate Your Kernel
- Set theCL_CONTEXT_MPSIM_DEVICE_INTELFPGAenvironment variable to enable the simulation device:
When 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:
- Linuxexport CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1
- Windowsset CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=1
You might need to setCL_CONTEXT_COMPILER_MODE_INTELFPGA=3if the host program cannot find the simulator device.
- Linuxunset CL_CONTEXT_MPSIM_DEVICE_INTELFPGA
- Windowsset CL_CONTEXT_MPSIM_DEVICE_INTELFPGA=
- 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 the Questa*-Intel FPGA Edition software as your host code executes. Thevsim.wlffile is written to the same directory from where you ran your host program.