dsp56800 Freescale Semiconductor, Inc, dsp56800 Datasheet - Page 56

no-image

dsp56800

Manufacturer Part Number
dsp56800
Description
16-bit Digital Signal Controllers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
Data Arithmetic Logic Unit
Loading a 16-bit integer value into the A1 portion of the register is generally discouraged. In almost all
cases, it is preferable to follow Example 3-1 on page 3-11. One notable exception is when 36-bit
accumulator values must be stored temporarily. See Section 3.2.5, “Saving and Restoring Accumulators,”
for more details.
3.2.3.2
Integer and control processing algorithms typically involve the manipulation of 16-bit quantities that
would be adversely affected by saturation or limiting. When such integer calculations are performed, it is
often desirable not to have overflow protection when results are stored to memory. To ensure that the data
ALU’s data limiter is not active when an accumulator is being read, it is necessary to store not the full
accumulator, but just the MSP (A1 portion). See Example 3-2.
Note that with the use of the A1 register instead of the A register, saturation is disabled. The value in A1 is
written “as is” to memory.
3.2.4
A DSC algorithm may use the full 36-bit precision of an accumulator while performing DSC calculations
such as digital filtering or matrix multiplications. Upon completion of the algorithm, however, sometimes
the result of the calculation must be saved in a 16-bit memory location or must be written to a 16-bit D/A
converter. Since DSC algorithms process digital signals, it is important that when the 36-bit accumulator
value is converted to a 16-bit value, saturation is enabled so signals that overflow 16 bits are appropriately
clipped to the maximum positive or negative value. See Example 3-3.
Note the use of the A accumulator instead of the A1 register. Using the A accumulator enables saturation.
3.2.5
Interrupt service routines offer one example of a time when it is critical that an accumulator be saved and
restored without being altered in any way. Since an interrupt can occur at any time, the exact usage of an
accumulator at that instant is unknown, so it cannot be altered by the interrupt service routine without
adversely affecting any calculation that may have been in progress. In order for an accumulator to be saved
and restored correctly, it must be done with limiting disabled. This is accomplished through sequentially
saving and restoring the individual parts of the register, and not the whole register at once. See
Example 3-4 on page 3-13.
3-12
MOVE
MOVE
Using 16-Bit Results of DSC Algorithms
Saving and Restoring Accumulators
Reading Integer Data from an Accumulator
Example 3-2. Reading a Word from an Accumulator for Integer Processing
Example 3-3. Correctly Reading a Word from an Accumulator to a D/A
A1,X:Variable_1
A,X:D_to_A_data
DSP56800 Family Manual
; Saturation is disabled
; Saturation is enabled
Freescale Semiconductor

Related parts for dsp56800