
MOTOROLA
7-4
INSTRUCTION PROCESS
CPU16
REFERENCE MANUAL
7.3 Execution Process
Fetched opcodes are latched into stage A, then advanced to stage B. Opcodes are
evaluated in stage B. The execution unit can access operands in either stage A or
stage B (stage B accesses are limited to 8-bit operands). When execution is complete,
opcodes are moved from stage B to stage C, where they remain until the next instruc-
tion is complete.
A prefetch mechanism in the microsequencer reads instruction words from memory
and increments the program counter. When instruction execution begins, the program
counter points to an address six bytes after the address of the first word of the instruc-
tion being executed.
The number of machine cycles necessary to complete an execution sequence varies
according to the complexity of the instruction.
SECTION 8 INSTRUCTION TIMING
gives detailed information concerning execution time calculation.
7.3.1 Detailed Process
The following description divides execution processing into discrete steps in order to
describe it fully. Events in the steps are often concurrent. Refer to
SECTION 10 DE-
VELOPMENT SUPPORT
for information concerning signals used to track the se-
quence of execution. Relative PC values are given to aid following instructions through
the pipeline.
A. PK : PC points to the first word address (FWA) of the instruction to be executed
(PK : PC = FWA
+
$0000).
B. The microsequencer initiates a read from the memory address pointed to by PK
: PC, signals pipeline stage A to latch the word (FWA
+
$0000) read from mem-
ory, then increments PK : PC (PK : PC = FWA
+
$0002).
C. The latched word contains either an 8-bit prebyte and an 8-bit opcode or an 8-
bit opcode and an 8-bit operand. The microsequencer advances (FWA
+
$0000) to stage B, prefetches (FWA
+
$0002) from the data bus, and incre-
ments PK : PC (PK : PC = FWA
+
$0004).
D. Stage A now contains (FWA
+
$0002) and stage B contains (FWA
+
$0000).
The execution unit determines what operations must be performed and the
character of the operands needed to perform them. The microsequencer ini-
tiates a prefetch from FWA
+
$0004 and increments PK : PC (PK : PC = FWA
+
$0006). Subsequent execution depends upon instruction format.
1. 8-bit opcode with 8-bit operand
—
The execution unit reads the operand and
signals that execution has begun. The instruction executes, the content of
stage B advances to stage C, the content of stage A advances to stage B,
and (FWA
+
$0004) is latched into stage A.
2. 16-bit opcode with no argument
—
The execution unit signals that execution
has begun. The instruction executes, the content of stage B advances to
stage C, the content of stage A advances to stage B, and (FWA
+
$0004) is
latched into stage A.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.