Mac Operations; Standard Functions - Analog Devices adsp-2100 Manual

Adsp-2100 family programmable single-chip microprocessors
Table of Contents

Advertisement

2 Computational Units
The MAC contains a duplicate bank of registers, shown in Figure 2.6
behind the primary registers. There are actually two sets of MR, MF, MX,
and MY register files. Only one bank is accessible at a time. The additional
bank of registers can be activated for extremely fast context switching. A
new task, such as an interrupt service routine, can be executed without
transferring current states to storage.
The selection of the primary or alternate bank of registers is controlled by
bit 0 in the processor mode status register (MSTAT). If this bit is a 0, the
primary bank is selected; if it is a 1, the secondary bank is selected.
2.3.2
This section explains the functions of the MAC, its input formats and its
handling of overflow and saturation.

2.3.2.1 Standard Functions

The functions performed by the MAC are:
X * Y
MR+X * Y
MR–X * Y
0
The ADSP-2100 family provides two modes for the standard multiply/
accumulate function: fractional mode for fractional numbers (1.15), and
integer mode for integers (16.0).
In the fractional mode, the 32-bit P output is format adjusted, that is, sign-
extended and shifted one bit to the left before being added to MR. For
example, bit 31 of P lines up with bit 32 of MR (which is bit 0 of MR2) and
bit 0 of P lines up with bit 1 of MR (which is bit 1 of MR0). The LSB is zero-
filled. The fractional multiplier result format is shown in Figure 2.7.
In the integer mode, the 32-bit P register is not shifted before being added
to MR. Figure 2.8 shows the integer-mode result placement.
The mode is selected by bit 4 of the mode status register (MSTAT). If this
bit is a 1, the integer mode is selected. Otherwise, the fractional mode is
selected. In either mode, the multiplier output P is fed into a 40-bit adder/
subtracter which adds or subtracts the new product with the current
contents of the MR register to form the final 40-bit result R.
2 – 16

MAC Operations

Multiply X and Y operands.
Multiply X and Y operands and add result to MR register.
Multiply X and Y operands and subtract result from MR register.
Clear result (MR) to zero.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents