2 Computational Units
2 – 8
2.2.3
ALU Input/Output Registers
The sources of ALU input and output registers are shown below.
Source for
Source for
Destination for
X input port
Y input port
R output port
AX0, AX1
AY0, AY1
AR
AR
AF
AF
MR0, MR1, MR2
SR0, SR1
MR0, MR1 and MR2 are multiplier/accumulator result registers; SR0 and
SR1 are shifter result registers.
2.2.4
Multiprecision Capability
Multiprecision operations are supported in the ALU with the carry-in
signal and ALU carry (AC) status bit. The carry-in signal is the AC status
bit that was generated by a previous ALU operation. The “add with carry”
(+ C) operation is intended for adding the upper portions of
multiprecision numbers. The “subtract with borrow” (C – 1 is effectively a
“borrow”) operation is intended for subtracting the upper portions of
multiprecision numbers.
2.2.5
ALU Saturation Mode
The AR register has a twos-complement saturation mode of operation
which automatically sets it to the maximum negative or positive value if
an ALU result overflows or underflows. This feature is enabled by setting
bit 3 of the mode status register (MSTAT). When enabled, the value loaded
into AR during an ALU operation depends on the state of the overflow
and carry status generated by the ALU on that cycle. The following table
summarizes the loading of AR when saturation mode is enabled.
Overflow (AV)
Carry (AC)
AR Contents
0
0
ALU Output
0
1
ALU Output
1
0
0111111111111111
full-scale positive
1
1
1000000000000000
full-scale negative
Table 2.2 Saturation Mode
The operation of the ALU saturation mode is different from the
Multiplier/Accumulator saturation ability, which is enabled only on an
instruction by instruction basis. For the ALU, enabling saturation means
that all subsequent operations are processed this way.