Intel Software: Intel FPGA SDK for OpenCL, Quartus Prime Pro, Quartus Prime Standard

Type: Answers, KDB Area

Area: Embedded, OpenCL

Last Modified: Wed Jan 23 2019 07:31:00 GMT-0800
Version Found: v18.1
Bug ID: 1408727648

Why does a stack dump occur during an OpenCL™ kernel compile if the loop count exceeds the number of channels allocated?


A stack dump may occur during an OpenCL™ compile if a loop contains a write to an indexed channel and the loop count exceeds the number of channels allocated.  See example code below.

channel unsigned char  my_channel[16] __attribute__((depth(1024)));
char data[32];

    for (unsigned char i = 0; i < 32; i++) {
        write_channel_intel(my_channel[i], data[i]);




Be sure that the loop count never exceeds the number of channels allocated.


#define num_channels 32

channel unsigned char  my_channel[num_channels] __attribute__((depth(1024)));
char data[num_channels];

    for (unsigned char i = 0; i < num_channels; i++) {
        write_channel_intel(my_channel[i], data[i]);



Error reporting for this issue is scheduled to be added in a future version of the Intel® FPGA SDK for OpenCL™ compiler.