NXP Semiconductors MPC5644A Reference Manual page 925

Microcontroller
Table of Contents

Advertisement

B-source operand
unsigned
1
Includes the B-source (unsigned) in fmults (signed) operations.
24.5.8.3.1
Multiply and Multiply-Accumulate Operation Length
MDU needs two sources, A source and B source, to perform an operation. The time needed to perform a
multiply or multiply-accumulate is:
On 24-bit x 8 bit multiplies: 2 microcycles (one start-MDU plus one execution microcycle)
On 24-bit x 16 bit multiplies: 3 microcycles (one start-MDU plus two execution microcycles)
On 24 bit x 24 bit multiplies/macs: 4 microcycles (one start-MDU plus three execution
microcycles)
An internal pipeline in MDU allows multiply-accumulate (or even non-fractional multiply) operations to
start one microinstruction before a multiplication or multiply-accumulate (signed or unsigned) has been
completed (e.g., one can start one multiply or multiply-accumulate once every three microinstructions).
However, by doing that it is not possible to read the result in MACH and MACL (although the MDU flags
can be tested), so this is intended to be used in a multiply-accumulate sequence. It is also allowed to mix
different sizes in multiply/mac sequences.
Multiply-accumulate operations are similar to multiply operations, except that the contents of MACH and
MACL registers are added to the multiplication result.
When multiply or multiply accumulate operations finish, MACL and MACH hold the least and the most
significant 24-bit words, respectively.
24.5.8.3.2
Divide operation length
The divide operation is always unsigned. The division completes in 13 microcycles, meaning that after the
start divide microinstruction, one has to wait for 12 microcycles and then read the result and the remainder
in MACH and MACL registers. During the 12 execution microcycles, microengine can execute
microinstructions unrelated to the MDU.
24.5.8.3.3
Signed multiplication (mults)
MDU signed multiplication is defined as follows:
(signed) MACH,MACL = (signed) AS * (signed) BS
MC and MV flags are reset. MZ is set if result is 0, resets otherwise. MN is set if result is negative.
24.5.8.3.4
Unsigned multiplication (multu)
MDU unsigned multiplication is defined as follows:
Freescale Semiconductor
Table 24-70. CIN and BINV with MDU operations
BINV
1
1
1
0
MPC5644A Microcontroller Reference Manual, Rev. 6
Enhanced Time Processing Unit (eTPU2)
CIN
Operation performed
1
AS mdu_op BS
0
AS mdu_op (BS+1)
x
reserved
925

Advertisement

Table of Contents
loading

Table of Contents