Forum Discussion
Altera_Forum
Honored Contributor
8 years agoFrom my experiments it is the "clCreateProgramWithBinary()" function that reconfigures the FPGA. You will have to call that function and every other function that comes after that (clBuildProgram(), clCreateKernel(), clEnqueueNDRangeKernel(), etc.) every time you want to switch to another kernel that resides in another FPGA image. You do not need to create new queues, though; you can reuse the same queue.
Please note that since FPGA reconfiguration can take up to a few seconds, unless your kernels have a long run time and you rarely switch between them, the overhead of FPGA reconfiguration could actually be higher than kernel run time and you might as well put all your kernels in the same FPGA image so that you do not need to reconfigure the FPGA between kernel runs.