Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
9 years ago

stream applications

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!

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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!
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.