In Vitis HLS, it is important to use fixed-point data types, because the behavior of the C++ simulations performed using fixed-point data types match that of the resulting hardware created by synthesis. This allows you to analyze the effects of bit-accuracy, quantization, and overflow with fast C-level simulation.
These data types manage the value of real (non-integer) numbers within the boundaries of a specified total width (W) and integer width (I) with the expression (W = I + B), as shown in the following figure.
Figure 1. Fixed-Point Data Type
Tip: In the preceding figure the
integer value (
I
) specifies the number of integer
bits to the left of the binary point, including the sign bit.