Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- I don't think multiple threads can access the same FPGA simultaneously. Altera's implementation seems to use some locking mechanism that when one thread/process accesses a device, it is locked to prevent other threads/processes from accessing it. You can use multiple queues with one thread/process to run multiple kernels on the same FPGA simultaneously (as long as all kernels were in the same .cl file); you don't need multiple threads in the host code to achieve this. --- Quote End --- I have used multiple queues in my code. But when I profile my kernel, I find FPGA is unoccupied about about 4ms between multiple kernel execution, and my kernel execute time is about 0.5ms. So I think if use multiple thread in the host can solve this problem? I reference Altera “multithread_vector_operation” sample code to use multiple thread. But I run the code in my FPGA, it also shows the same error. https://alteraforum.com/forum/attachment.php?attachmentid=13634&stc=1