Configuring the Lookup Table - 2024.2 English - XD160

Vitis Libraries

Document ID
XD160
Release Date
2024-11-29
Version
2024.2 English

There will be 2^TP_COARSE_BITS in the lookup table. Each location will contain a slope value and an offset value which represent the linear approximation of the function at the corresponding location of the domain. Lookup tables for integer data types require the slope/offset values to be obtained using the point-slope form, whereas lookup tables for floating-point types require the slope-intercept form.

For example, slope-offset values for integer types (point-slope):

slope[i] = y[i+1] - y[i]
offset[i] = y[i]

Slope-offset values for floating-point types (slope-intercept):

slope[i] = (y[i + 1] - y[i]) / (x[i + 1] - x[i])
offset[i] = y[i] - slope[i] * x[i]

The provided lookup table should be populated as below:

slope[0], offset[0], slope[1], offset[1], ... slope[2^TP_COARSE_BITS - 1], offset[2^TP_COARSE_BITS - 1]

A single lookup will require sizeof(TT_DATA) * 2 * 2^TP_COARSE_BITS bytes of memory. For performance reasons, a duplicate of the lookup is created by the func_approx graph. Configurations for AIE-ML with a data type of int16 or bfloat16 will use the AI Engine API for improved parallel lookups. However, this requires an additional duplication within each lookup table. This duplication will be done within the graph but must be accounted for when calculating the memory required for the provided lookup tables. Users must provide the lookup table, without any duplication, as a constructor argument to the graph.