Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

AOCL Channel Usage

Altera_Forum
Honored Contributor II
1,248 Views

I'm trying to implement an LDPC decoder design in OpenCL on my PCIe385n-A7 FPGA, but in making an efficient design I've run into some issues. One of the ways I'd like to implement the code is to use OpenCL Channels to communicate between kernels. In order to do this efficiently, I would like to have one channel assigned to each work-item instance of a kernel. For example, with one of the smaller codes I have a kernel with 16 work-items and I would like to tie them to 16 channels. Initially I was not able to index dynamically into an array of channels using the global id so I used a switch case to branch off for each of the work-items as such: 

 

switch(get_global_id){ 

case 0: <data> = read_channel_altera(channels[0]);break; 

... 

However, when I attempt to compile this solution it never finishes the initial compilation stage (for the .aoco). I'm assuming this is because it's attempting to make very large multiplexers in the end as I have other kernels that do somewhat the same thing. Is there an easier way to tie a channel with a specific work-item? Or would I have to make 16 unique kernels to do this?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
230 Views

Hi, 

 

In the altera sdk for opencl programming guide, we can read this: 

 

 

--- Quote Start ---  

static indexing 

The Altera Software Development Kit (SDK) for OpenCL (AOCL) channels extension does not support dynamic indexing into arrays of channel IDs. 

--- Quote End ---  

 

 

I fear you will need another solution.
0 Kudos
Altera_Forum
Honored Contributor II
230 Views

Yes, the number of channels cannot be dynamic.  

 

Why do you need one channel per work-item? This also sounds very inefficient, because each channel will be used only partially.  

 

You can have one channel overall, and every work-item can read and write data to that channel in both producer and consumer kernels. This way you can fully utilize the channel.
0 Kudos
Reply