Altera_Forum
Honored Contributor
10 years agoIs it necessary to exit a kernel in order to transfer data to host?
Hello everyone!
I recently got my hands on an OpenCL board and so far it's been really nice to work with it. Question: I want to send regular updates up to the host and down to the kernel, while my kernel is still running (it runs in an infinite loop). For sending data up to the host, I've found that the only way is to have two "communication kernels" which take data from my "infinite loop kernel" by using channels, and write to a global memory buffer. When the buffer is full, the "communication kernel" exits, which the host can see this event and proceeds to read from the global buffer. In this time, the second "communication kernel" starts filling its own buffer. Writing to the kernel involves the host filling up a buffer, and starting a "host-to-FPGA-kernel" which passes the data to the "infinite kernel" through a channel. Is this the only way to have host to running kernel communications? It seems like a very clumsy system, but I guess it could work. Happy coding! Monstrumus