Accessing The Accumulator Registers; Table 3-1 Accessing The Accumulator Registers - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

3.2

Accessing the Accumulator Registers

An accumulator register can be accessed in two different ways:
as an entire register (F)
by the individual register portion (F2, F1, or F0)
The ability to access the accumulator registers in both ways provides important flexibility, allowing for
powerful DSP algorithms as well as general-purpose computing tasks.
Accessing an entire accumulator register (A or B) is particularly useful for DSP tasks, since it preserves the
complete 36-bit register—and thus the entire precision of a multiplication or other ALU operation. It also
provides limiting (or saturation) capability in cases when storing a result of a computation that would
overflow the destination size. See Section 3.4, "Saturation and Data Limiting."
Accessing an accumulator through its individual portions (F2, F1, or F0) is useful for systems and control
programming. For example, if a DSP algorithm is in progress and an interrupt is received, it is usually
necessary to save every accumulator used by the interrupt service routine. Since an interrupt can occur at
any step of the DSP task (that is, right in the middle of a DSP algorithm), it is important that no saturation
takes place. Thus, an interrupt service routine can store the individual accumulator portions on the stack,
effectively saving the entire 36-bit value without any limiting. Upon completion of the interrupt routine,
the contents of the accumulator can be exactly restored from the stack.
The DSP56800 instruction set transparently supports both methods of access. An entire accumulator may
be accessed simply through the specification of the full-register name (A or B), while portions are accessed
through the use of their respective names (A0, B1, and so on).
Table 3-1 provides a summary of the various access methods. These are described in more detail in
Section 3.2.1, "Accessing an Accumulator by Its Individual Portions," and Section 3.2.2, "Accessing an
Entire Accumulator."
Register
Read of an Accumulator Register
A
For a MOVE instruction:
B
If the extension bits are not in use for the
accumulator to be read, then the 16-bit con-
tents of the F1 portion of the accumulator are
read onto the CGDB bus.
If the extension bits are in use, then a 16-bit
"limited" value is instead read onto the CGDB.
See Section 3.4.1, "Data Limiter."
When used in an arithmetic operation:
All 36 bits are sent to the MAC unit without
limiting.
A2
For a MOVE instruction:
B2
The 4-bit register is read onto the 4 LSBs of
the CGDB bus.
The upper 12 bits of the bus are sign
extended.
See Figure 3-5 on page 3-9.
Table 3-1. Accessing the Accumulator Registers
Data Arithmetic Logic Unit
Accessing the Accumulator Registers
Write to an Accumulator Register
For a MOVE instruction:
The 16 bits of the CGDB bus are written into
the 16-bit F1 portion of the register.
The extension portion of the same accumula-
tor, F2, is filled with sign extension. The F0
portion is set to zero.
For a MOVE instruction:
The 4 LSBs of the CGDB are written into the
4-bit register; the upper 12 bits are ignored.
The corresponding F1 and F0 portions are not
modified.
See Figure 3-4 on page 3-8.
3-7

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents