Truncation - Analog Devices ADSP-BF53x Blackfin Reference

Table of Contents

Advertisement

The
bit in the
RND_MOD
bit is cleared, the
RND_MOD
normal, unbiased rounding operation, as discussed in
ing" on page
2-20.
When the
RND_MOD
instead of unbiased rounding. When operating in biased rounding mode,
all rounding operations with
than only rounding odd values up. For an example of biased rounding, see
Table
2-7.
Table 2-7. Biased Rounding in Multiplier Operation
A0/A1 Before RND
0x00 0000 8000
0x00 0001 8000
0x00 0000 8001
0x00 0001 8001
0x00 0000 7FFF
0x00 0001 7FFF
Biased rounding affects the result only when the
tains 0x8000; all other rounding operations work normally. This mode
allows more efficient implementation of bit specified algorithms that use
biased rounding (for example, the Global System for Mobile Communica-
tions (GSM) speech compression routines).

Truncation

Another common way to reduce the significant bits representing a number
is to simply mask off the N – M lower bits. This process is known as trun-
cation and results in a relatively large bias. Instructions that do not
support rounding revert to truncation. The
effect on truncation.
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
register enables biased rounding. When the
ASTAT
option in multiplier instructions uses the
RND
bit is set (=1), the processor uses biased rounding
A0.L/A1.L
Biased RND Result
0x00 0001 8000
0x00 0002 0000
0x00 0001 0001
0x00 0002 0001
0x00 0000 FFFF
0x00 0001 FFFF
Computational Units
"Unbiased Round-
set to 0x8000 round up, rather
Unbiased RND Result
0x00 0000 0000
0x00 0002 0000
0x00 0001 0001
0x00 0002 0001
0x00 0000 FFFF
0x00 0001 FFFF
A0.L/A1.L
bit in
RND_MOD
register con-
has no
ASTAT
2-23

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-bf56x blackfin

Table of Contents