Altera_Forum
Honored Contributor
7 years agoWriting a host application that does not need to reprogram the FPGA
Hello community,
I am working on a project that requires the ability to run a host application on an OpenCL Kernel without programming the device during the execution of the host application. In other words, I would like to program the device once using:aocl program acl0 vector_add.aocx And then I would like to run the associate host program multiple times without it reprogramming the device as seen below:
Initializing OpenCL
Platform: Intel(R) FPGA SDK for OpenCL(TM)
Using 1 device(s)
de5net_a7 : Terasic's Preferred Board
Using AOCX: vector_add.aocx
Reprogramming device with handle 1
It is my understanding that clcreateprogramwithbinary(...) is the OpenCL API call that programs the device. But I am wondering if there is any way around this? Can I create a program without reprogramming the device if it is already ready programmed with the target image? If I don't make this API call, I get "CL_INVALID_PROGRAM" later on in the execution of the host application. This example uses the vector_add OpenCL design from Intel. I know that "aocl diagnose acl0" is able to write to / read from global memory (DDR on the FPGA board) without reprogramming the device, but that does not exercise the kernel. Thanks ahead of time. I am new to OpenCL, but I am very impressed with what this tool can do.