3.7.3.2 The Fetch-Execute Cycle and The Role Of Registers With It. Flashcards
What is the Fetch-execute cycle?
A continuous cycle performed by the processor, consisting of three stages:
Fetch.
Decode.
Execute.
Outline Fetch.
The next instruction to execute is retrieved from main memory.
Outline step one of fetch.
The content of the PC is copied to the MAR.
Outline step two of fetch.
The content of the MAR is transferred to main memory by the address bus.
Outline step three of fetch.
The instruction is sent from main memory to the MBR by the data bus.
Outline step four of fetch.
The PC is incremented by one.
Outline step five of fetch.
The content of the MBR is copied to the CIR.
Fetch full instruction sequence:
- The content of the PC is copied to the MAR
- The content of the MAR is transferred to main memory by the address bus
- The instruction is sent from main memory to the MBR by the data bus
- The PC is incremented by one
- The content of the MBR is copied to the CIR.
Outline decode.
The fetched instruction is decoded.
Outline step one of decode.
The content of the CIR is decoded by the control unit.
Outline step two of decode.
The decoded instruction is split into two parts: opcode
and operands.
Outline Execute.
The instruction is carried out.
Outline step one of execute.
Any data required by the instruction that isn’t present in registers is fetched.
Outline step two of execute.
The instruction is carried out.
Outline step three of execute.
Results of any calculations are stored in general purpose registers or main memory.