The following table shows the quantization and overflow modes.
Identifier | Description | |
---|---|---|
W | Word length in bits | |
I |
The number of bits used to represent the integer value, that is, the number of integer bits to the left of the binary point, including the sign bit. When I is negative, as shown in the example below, it represents the number of implicit sign bits (for signed representation), or the number of implicit zero bits (for unsigned representation) to the right of the binary point. For example,
|
|
Q | Quantization mode: This dictates the behavior when greater precision is generated than can be defined by smallest fractional bit in the variable used to store the result. | |
ap_fixed Types | Description | |
AP_RND | Round to plus infinity | |
AP_RND_ZERO | Round to zero | |
AP_RND_MIN_INF | Round to minus infinity | |
AP_RND_INF | Round to infinity | |
AP_RND_CONV | Convergent rounding | |
AP_TRN | Truncation to minus infinity (default) | |
AP_TRN_ZERO | Truncation to zero | |
O |
Overflow mode: This dictates the behavior when the result of an operation exceeds the maximum (or minimum in the case of negative numbers) possible value that can be stored in the variable used to store the result. |
|
ap_fixed Types | Description | |
AP_SAT 1 | Saturation | |
AP_SAT_ZERO 1 | Saturation to zero | |
AP_SAT_SYM 1 | Symmetrical saturation | |
AP_WRAP | Wrap around (default) | |
AP_WRAP_SM | Sign magnitude wrap around | |
N | This defines the number of saturation bits in overflow wrap modes. | |
|