Performance Pragma - 6 - 2022.1 English

Vitis HLS Messaging (UG1448)

Document ID
UG1448
Release Date
2022-06-22
Version
2022.1 English

Description

Warning: HLS 214-349] Cannot apply performance pragma target_ti=5 cycles for loop 'VITIS_LOOP_11_1' in function 'top'. The target requires a pipeline II less than the minimal achievable II of 6 determined by the number of conflicting accesses on local memory 'b_buf' (6 per iteration) (test.cpp:12:9).

Explanation

There are too many accesses to the specified local memory and this prevents an II=1 from being achieved. Consider reducing the number of accesses to the memory in one cycle or increasing the number of memory ports or consider partitioning the array to allow more parallel access.

//////////// ORIGINAL ////////////
void top(int a[1000],
    int b[10000]) {
  int j;
  int b_buf[10000];
#pragma hls bind_storage variable=b_buf type=RAM_1P impl=bram
 
  int a_buf[1000];
  memcpy(b_buf, b, sizeof(b_buf));
  for (j = 0; j < 100; j++) {
#pragma HLS performance target_ti=5
    a_buf[j] = b_buf[j] + b_buf[2 *j] + b_buf[3 *j] + b_buf[4 *j] + b_buf[5 *j] + b_buf[6 *j];
  }
  memcpy(a, a_buf, sizeof(a_buf));
}