Professional Documents
Culture Documents
ƥ Fetch
ƜPC contains address of next instruction
ƜAddress moved to MAR
ƜAddress placed on address bus
ƜControl unit requests memory read
ƜResult placed on data bus, copied to MBR, then to IR
ƜMeanwhile PC incremented by 1
*$"*#
ƥ IR is examined
ƥ If indirect addressing, indirect cycle is
performed
ƜRight most N bits of MBR transferred to MAR
ƜControl unit requests memory read
ƜResult (address of operand) moved to MBR
*$"* #
*$" * #
*$")
#
ƥ May take many forms
ƥ Depends on instruction being executed
ƥ May include
ƜMemory read/write
ƜInput/Output
ƜRegister transfers
ƜALU operations
*$"
#
ƥ Simple
ƥ Predictable
ƥ Current PC saved to allow resumption after
interrupt
ƥ Contents of PC copied to MBR
ƥ Special memory location (e.g. stack pointer)
loaded to MAR
ƥ MBR written to memory
ƥ PC loaded with address of interrupt handling
routine
ƥ Next instruction (first of interrupt handler) can
be fetched
*$"
* #
+
ƥ Fetch accessing main memory
ƥ Execution usually does not access main memory
ƥ Can fetch next instruction during execution of
current instruction
ƥ Called instruction prefetch
(+
ƥ But not doubled:
ƜFetch usually shorter than execution
ƛ Prefetch more than one instruction?
ƜAny jump or branch means that prefetched
instructions are not the required instructions
ƥ Add more stages to improve performance
ƥ Fetch instruction
ƥ Decode instruction
ƥ Calculate operands (i.e. EAs)
ƥ Fetch operands
ƥ Execute instructions
ƥ Write result