Performance Pragma - 8
Description
WARNING: [HLS 214-351] May not meet
performance pragma for loop 'VITIS_LOOP_8_2' in function 'top' due to loop carried
dependence on variable 'b_buf' (t.cpp:9:9).
Explanation
Please resolve the identified loop carried dependency or apply 'dependence inter false' pragma if these are false dependencies that can be ignored.
//////////// ORIGINAL ////////////
#include<string.h>
void top(int a[1024], int b[10]) {
int b_buf[10];
int a_buf[1024];
memcpy(b_buf, b, sizeof(int) *10);
memcpy(a_buf, a, sizeof(int) * 1024);
for (int i = 0; i < 1024; ++i) {
for (int j = 0; j < 100; ++j) {
#pragma HLS performance target_ti=100
b_buf[j%10] += a_buf[i];
}
}
memcpy(b, b_buf, sizeof(int) *10);
}