CPU16
REFERENCE MANUAL
INSTRUCTION TIMING
MOTOROLA
8-5
8.2.2.7 Multiply and Accumulate Instructions
MAC instructions have normal program access cycles, but differ from regular instruc-
tions in number of operand accesses. During multiply and accumulate operation, two
words pointed to by index registers X and Y are accessed and transferred to the H and
I registers. MAC makes only these two operand accesses, but RMAC repeats the op-
eration a specified number of times.
Table 8-6
shows program and operand access cycles for each instruction.
8.3 Internal Operation Time
To determine the number of clock periods associated with internal operation, first de-
termine program and operand access time using the appropriate table, then use in-
struction cycle time (CL
T
) from the instruction glossary to evaluate the following
expression:
CL
I
=
(CL
T
)
(CL
P
+
CL
O
)
Assume that:
1. All program and operand accesses are aligned on a 16-bit data bus.
2. Each bus cycle takes two clock periods.
This figure is constant regardless of the speed of memory used. Internal operations,
prefetches, and operand fetches are wholly concurrent for many instructions — the
calculated CL
I
will be zero.
8.4 Calculating Execution Times for Slower Accesses
Because CL
I
is constant for all bus speeds, CL
T
will only change when CL
P
and CL
O
change. Clock periods are calculated using the following expression:
CL
X
= (Clock periods per bus cycle) (Number of bus cycles)
Where:
CL
X
is either CL
P
or CL
O
To determine the number of clock periods required to execute an instruction when bus
cycles longer than two system clock periods are necessary, determine the number of
cycles needed, calculate CL
P
and CL
O
values, then add to CL
I.
Table 8-6 MAC Timing
Instruction
Operand
Access
2
2N
Program
Access
1
1
Comment
MAC
RMAC
—
N = Number of iterations
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.