Article ID: 000073897 Content Type: Troubleshooting Last Reviewed: 08/16/2023

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

Environment

  • Intel® Quartus® Prime Pro Edition
  • Intel® Quartus® Prime Standard Edition
  • Intel® FPGA SDK for OpenCL™ Pro Edition
  • BUILT IN - ARTICLE INTRO SECOND COMPONENT
    Description

    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 the 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]);

        }

      

     

    Resolution

    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]);

        }

    This problem is fixed beginning with version 19.1 of the Intel® FPGA SDK for OpenCL™ compiler.

     

    Related Products

    This article applies to 1 products

    Intel® Programmable Devices