This preview shows page 1. Sign up to view the full content.
Unformatted text preview: truction machine code from program
• The execution stage does whatever the
machine code calls for.
• Execution, which involves interaction
with the data memory, does not interfere
with fetching instruction from the
14 PIC18 Pipelining
• Instead of taking two instruction cycles
to first fetch and execute an instruction,
both can be accomplished in one
• This mechanism is called pipelining.
pipelining 15 Fetching and Execution Cycles
• Fetching Cycle
– Increment PC
– Fetch instruction into the instruction
register • Execution Cycle
– Decode instruction
– Read operands from data memory
– Perform Arithmetic/Logic operation
– Write the result to the destination.
16 Fetch-And-Execute: A Complete View
Fetch-And-Execute: 0x04 0x36
movf 0x25, w
addlw 0x27 000006
17 2. Branching Address
Representation in Instructions
Representation 18 Branching Address
• You may be asked to identify the part of
the opcode that indicates their
branching addresses for the following
– Relative address
conditional branching, e.g., bnz
rcall – Absolute address
19 Example of a 4-byte instruction: GOTO
• Why 4-byte?
– The machine code must
contain the address of the
destination in the
program memory (21-bit) • Only the most
View Full Document
This document was uploaded on 11/07/2013.
- Fall '13