- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm new on OpenCL and Altera HLS. Do you know (and do you have any example) on how I can implement a stream application? In other words, I want that the host constantly send some data to the kernels and constantly collect the output results. Kernels should be always actives. This require a shift from the accelerator based paradigm (my understanding) imposed by OpenCL. Thanks!Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes it is possible. You will need a kernel of type task. There is some information about that in the best practices guide (https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/hb/opencl-sdk/aocl_optimization_guide.pdf). Search for "Single Work-Item Execution" and it should get you to the section highlighting the differences with an NDRange kernel. Let us know if you need more information.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the reply.
I tried and it's fine. I have two more questions: - is it possible to retrieve the number of available packets inside a pipe (or a channel)? - Is it possible to have a pipe (or channel) shared between the host and the kernel? In other words, to send data from the host to the device (or in the other sense using a second pipe/channel) in a stream way? Thanks!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1- No, Altera doesn't provide any means for that. If you are using blocking channels and try to read from an empty channel (or write to one that is full), your kernel will stall. You have to make sure the sender and receiver read and write the same number of values to avoid stalls. The behavior and usage of the channels is extensively discussed in the Programming Guide and Best Practices Guide.
2- Yes, v16.1 has beta support for host channels but it is not available publicly, you should contact Altera for that. Your BSP should also have support for such channels.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page