XC2200 Derivatives
System Units (Vol. 1 of 2)
Central Processing Unit (CPU)
User’s Manual
4-66
V2.1, 2008-08
CPUSV2_X, V2.2
4.9.3
The 16-bit by 16-bit Signed/Unsigned Multiplier and Scaler
The multiplier executes 16-bit by 16-bit parallel signed/unsigned fractional and integer
multiplication in one CPU-cycle. The multiplier allows the multiplication of unsigned and
signed operands. The result is always presented in a signed fractional or integer format.
The result of the multiplication feeds a one-bit scaler to allow compensation for the extra
sign bit gained in multiplying two 16-bit 2’s complement numbers.
4.9.4
Concatenation Unit
The concatenation unit enables the MAC unit to perform 32-bit arithmetic operations in
one CPU cycle. The concatenation unit concatenates two 16-bit operands to a 32-bit
operand before the 32-bit arithmetic operation is executed in the 40-bit adder/subtracter.
The second required operand is always the current accumulator contents. The
concatenation unit is also used to pre-load the accumulator with a 32-bit value.
4.9.5
One-bit Scaler
The one-bit scaler can shift the result of the concatenation unit or the output of the
multiplier one bit to the left. The scaler is controlled by the executed instruction for the
concatenation or by control bit MP in register MCW.
If bit MP is set the product is shifted one bit to the left to compensate for the extra sign
bit gained in multiplying two 16-bit 2’s-complement numbers. The enabled automatic
shift is performed only if both input operands are signed.
4.9.6
The 40-bit Adder/Subtracter
The 40-bit Adder/Subtracter allows intermediate overflows in a series of
multiply/accumulate operations. The Adder/Subtracter has two input ports. The 40-bit
port is the feedback of the accumulator output through the ACCU-Shifter to the
Adder/Subtracter. The 32-bit port is the input port for the operand coming from the one-
bit Scaler. The 32-bit operands are signed and extended to 40 bits before the
addition/subtraction is performed.
The output of the Adder/Subtracter goes to the accumulator. It is also possible to round
the result and to saturate it on a 32-bit value automatically after every accumulation. The
round operation is performed by adding 00’0000’8000
H
to the result. Automatic
saturation is enabled by setting the saturation control bit MS in register MCW.
When the accumulator is in the overflow saturation mode and an overflow occurs, the
accumulator is loaded with either the most positive or the most negative value
representable in a 32-bit value, depending on the direction of the overflow as well as on
the arithmetic used. The value of the accumulator upon saturation is either
00’7FFF’FFFF
H
(positive) or FF’8000’0000
H
(negative).