MPC563XM Reference Manual, Rev. 1
Freescale Semiconductor
873
Preliminary—Subject to Change Without Notice
indicates the
selected channel
. CHAN register must not be used to store temporary values in arithmetic
operations. For more details, refer to
Section , “Channel Selection Register - CHAN
”.
23.4.8.1.9
Counter Registers: TCR1, TCR2, TPR and TRR
All these registers are 24-bit wide except TPR, which is a 16-bit register. They can be read or written in
arithmetic/logical operations, and have special-purpose uses for time base and angle mode operations. For
more information about those registers see
and
.
23.4.8.1.10
General Purpose Registers: A, B, C and D
A, B, C and D are 24-bit general purpose registers, which can be used to store intermediate values and do
not have other specific uses with any eTPU feature.
23.4.8.2
ALU and Post-ALU Shifter
The ALU executes 24-bit arithmetic and logical operations. ALU’s output goes directly to a 1-bit shifter,
called post-ALU shifter, so it is possible, for example, to add and shift using only one microinstruction.
In some microinstruction formats, it is not possible to specify the operation executed by ALU. In these
cases ALU will always perform addition.
In formats which have the field ALUOP for ALU operation selection, all of them can be performed,
including add/subtract using C (carry) flag as ALU’s carry-in, bitwise AND/OR/NOT/XOR, and
shift/rotate of 2, 4, 8 and 16 bits. See
Section 23.4.9.2.10, “ALU/MDU Operation Selection
.
Subtraction, inversion, increment and decrement can be performed by combinations of source inversion
and setting ALU’s carry-in to 1.
ALU always performs 24-bit operations on its inputs, called
A-source
and
B-source
, and outputs a 24-bit
result. 8-, and 16-bit inputs are zero padded to 24 bits. Likewise, ALU 24-bit output is always truncated to
the destination register size.
23.4.8.2.1
ALU Flags
Four flags - Carry, Negative, Overflow, Zero - described below, are related to ALU and post-ALU shift
operations. Operation size and shifting affect flags generation logic. Operation size determines the result
boundary to be used for flags generation. Operation size is determined by size of sources and destination
(see
Section 23.4.9.2.3, “Flags Sampling Control
”). For more information about flag generation, see
. ALU flags can be used as branch condition (see
Section , “Conditional/Unconditional
”) or conditional ALU/MDU operation (see
Section 23.4.9.2.7, “Conditional ALU/MDU
”).
Field CCS/CCSV in microinstructions can force
no update
of all flags. Not all flags are updated in all
ALU operations: Overflow is updated only on addition and absolute value operations, Carry flag is
updated in most ALU operations, and only Zero and Negative are updated in all ALU operations.