Instruction Processing EVALUATE For instructions that require memory access F ADDRESS compute address used for access D Examples add offset to base register as in LDR add offset to PC add offset to zero EA OP EX S Changing the Sequence of In the FETCH phase we increment the Program Counter by 1 Instructions What if we don t want to always execute the instruction that follows this one examples loop if then function call Need special instructions that change the contents of the PC These are called control instructions jumps are unconditional they always change the PC branches are conditional they change the PC only if some condition is true e g the result of an ADD is zero Example LC 3 JMP Instruction Set the PC to the value contained in a register This becomes the address of the next instruction to fetch Load the contents of R3 into the PC Control Unit State Diagram The control unit is a state machine Here is part of a simplified state diagram for the LC 3 A more complete state diagram is in Appendix C It will be more understandable after Chapter 5 Stopping the Clock Control unit will repeat instruction processing sequence as long as clock is running If not processing instructions from your application then it is processing instructions from the Operating System OS The OS is a special program that manages processor and other resources To stop the computer AND the clock generator signal with ZERO When control unit stops seeing the CLOCK signal it stops processing
View Full Document
Unlocking...