Unbiased Rounding - Analog Devices ADSP-BF53x Blackfin Reference

Table of Contents

Advertisement

Data Types

Unbiased Rounding

The convergent rounding method returns the number closest to the origi-
nal. In cases where the original number lies exactly halfway between two
numbers, this method returns the nearest even number, the one contain-
ing an LSB of 0. For example, when rounding the 3-bit,
two's-complement fraction 0.25 (binary 0.01) to the nearest 2-bit,
two's-complement fraction, the result would be 0.0, because that is the
even-numbered choice of 0.5 and 0.0. Since it rounds up and down based
on the surrounding values, this method is called unbiased rounding.
Unbiased rounding uses the ALU's capability of rounding the 40-bit result
at the boundary between bit 15 and bit 16. Rounding can be specified as
part of the instruction code. When rounding is selected, the output regis-
ter contains the rounded 16-bit result; the accumulator is never rounded.
The accumulator uses an unbiased rounding scheme. The conventional
method of biased rounding adds a 1 into bit position 15 of the adder
chain. This method causes a net positive bias because the midway value
(when
A0.L/A1.L = 0x8000
The accumulator eliminates this bias by forcing bit 16 in the result output
to 0 when it detects this midway point. Forcing bit 16 to 0 has the effect
of rounding odd
yielding a large sample bias of 0, assuming uniformly distributed values.
The following examples use x to represent any bit pattern (not all zeros).
The example in
example also applies for
2-20
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
) is always rounded upward.
values upward and even values downward,
A0.L/A1.L
Figure 2-7
shows a typical rounding operation for
.
A1
; the
A0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-bf56x blackfin

Table of Contents