- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It's me again and I'm facing a new issue on my way trying to use OpenCL for realtime DSP on an FPGA ;)
A quick description of my setup:
I've set up a custom BSP for my Terasic DE10 Standard. I've added a Terasic THDB_ADA AD/DA converter board to my FPGA board and created a custom Qsys component to use it. The signal path looks like this
ADA Card --> Custom Qsys Block --> Avalon Dual-Clock FIFO IP Core --> Output of FIFO exposed as IO channel to CL Kernel through BoardSpecs.xml modification --> CL kernel that gets invoked over and over and simply copies blocks of samples from channel to global memory.
My host code (using the cl C++ bindings) runs this loop on a high priority thread
while (true)
{
rxTxKernel.setArg (0, rxSamplesB.getCLBuffer());
if (threadShouldExit())
break;
// let the kernel work on buffer B while the host processes buffer A
queue.enqueueTask (rxTxKernel);
currentCallback->processRFSampleBlock (rxSamplesA, txDummyBuf);
queue.finish();
// switch the buffers
rxTxKernel.setArg (0, rxSamplesA.getCLBuffer());
if (threadShouldExit())
break;
// let the kernel work on buffer A while the host processes buffer B
queue.enqueueTask (rxTxKernel);
currentCallback->processRFSampleBlock (rxSamplesB, txDummyBuf);
queue.finish();
}
The kernel currently simply copies 65536 samples from the channel to global memory.
This runs for approx 100 times successfully and then suddenly stops forever at queue.finish() (e.g. clFinish under the hood). I can then see the FIFO feeding the channel running full, as I'm displaying this via an LED on the board, so this can not be the kernel waiting because of a channel stall.
Any idea what this could be?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For your information, I managed to get a call stack from when the queue hangs, maybe this helps people with insight into the closed sources
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you attached all your .cl files and host files? I will check if this is related to a bugs for the software side.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
any update?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
sorry for the long delay, I saw that this question was not answered after coming back here after some time – thought I would have answered it. In the end I think it was an error on my side that let one of my custom I/O channels create a deadlock under some conditions, I solved it with a non-blocking channel read. However, thank you for your offer to have a look at my project
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page