Altera_Forum
Honored Contributor
11 years agoAOCL Channel Usage
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?