dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 193

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Table 5-5 shows four sets of results when four different values are substituted for the placeholder
“#VALUE” in Example 5-32 and Example 5-33 on page 5-47. The two algorithms give different results in
one of the four cases.
Freescale Semiconductor
$1234:C397
Value to be
$1234:0397
$1234:8000
$1235:8000
Rounded
MOVE.L
BFCLR
NOP
NOP
RND
Convergent
$1235:0000
$1234:0000
$1234:0000
$1236:0000
Rounding
Example 5-33. Example Code for Convergent Rounding
Result
#VALUE,A
#$0020,OMR
A
Table 5-5. Rounding Results for Different Values
Two’s-Complement
Data Arithmetic Logic Unit
Rounding Result
; Load A Accumulator
; Clear the R bit for convergent rounding
; (2 cycles required for R bit to be valid)
; (2 cycles required for R bit to be valid)
; Round A accumulator
$1234:0000
$1235:0000
$1235:0000
$1236:0000
Simple case: both round down to same
value.
Simple case: both round up to same value.
Boundary case: LSP of value is $8000 and
MSP is even. In this case, the algorithms
generate different results!
Boundary case: LSP of value is $8000 and
MSP is odd. In this case, both have the
same result.
Comments
Rounding
5-47

Related parts for dsp56800e