dsp56800e Freescale Semiconductor, Inc, dsp56800e Datasheet - Page 158

no-image

dsp56800e

Manufacturer Part Number
dsp56800e
Description
16-bit Digital Signal Controller Core
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Data Arithmetic Logic Unit
5.2.3
General integer and control processing typically uses 16-bit data. When an integer is loaded to an
accumulator, the 36 bits of the accumulator should reflect the 16-bit data correctly. During integer
processing, all accumulator loads of 16-bit data should clear the least significant portion of the
accumulator and sign extend the extension portion. Such loading is accomplished using the instruction
demonstrated in Example 5-6.
In general, the A1 register should not be used when an accumulator is loaded with an integer. Using the
entire accumulator, as in Example 5-6, is almost always preferable. One exception to this rule is discussed
in Section 5.2.6, “Saving and Restoring Accumulators.”
The entire accumulator should also be used when long integers are loaded into the accumulators, as shown
in Example 5-7.
General integer and control processing does not use saturation or limiting. There is often no overflow
protection when the result of an integer calculation is read. Typically, the accumulators are read with
saturation disabled, as demonstrated in Example 5-8.
Note the use of the A1 and A10 registers instead of the entire accumulator, A. Using this notation ensures
that saturation is disabled.
5.2.4
A DSC algorithm can use the full 36-bit precision of an accumulator while performing DSC calculations
such as digital filtering or matrix multiplications. However, the 36-bit result must often be written to a
16-bit memory location or D/A converter. Because DSC algorithms process digital signals, it is important
that saturation is enabled when a 36-bit accumulator value is converted to a 16-bit value so that signals that
overflow 16 bits are clipped to the maximum positive or negative value appropriately. Saturation is
ensured when the entire accumulator (FF) is specified as the source operand, as shown in Example 5-9.
Note the use of the A accumulator instead of the A1 register. Using the A accumulator enables saturation.
5-12
Reading and Writing Integer Data to an Accumulator
Reading 16-Bit Results of DSC Algorithms
MOVE.W
MOVE.L
MOVE.W
MOVE.L
MOVE.W
It is not possible to use the A10 register when a long value is loaded into
an accumulator.
Example 5-9. Reading a Word from an Accumulator with Saturation
Example 5-8. Reading an Integer Value from an Accumulator
Example 5-6. Loading an Accumulator with an Integer Word
Example 5-7. Loading an Accumulator with a Long Integer
X:(R0),A
X:(R0),A
A1,X:Variable_1
A10,X:Long_Variable_1
A,X:D_to_A_data
DSP56800E Core Reference Manual
; A2 receives sign extension
; A1 receives the 16-bit data
; A0 receives the value $0000
; A2 receives sign extension
; A1 receives the upper 16 of the 32 bits
; A0 receives the lower 16 of the 32 bits
; Saturation is enabled
NOTE:
; Word move with saturation disabled
; Long word move without saturation
Freescale Semiconductor

Related parts for dsp56800e