CPU16
REFERENCE MANUAL
DIGITAL SIGNAL PROCESSING
MOTOROLA
11-5
11.6 Data Saturation
The CPU16 can simulate the effect of saturation in analog systems. Saturation mode
is enabled by setting the SM bit in the condition code register. If saturation mode is
enabled, a saturation value will be written to accumulator E when either of the TMER
or TMET instructions is executed while EV or MV is set. Saturation mode operation
does not affect the content of AM.
$7FFF is the positive saturation value; $8000 is the negative saturation value. When
extension overflow occurs, AM35 determines saturation value. When sign bit overflow
occurs, SL determines saturation value.
Table 11-2
summarizes bit values and satu-
ration values.
11.7 DSP Instructions
Following are detailed descriptions of each DSP instruction. Instructions are grouped
by function.
11.7.1 Initialization Instructions
The following instructions are used to set up multiply and accumulate operations.
11.7.1.1 LDHI — Load Registers H and I
LDHI must be used to initialize the multiplier and multiplicand registers before execu-
tion of MAC and RMAC instructions. HR is loaded with a memory word located at ad-
dress (XK
:
IX). IR is loaded with a memory word located at address (YK
:
IY). LDHI
operation does not affect the CCR.
11.7.1.2 TDMSK — Transfer D to XMSK
:
YMSK
TDMSK must be used to initialize the X and Y address masks prior to execution of
MAC and RMAC instructions. The contents of the masks are replaced by the content
of accumulator D. D[15:8] are transferred to XMSK, and D[7:0] are transferred to YM-
SK. The masks are used in modulo addressing. TDMSK operation does not affect the
CCR.
11.7.1.3 TEDM — Transfer E and D to AM
TEDM places 32 bits of data in accumulator M. The content of accumulator E is trans-
ferred to AM[31:16], and the content of accumulator D is transferred to AM[15:0].
AM[35:32] reflect the state of AM31 after transfer is complete. TEDM also clears the
CCR EV and MV bits.
Table 11-2 Saturation Values
AM35
0
1
—
—
EV
1
1
1
1
MV
0
0
1
1
SL
—
—
1
0
Saturation Value
$7FFF
$8000
$7FFF
$8000
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.