Additional Details - 2022.1 English

Vitis Model Composer Tutorial (UG1498)

Document ID
UG1498
Release Date
2022-07-25
Version
2022.1 English
In the example above, we only specified the Word Length and Fractional Length of the fixed point data types using data type expressions. However, for greater control over the fixed point types in your design, you can also specify the Signedness, Rounding, and Overflow. In general the format used for specifying fixed point data types using the data type expression is
x_[u/s]fix[wl]_En[fl]_[r<round>w<overflow>]
u
Unsigned
s
Signed
wl
Word length
fl
Fractional length
<round>: Specify the corresponding index from the following table. This is optional. If not specified, the default value is 6 (Truncation to minus infinity). Note that for the rounding cases (1 to 5), the data is rounded to the nearest value that can be represented in the format. When there is a need for a tie breaker, these particular roundings behave as specified in the Meaning column.
Table 1. Rounding Index
Index Meaning
1 Round to Plus Infinity
2 Round to Zero
3 Round to Minus Infinity
4 Round to Infinity
5 Convergent Rounding
6 Truncation to Minus Infinity
7 Truncation to Zero
<overflow>: Specify the corresponding index from table below. It's optional. If not specified, default value is 4 (Wrap around).
Table 2. Overflow Index
Index Meaning
1 Saturation
2 Saturation to Zero
3 Symmetrical Saturation
4 Wrap Around
5 Sign-Magnitude Wrap Around

Example: x_ufix8_En6_r6w4 represents a fixed point data type with:

Signedness
Unsigned
Word Length
8
Fractional Length
6
Rounding Mode
Truncation to Minus Infinity
Overflow Mode
Wrap Around