![](http://datasheet.mmic.net.cn/230000/V4ECFUM_datasheet_15625205/V4ECFUM_107.png)
Chapter 5. Enhanced Multiply-Accumulate Unit (EMAC)
For More Information On This Product,
Go to: www.freescale.com
5-9
Memory Map/Register Set
Table 5-2 summarizes the interaction of the S/U, F/I, and R/T control bits (MACSR[6–4]).
5.4.1.1 Fractional Operation Mode
This section describes behavior when fractional mode is used (MACSR[F/I] is set).
5.4.1.1.1 Rounding
While the processor is in fractional mode, there are two operations during which rounding
can occur.
3–0
—
Flags
3
N
Negative. Set if the msb of the result is set, cleared otherwise. N is affected only by MAC,
MSAC, and load operations and not by MULS and MULU instructions.
2
Z
Zero. Set if the result equals zero, cleared otherwise. This bit is affected only by MAC,
MSAC, and load operations and not by MULS and MULU instructions.
1
V
Overflow. Set if an arithmetic overflow occurs on a MAC or MSAC instruction indicating
that the result cannot be represented in the limited width of the EMAC. V is set only if a
product overflow occurs or the accumulation overflows the 48-bit structure. V is evaluated
on each MAC or MSAC operation and uses the appropriate PAVx flag in the next-state V
evaluation.
0
EV
Extension overflow. Signals that the last MAC or MSAC instruction overflowed the 32 lsbs
in integer mode or the 40 lsbs in fractional mode of the destination accumulator. However,
the result is still accurately represented in the combined 48-bit accumulator structure.
Although an overflow has occurred, the correct result, sign, and magnitude are contained
in the 48-bit accumulator. Subsequent MAC or MSAC operations may return the
accumulator to a valid 32/40-bit result.
Table 5-2. Summary of S/U, F/I, and R/T Control Bits
S/U
F/I
R/T
Operational Modes
0
0
x
Signed, integer
0
1
0
Signed, fractional
Truncate on MAC.L and MSAC.L
No round on accumulator stores
0
1
1
Signed, fractional,
Round on MAC.L and MSAC.L
Round-to-32-bits on accumulator stores
1
0
x
Unsigned, integer
1
1
0
Signed, fractional,
Truncate on MAC.L and MSAC.L
Round-to-16-bits on accumulator stores
1
1
1
Signed, fractional,
Round on MAC.L and MSAC.L,
Round-to-16-bits on accumulator stores
Table 5-1. MACSR Field Descriptions (Continued)
Bits
Name
Description
F
Freescale Semiconductor, Inc.
n
.