Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15554 Discussions

concurrent host and device memory accesses

Honored Contributor II

I'm attempting to implement a design where I'd like the host to be able to perform memory reads while the kernel is running. Essentially I have a continuous data stream coming from a channel sourced by my boards 10GBE interface. The data is processed via a number of computational kernels before being written to global memory. The post processed data needs to made available to the host without ever stopping the active kernels. Does Altera's OpenCL framework support this type of operation?

0 Kudos
1 Reply
Honored Contributor II

If your board supports host channels (which have been supported in Altera's reference board since v17.1), you can use that. If not, considering the fact that OpenCL only guarantees global memory consistency after full kernel execution, there is no way to know when the data in the FPGA external memory is valid during kernel execution to read it on the host. However, you might be able to get it to work by having two buffers on the FPGA external memory, and a separate kernel writing to each. In this case, you will first write the processed data to buffer A, switch to buffer B while the host is reading from buffer A, then switch back to buffer A when the host is reading from buffer B, and so on. Essentially, double-buffering. Though this will not guarantee uninterrupted processing and hence, you will need a back pressure mechanism for the network connection (there will never be any guarantee for uninterrupted processing, even with host channels; hence, you will need back pressure anyway).