We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 51143

Vivado HLS - Vivado HLS reports a crash through a popup window with "a.exe has stopped working."


Vivado HLS reports a crash through a popup window with "a.exe has stopped working."


If the C or C++ code has large local variables in a function, they will be placed on the stack. This could potentially result in an out of memory problem. There are a couple potential solutions.

  1. Place the variable in heap instead of array. For example, make the variable static or global if possible. However, note this solution may result in potential performance hit.
  2. Increase stack size.
  3. Use dynamic allocation to simulate the C and use the array to synthesize.
    • Example:
    • #ifndef __SYNTHESIS__
      // Dynamically allocate large arrays when compiling software
      ARRAY_2D_MALLOC(buff_A, unsigned char, 3, MAX_WIDTH);
      // Ensure allocation succeeded
      if (!buff_A ) {
      printf("ERROR: Unable to allocate line-buffer storage in function: sobel_filter()\n");
      // For HLS all internal storage for the HW block must be statically allocated
      unsigned char buff_A[3][MAX_WIDTH];

In general, running memory checking tools such as valgrind on the executable will help in debugging stack errors and other synthesis errors.

AR# 51143
Date 08/07/2012
Status Active
Type Solution Center
  • AutoESL
  • AutoESL - 2012.1
  • AutoESL - 2011.4.2
  • More
  • AutoESL - 2011.4
  • Vivado - 2012.2
  • Less
Page Bookmarked