Infineon Technologies C166S V2 User Manual page 87

16-bit microcontroller
Table of Contents

Advertisement

Field
ME
MSL
MV
• Accu Extension MAE: These 8 bits are part of the 40-bit accumulator register. The
MAC Unit implicitly uses these bits during a MAC operation. When writing to the MAH,
the MAE is automatically signed extended with the most significant bit of the MAH
register.
• MN-Flag: For the majority of the MAC operations, the MN-flag is set to 1 if the most
significant bit of the result contains a 1; otherwise, it is cleared. In the case of integer
operations, the MN-flag can be interpreted as the sign bit of the result (negative:
MN=1, positive: MN=0). Negative numbers are always represented as the 2s
complement of the corresponding positive number. The range of signed numbers
extends from '8000000000
• MZ-Flag: The MZ-flag is normally set to 1 if the result of a MAC operation equals zero;
otherwise, it is cleared.
• MC-Flag: After a MAC addition, the MC-flag indicates that a "Carry" from the most
significant bit of the accumulator extension MAE has been generated. After a MAC
subtraction or a MAC comparison, the MC-flag indicates a "Borrow" representing the
logical negation of a "Carry" for the addition. This means that the MC-flag is set to 1,
if no "Carry" from the most significant bit of the Accumulator has been generated
during a subtraction. Subtraction is performed by the MAC Unit as a 2s complement
addition and the MC-flag is cleared when this complement addition caused a "Carry".
For left shift MAC operations, the MC-flag represents the value of the bit shifted out
last. Right shift MAC operations always clear the MC-flag. The arithmetic right shift
MAC operation can set the MC-flag if the enabled round operation generates a "Carry"
from the most significant bit of the Accumulator extension MAE.
• MSV-Flag: The addition, subtraction, 2s complement, and round operations always
set the MSV-flag to 1 if the MAC result overflows the maximum range of 40-bit signed
User Manual
Bits
Type Description
[12]
rwh
MAC Extension Flag
0
1
[13]
rwh
Sticky Limit Flag
0
1
[14]
rwh
Overflow Flag
0
1
' to '7FFFFFFFFF
H
MAE does not contain significant bits
MAE contains significant bits
Result was not saturated
Result was saturated
No Overflow produced
Overflow produced
'.
H
2-87
User Manual
C166S V2
Central Processing Unit
V 1.7, 2001-01

Advertisement

Table of Contents
loading

Table of Contents