CPU16
REFERENCE MANUAL
INSTRUCTION PROCESS
MOTOROLA
7-5
3. 8-bit opcode with 20-bit argument
—
The execution unit reads the operand
byte from stage B and the operand word from stage A, then signals that ex-
ecution has begun. The instruction executes, the content of stage B advanc-
es to stage C, and (FWA
+
$0004) is latched into stage A.
4. 8-bit opcode with argument
—
The execution unit determines the number of
operands needed, reads an operand byte from stage B and an operand
word from stage A, then signals that execution has begun. The instruction
executes, the content of stage B advances to stage C, and (FWA
+
$0004)
is latched into stage A — this word can be either the third word of the current
instruction or the first word of a new instruction.
5. 16-bit opcode with argument
—
The execution unit determines the number
of operand words needed, reads the first operand word from stage A, then
signals that execution has begun. The instruction executes, the content of
stage B advances to stage C, and (FWA
+
$0004) is latched into stage A —
this word can be either the third word of the current instruction or the first
word of a new instruction.
E. At this point PK : PC = $0006, and the process repeats, but entry points differ
for instructions of different lengths:
1. One-word instructions — Stage B contains a new opcode for the execution
unit to evaluate, and process repeats from D.
2. Two-word instructions — Stage A contains a new opcode, and process re-
peats from C.
3. Three-word instructions — Stages A and B contain operands from the in-
struction just completed, and process repeats from B.
Note
Due to the action of the prefetch mechanism, it is necessary to leave
a two-word buffer at the end of program space. The last word of an
instruction must be located at End of Memory – $0004.
The microsequencer always prefetches two words past the first word
address of an instruction while that instruction is executing.
If an instruction is placed in either of the two highest available word
addresses, these fetches may attempt access to addresses that do
not exist — these attempts can cause bus errors.
7.3.2 Changes in Program Flow
When program flow changes, instructions are fetched from a new address. Before ex-
ecution can begin at the new address, instructions and operands from the previous in-
struction stream must be removed from the pipeline. If a change in flow is temporary,
a return address must be stored, so that execution of the original instruction stream
can resume after the change in flow.
F
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
.