CPU16
REFERENCE MANUAL
COMPARISON OF CPU16/M68HC11 CPU ASSEMBLY LANGUAGE
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
A-5
A.3.2.3 Execution Unit
The execution unit evaluates opcodes, interfaces with the microsequencer to advance
instructions through the pipeline, and performs instruction operations.
A.3.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.
A.3.4 Changes in Program Flow
When program flow changes, instructions are fetched from a new address. Before
execution can begin at the new address, instructions and operands from the previous
instruction 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.
At the time an instruction that causes a change in program flow executes, PK : PC
point to the address of the first word of the instruction
+
$0006. During execution of the
instruction, PK : PC is loaded with the address of the first word of the new instruction
stream. However, stages A and B still contain words from the old instruction stream.
The CPU16 prefetches to advance the new instruction to stage C, and fills the pipeline
from the new instruction stream.
A.3.4.1 Jumps
The CPU16 jump instruction uses 20-bit extended and indexed addressing modes. It
consists of an 8-bit opcode with a 20-bit argument. No return PK : PC is stacked for a
jump.
A.3.4.2 Branches
The CPU16 supports 8-bit relative displacement (short), and 16-bit relative displace-
ment (long) branch instructions, as well as specialized bit condition branches that use
indexed addressing modes. CPU16 short branches are generally equivalent to
M68HC11 CPU branches, although opcodes are not identical. M68HC11 BHI and
BLO are replaced by CPU16 BCC and BCS.
F
Freescale Semiconductor, Inc.
n
.