Altera_Forum
Honored Contributor
10 years agoChannel has no point Connection
I just got a weird error when trying to build my OpenCL code with aocl:
Error Channel has no point connection: ID= in_channel_a
avm_channel_id_in_channel_a_write connection misin, or optimized away
I simplified the code down to the following, which still produces the error: # pragma OPENCL EXTENSION cl_altera_channels : enable
channel uint2 in_channel_a __attribute__((depth(1)));
channel uint2 in_channel_b __attribute__((depth(1)));
channel uint2 out_channel __attribute__((depth(1)));
__kernel void in_streamer_a(__global const uint2* in, uint n) {
for(uint i = 0; i < n; ++i) {
write_channel_altera(in_channel_a, in);
}
}
__kernel void in_streamer_b(__global const uint2* in, uint n) {
for(uint i = 0; i < n; ++i) {
write_channel_altera(in_channel_b, in);
}
}
__kernel void out_streamer_a(__global uint2* restrict out, uint n) {
for(uint i = 0; i < n; ++i) {
out = read_channel_altera(out_channel);
}
}
__kernel void simplified_worker_kernel(uint n_steps) {
for(int i = -1; i < n_steps; ++i) {
uint2 write_data;
uint2 current_a;
uint2 current_b;
current_a = read_channel_altera(in_channel_a);
current_b = read_channel_altera(in_channel_b);
write_data = current_a + current_b;
write_channel_altera(out_channel, write_data);
}
}
As far as I can tell, each channel is read at exactly one place and written to at exactly one place. The connections should be obvious. What am I missing?