Memory the execution stage does whatever the the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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

This document was uploaded on 11/07/2013.

Ask a homework question - tutors are online