AR# 50498: Vivado HLS - Running synthesis results in pop-up window reporting "a.exe has stopped working"
Vivado HLS - Running synthesis results in pop-up window reporting "a.exe has stopped working"
A pop-up window reports "a.exe has stopped working" during code synthesis.
In general, local variables in a function in C/C++ code will be placed on the stack and could result in anout-of-memory crash when the variable is large.
One potential solution is to make the variables static or global, although this can have other implications; such as reducing the ability to pipeline a function, if it is not inline.
A more direct solution is to increase the stack size, although this requires the knowledge of exact stack size.
For debugging purposes, it is recommended that you run memory checking tools (such as valgrind) on the executable. This not only finds stack errors as described here, but also many other C/C++ usage errors that can cause unexpected results in C/C++ execution or during synthesis.