MOTOROLA
8-2
INSTRUCTION TIMING
CPU16
REFERENCE MANUAL
8.2 Program and Operand Access Time
The number of bus cycles required by a prefetch or an operand access generally de-
pends upon three factors:
Data bus width (8- or 16-bit). Access size (byte, word, or long-word). Access alignment
(aligned or misaligned with even byte boundaries).
Prefetches are always word-sized, and are always aligned with even byte boundaries.
Operand accesses vary in size and alignment.
Table 8-1
shows the number of bus cy-
cles required by accesses of various sizes and alignments.
8.2.1 Program Accesses
For all instructions except those that cause a change in program flow, there is one
prefetch access per instruction word. These accesses keep the instruction pipeline
full. Once the number of prefetches is determined, the number of bus cycles can be
found in
Table 8-1
.
Instructions that cause changes in program flow also have various forms of operand
access. See
8.2.2.3 Change-of-Flow Instructions
for complete information on
prefetch access and operand access.
8.2.2 Operand Accesses
The number of operand accesses per instruction is not fixed. Most instructions follow
a regular pattern, but there are several variant types. Immediate operands are consid-
ered to be part of the instruction — immediate operand access time is considered to
be a prefetch access.
8.2.2.1 Regular Instructions
Regular instructions require one operand access per operand. Determine the number
of byte and/or word operands, then use
Table 8-1
to determine the number of cycles.
8.2.2.2 Read-Modify-Write Instructions
Read-modify-write instructions, which include the byte and word forms of ASL, ASR,
BCLR, BSET, COM, DEC, LSR, NEG, ROL, and ROR, require two accesses per
memory operand. The first access is needed to read the operand, and the second ac-
cess is needed to write it back after modification. Determine the number and size of
operands, multiply by two (the mask used in bit clear and set instructions is considered
to be an immediate operand), then use
Table 8-1
to determine the number of cycles.
Table 8-1 Access Bus Cycles
Access
Size
Byte
Word
Long-word
8-Bit
Data Bus
1
2
4
16-Bit Data Bus
Aligned
1
1
2
16-Bit Data Bus
Misaligned
—
2
4
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.