![Infineon Technologies XC2200 User Manual Download Page 203](http://html1.mh-extra.com/html/infineon-technologies/xc2200/xc2200_user-manual_2055439203.webp)
XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-65
V2.1, 2008-08
CPUSV2_X, V2.2
4.9.1
MAC Unit Control
The working register of the MAC unit is a dedicated 40-bit accumulator register. A set of
consistent flags is automatically updated in status register MSW after each MAC
operation. These flags allow branching on specific conditions. Unlike the PSW flags,
these flags are not preserved automatically by the CPU upon entry into an interrupt or
trap routine. All dedicated MAC registers must be saved on the stack if the MAC unit is
shared between different tasks and interrupts. General properties of the MAC unit are
selected via the MAC control word MCW.
4.9.2
Representation of Numbers and Rounding
The XC2200 supports the 2’s complement representation of binary numbers. In this
format, the sign bit is the MSB of the binary word. This is set to zero for positive numbers
and set to one for negative numbers. Unsigned numbers are supported only by
multiply/multiply-accumulate instructions which specify whether each operand is signed
or unsigned.
In 2’s complement fractional format, the N-bit operand is represented using the 1.[N-1]
format (1 signed bit, N-1 fractional bits). Such a format can represent numbers between
-1 and +1 - 2
-[N-1]
. This format is supported when bit MP of register MCW is set.
The XC2200 implements 2’s complement rounding. With this rounding type, one is
added to the bit to the right of the rounding point (bit 15 of MAL), before truncation (MAL
is cleared).
MCW
MAC Control Word
SFR (FFDC
H
/EE
H
)
Reset Value: 0000
H
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
-
-
-
-
-
MP
MS
-
-
-
-
-
-
-
-
-
-
-
-
-
-
rw
rw
-
-
-
-
-
-
-
-
-
Field
Bits
Type
Description
MP
10
rw
One-Bit Scaler Control
0
Multiplier product shift disabled
1
Multiplier product shift enabled for signed
multiplications
MS
9
rw
Saturation Control
0
Saturation disabled
1
Saturation to 32-bit value enabled