English
Language : 

EP2AGX95EF29C6N Datasheet, PDF (104/380 Pages) Altera Corporation – Device Interfaces and Integration
4–28
Chapter 4: DSP Blocks in Arria II Devices
Arria II Operational Mode Descriptions
Rounding and Saturation Mode
Rounding and saturation functions are often required in DSP arithmetic. Rounding is
to limit bit growth and its side effects; saturation is to reduce overflow and underflow
side effects.
Two rounding modes are supported in Arria II devices:
■ Round-to-nearest-integer mode
■ Round-to-nearest-even mode
You must select one of the two options at compile time.
The round-to-nearest-integer provides the biased rounding support and is the
simplest form of rounding commonly used in DSP arithmetic. The
round-to-nearest-even mode provides unbiased rounding support and is used where
DC offsets are a concern. Table 4–6 lists an example of how round-to-nearest-even
mode. Examples of the difference between the two modes are shown in Table 4–7. In
this example, a 6-bit input is rounded to 4 bits. You can observe from Table 4–7 that
the main difference between the two rounding options is when the residue bits are
exactly half way between its nearest two integers and the LSB is zero (even).
Table 4–6. Example of Round-To-Nearest-Even Mode
6- to 4-bits Rounding
010111
001101
001010
001110
110111
101101
110110
110010
Odd/Even (Integer)
×
×
Even (0010)
Odd (0011)
×
×
Odd (1101)
Even (1100)
Fractional
> 0.5 (11)
< 0.5 (01)
= 0.5 (10)
= 0.5 (10)
> 0.5 (11)
< 0.5 (01)
= 0.5 (10)
= 0.5 (10)
Add to Integer
1
0
0
1
1
0
1
0
Result
0110
0011
0010
0100
1110
1011
1110
1100
Table 4–7. Comparison of Round-to-Nearest-Integer and Round-to-Nearest-Even
Round-To-Nearest-Integer
010111 ➱ 0110
001101 ➱ 0011
001010 ➱ 0011
001110 ➱ 0100
110111 ➱ 1110
101101 ➱ 1011
110110 ➱ 1110
110010 ➱ 1101
Round-To-Nearest-Even
010111 ➱ 0110
001101 ➱ 0011
001010 ➱ 0010
001110 ➱ 0100
110111 ➱ 1110
101101 ➱ 1011
110110 ➱ 1110
110010 ➱ 1100
Arria II Device Handbook Volume 1: Device Interfaces and Integration
December 2010 Altera Corporation