Performance Pragma - 7 - 2023.2 English

Vitis HLS Messaging (UG1448)

Document ID
UG1448
Release Date
2023-10-18
Version
2023.2 English

Description

Warning: [HLS 214-350] Cannot apply performance pragma target_ti=50 cycles for loop 'VITIS_LOOP_13_1' in function 'top'. The target requires a pipeline II less than the minimal achievable II of 1 determined by the number of calls on function 'func(int)' with allocation pragma (test.cpp:14:9) (1 per iteration). Please relax the allocation limitation (test.cpp:15:9).

Explanation

The target of 50 cycles cannot be achieved as an II of less than 1 is required to achieve this goal. Consider increasing the number of cycles required to achieve the target transaction interval.

//////////// ORIGINAL ////////////
#include<math.h>
#include<string.h>
int func(int a) {
#pragma HLS inline off
  return pow(2, a);
}
void top(int a[1000],
    int b[1000]) {
  int j;
  int b_buf[1000];
  int a_buf[1000];
  memcpy(b_buf, b, sizeof(b_buf));
  for (j = 0; j < 100; j++) {
#pragma HLS allocation function instances=func limit=1
#pragma HLS performance target_ti=50
    a_buf[j] = func(b_buf[j]);
  }
  memcpy(a, a_buf, sizeof(a_buf));
}