kiiii
New Contributor
5 years agoIntel HLS 18.1 C++/RTL result does not match
Hi,
I am having this simple C++ program that is triggering different C++ and RTL simulation result. I called build.bat test-x86-64 to generate the C++ executable, and build.bat test-fpga to generate the RTL executable. The C++ result is B, whereas the RTL simulation result is 0. I am not really sure what is causing the difference here. Any idea would be helpful! Thanks!
#include <stdint.h> #include <stdio.h> static volatile int32_t a[6][1][7] = {{{0L,1,2,3,4,0L,1}},{{1,(-3L),(-1L),1,1L,6L,(-3L)}},{{1,0L,0L,1,0L,0L,2}}, {{0L,(-3L),1,0L,1,0L,0L}},{{8,1,6L,(-3L),(-3L),6L,1}},{{(-3L),1,1,1,1,0L,1}}}; /* ---------------------------------------- */ component unsigned int result() { int i, j, k; a[5][0][0] = 1; a[5][0][0] = a[5][0][0]; a[5][0][0] = 1; a[5][0][0] = a[5][0][0]; unsigned int tmp = 1; for (i = 0; i < 6; i++) { for (j = 0; j < 1; j++) { for (k = 0; k < 7; k++) { tmp ^=a[i][j][k]; } } } return tmp; } int main(void) { unsigned int resultOut = result(); printf("%X\n", resultOut); return 0; }