
MOTOROLA
11-6
DIGITAL SIGNAL PROCESSING
CPU16
REFERENCE MANUAL
11.7.1.4 TEM — Transfer E to AM
TEM initializes the upper 16 bits of accumulator M and clears the lower 16 bits. The
content of accumulator E is transferred to AM[31:16]. AM[15:0] are cleared. AM[35:32]
reflect the state of bit 31 after transfer is complete. TEM also clears the CCR EV and
MV bits.
11.7.2 Transfer Instructions
The following instructions are used to transfer MAC data to general-purpose accumu-
lators.
11.7.2.1 TMER — Transfer AM to E Rounded
The TMER instruction rounds a signed 32-bit fraction in accumulator M to 16 bits, then
places the signed 16-bit fraction in accumulator E. The value represented by bits [15:0]
of the fraction are rounded into the value represented by bits [31:16].
Bits [15:0] can have any value in the range $0000 to $FFFF. A value greater than
$8000 must be rounded up, and a value less than $8000 must be rounded down. How-
ever, rounding values equal to $8000 in a single direction will introduce a bias. The
CPU16 uses convergent rounding to avoid bias.
In convergent rounding, bit 16 determines whether a value of $8000 in bits [15:0] will
be rounded up or down. When bit 16 = 1, a value of $8000 is rounded up; when bit 16
= 0, a value of $8000 is rounded down.
The EV, MV, N and Z bits in the CCR are set according to the results of the rounding
operation. When saturation mode has been enabled, and either EV or MV is set, the
appropriate saturation value will be placed in accumulator E.
If TMER is executed when saturation mode has not been enabled, and either EV or
MV is set, the value in accumulator E will be meaningless.
11.7.2.2 TMET — Transfer AM to E Truncated
The TMET instruction truncates a signed 32-bit fraction in accumulator M to 16 bits,
then places the signed 16-bit fraction in accumulator E. AM[31:16] are transferred to
accumulator E.
The N and Z bits in the CCR are set according to the results of the transfer operation.
When AM31 is set, N is set. When saturation mode has been enabled, and either EV
or MV is set, the appropriate saturation value will be placed in accumulator E.
If TMER is executed when saturation mode has not been enabled, and either EV or
MV is set, the value in accumulator E will be meaningless.
11.7.2.3 TMXED — Transfer AM to IX : E : D
TMXED provides a way to normalize AM when saturation mode is disabled and recov-
ery from an extension bit overflow is necessary. AM[35:32] are transferred to IX[3:0].
IX[15:4] are sign-extended according to the content of AM35. AM[31:16] are trans-
ferred to accumulator E. AM[15:0] are transferred to accumulator D.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.