dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 75

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
3.5.2
When this type of rounding is selected by setting the rounding bit in the OMR, one is added to the bit to the
right of the rounding point (bit 15 of A0) before the bit truncation during a rounding operation. Figure 3-16
shows the two possible cases.
Freescale Semiconductor
Case I
Before Rounding
35
Case II
Before Rounding
35
Case III
Before Rounding
35
Case IV
Before Rounding
35
*A0 is always clear; performed during RND, MPYR, and MACR
X X . . X X X X X . . . X X X 0 1 0 0 0 1 1 X X X . . . . X X X
X X . . X X X X X . . . X X X 0 1 0 0 1 1 1 0 X X . . . . X X X
X X . . X X X X X . . . X X X 0 1 0 0 1 0 0 0 . . . . . . . . 0 0 0
X X . . X X X X X . . . X X X 0 1 0 1 1 0 0 0 . . . . . . . . 0 0 0
A2
A2
A2
A2
Two’s-Complement Rounding
: If A0 < $8000 (1/2), then round down (add nothing)
32 31
32 31
32 31
32 31
: If A0 > $8000 (1/2), then round up (add 1 to A1)
: If A0 = $8000 (1/2), and the LSB of A1 = 0 (even), then round down (add nothing)
: If A0 = $8000 (1/2), and the LSB = 1 (odd), then round up (add 1 to A1)
A1
A1
A1
A1
16 15
16 15
16 15
16 15
0
0
1
1
Figure 3-15. Convergent Rounding
A0
A0
A0
A0
Data Arithmetic Logic Unit
0
0
0
0
After Rounding
35
After Rounding
35
After Rounding
35
After Rounding
35
X X . . X X X X X . . . X X X 0 1 0 0 0 0 0 . . . . . . . . . 0 0 0
X X . . X X X X X . . . X X X 0 1 0 1 0 0 0 . . . . . . . . . 0 0 0
X X . . X X X X X . . . X X X 0 1 0 0 0 0 0 . . . . . . . . . 0 0 0
X X . . X X X X X . . . X X X 0 1 1 0 0 0 0 . . . . . . . . . 0 0 0
A2
A2
A2
A2
32 31
32 31
32 31
32 31
A1
A1
A1
A1
16 15
16 15
16 15
16 15
A0*
A0*
A0*
A0*
Rounding
AA0048
0
0
0
0
3-31

Related parts for dsp56800