Let us consider following decomposition of instruction execution into five stages. These are give as follows below.
- Fetch Instruction (IF) :
It reads the next expected instruction into the buffer.
IR → Mem [PC] ; PC → PC + 4 ;
- Instruction Decoding (ID) :
In this, there are following steps:
- Instruction Decoding, in which determines opcode and operand specifiers.
- Calculate Operand, in which calculates effective address of each source operand.
- Fetch Operands, in which fetch each operand from memory.
A → Regs [IR6, 10] ; B → Regs [IR11, ..., 15] ; Immediate → (IR16)16## (IR16, ..., 31)
- Execute Instruction (EX) :
It performs indicated operation.
Memory ref: ALUoutput → A + Immediate ; Reg-Reg ALU: ALU → A func B ; Reg-Imm ALU: ALUoutput → A op Immediate ; Branch: ALUoutput → PC + Immediate; Cond * (A op 0)
- Memory access/branch completion cycle (MEM) :
It accesses memory.
Memory ref: LMD → Mem [ALUoutput] or Mem (ALUoutput) → B Branch: if (cond) PC → ALUoutput
- Write Operand (WO) :
It stores the result.
Reg-Reg ALU: Regs [R16, ...., 20] → ALUoutput ; Reg-Imm ALU: Regs [R11, ..., 15] → ALUoutput ; Reg-Reg ALU: Regs [R11, ...., 15] → LMD ;
- Arithmetic Pipeline and Instruction Pipeline
- Difference between Linear Pipeline and Non-Linear Pipeline
- ROTATE Instructions in 8085
- COMPARE Instructions in 8085
- Machine Control Instructions in Microprocessor
- Differences between Multiple Cycle Datapath and Pipeline Datapath
- Difference between 3-address instruction and 2-address instructions
- Difference between 2-address instruction and 1-address instructions
- Privileged and Non-Privileged Instructions in Operating System
- 3 big changes in GATE 2021
- Difference between Hierarchical and Relational data model
- GATE CSE preparation story
- Difference between Assembler and Interpreter
- Difference between RAM and SRAM
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.