Instructions Not Affected By The Mac Output Limiter; Table 3-5 Mac Unit Outputs With Saturation Enabled - Motorola DSP56800 Manual

16-bit digital signal processor
Table of Contents

Advertisement

Once the accumulator increments to $7FFF in Example 3-19, the saturation logic in the MAC Output
limiter prevents it from growing larger because it can no longer fit into a 16-bit memory location without
overflow. So instead of writing an overflowed value to back to the A accumulator, the value of the most
positive 32-bit number, $7FFF:FFFF, is written instead as the arithmetic result.
The saturation logic operates by checking 3 bits of the 36-bit result out of the MAC unit: EXT[3], EXT[0],
and MSP[15]. When the SA bit is set, these 3 bits determine if saturation is performed on the MAC unit's
output and whether to saturate to the maximum positive value ($7FFF:FFFF) or the maximum negative
value ($8000:0000), as shown in Table 3-5.
Table 3-5. MAC Unit Outputs with Saturation Enabled
EXT[3]
0
0
0
0
1
1
1
1
The MAC Output Limiter not only affects the results calculated by the instruction, but can also affect
condition code computation as well. See Appendix A.4.2, "Effects of the Operating Mode Register's SA
Bit," on page A-11 for more information.
3.4.3

Instructions Not Affected by the MAC Output Limiter

The MAC Output Limiter is always disabled (even if the SA bit is set) when the following instructions are
being executed:
ASLL, ASRR, LSRR
ASRAC, LSRAC
IMPY
MPYSU, MACSU
AND, OR, EOR
LSL, LSR, ROL, ROR, NOT
TST
The CMP is not affected by the OMR's SA bit except for the case when the first operand is not a register
(that is, it is a memory location or an immediate value) and the second operand is the X0, Y0, or Y1
register. In this particular case, the U bit calculation is affected by the SA bit. No other bits are affected by
the SA bit for the CMP instruction.
EXT[0]
MSP[15]
0
0
0
1
1
0
1
1
0
0
0
1
1
0
1
1
Data Arithmetic Logic Unit
Saturation and Data Limiting
Result Stored in Accumulator
Result out of MAC Array with no limiting
occurring
$0:7FFF:FFFF
$0:7FFF:FFFF
$0:7FFF:FFFF
$F:8000:0000
$F:8000:0000
$F:8000:0000
Result out of MAC Array with no limiting
occurring
3-29

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents