Burst Inference Failure 12 - 2022.2 English

Vitis HLS Messaging (UG1448)

Document ID
UG1448
Release Date
2022-12-16
Version
2022.2 English

Description

Warning: [214-234] Sequential access on name. Length is not divisible by 2 (DebugLoc).
Name
Name of array

Explanation

Burst widening works best if the total number of accesses is divisible by 2. Consider adjusting the number of accesses to be always even.

For variable length of accesses, use __builtin_assume or assert statements to give hints to the widening algorithm.

Examples

  • Constant number of accesses:
    //////////// ORIGINAL ////////////
    void foo(int *a) {
      int buff[9];
      for (long i = 0; i < 10; ++i)
        buff[i] = a[i];
      ...
    }
     
    //////////// UPDATED ////////////
    // Change number of accesses from 11 to 12
    void foo(int *a) {
      int buff[10];
      for (long i = 0; i < 11; ++i)
        buff[i] = a[i];
      ...
    }
  • Variable number of accesses:
    //////////// ORIGINAL ////////////
    void foo(int *a, int n) {
      for (long i = 0; i < n; ++i)
        ... = a[i];
    }
     
    //////////// UPDATED ////////////////////////////
    // Use __builtin_assume/assert to guide widening.
    void foo(int *a, int n) {
      assert(n % 8 == 0);
      for (long i = 0; i < n; ++i)
        ... = a[i];
    }