GATE Exam  >  GATE Questions  >  Consider an instruction pipeline with five st... Start Learning for Free
Consider an instruction pipeline with five stages without any branch prediction: Fetch
Instruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) and
Write Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 ns
and 6 ns, respectively. There are intermediate storage buffers after each stage and the delay of
each buffer is 1 ns. A program consisting of I2 instructions  I1 , I2 , I3 ,......I is executed in this
pipelined processor. Instruction  I4 is the only branch instruction and its branch target is 9 I . If
the branch is taken during the execution of this program, the time (in ns) needed to complete
the program is
  • a)
    132
  • b)
    165
  • c)
    176
  • d)
    328
Correct answer is option 'B'. Can you explain this answer?
Verified Answer
Consider an instruction pipeline with five stages without any branch p...
Clock period=Maximum stage delay+ overhead (Buffer) =10+1=11 ns
Assume FI-1, DI-2, FO-3, EI-4, WO-5
 
So number of clocks required to complete the program is = 15 clocks and time taken is = 15 ×11 ns=165 ns.
View all questions of this test
Most Upvoted Answer
Consider an instruction pipeline with five stages without any branch p...
To find the time needed to complete the program, we need to calculate the total time taken by each instruction in the pipeline.

Given:
- Stage delays: FI = 5 ns, DI = 7 ns, FO = 10 ns, EI = 8 ns, WO = 6 ns
- Buffer delays: 1 ns

Let's break down the execution of the program instruction by instruction:

1. FetchInstruction (FI):
- The first instruction (I1) enters the FI stage.
- It takes 5 ns for the instruction to complete the FI stage.
- The instruction then moves to the DI stage.

2. Decode Instruction (DI):
- The first instruction (I1) enters the DI stage.
- It takes 7 ns for the instruction to complete the DI stage.
- The instruction then moves to the FO stage.

3. Fetch Operand (FO):
- The first instruction (I1) enters the FO stage.
- It takes 10 ns for the instruction to complete the FO stage.
- The instruction then moves to the EI stage.

4. Execute Instruction (EI):
- The first instruction (I1) enters the EI stage.
- It takes 8 ns for the instruction to complete the EI stage.
- The instruction then moves to the WO stage.

5. Write Operand (WO):
- The first instruction (I1) enters the WO stage.
- It takes 6 ns for the instruction to complete the WO stage.

At this point, the first instruction (I1) has completed its execution. However, the remaining instructions are still in various stages of the pipeline.

Now, let's consider the branch instruction I4:

6. FetchInstruction (FI):
- The branch instruction (I4) enters the FI stage.
- It takes 5 ns for the instruction to complete the FI stage.
- The instruction then moves to the DI stage.

7. Decode Instruction (DI):
- The branch instruction (I4) enters the DI stage.
- It takes 7 ns for the instruction to complete the DI stage.
- The instruction then moves to the FO stage.

8. Fetch Operand (FO):
- The branch instruction (I4) enters the FO stage.
- It takes 10 ns for the instruction to complete the FO stage.
- The instruction then moves to the EI stage.

9. Execute Instruction (EI):
- The branch instruction (I4) enters the EI stage.
- It takes 8 ns for the instruction to complete the EI stage.
- The instruction then moves to the WO stage.

10. Write Operand (WO):
- The branch instruction (I4) enters the WO stage.
- It takes 6 ns for the instruction to complete the WO stage.

At this point, the branch instruction (I4) has completed its execution, but its branch target (I9) needs to be fetched.

11. FetchInstruction (FI):
- The branch target instruction (I9) enters the FI stage.
- It takes 5 ns for the instruction to complete the FI stage.
- The instruction then moves to the DI stage.

12. Decode Instruction (DI):
- The branch target instruction (I9) enters the DI stage.
- It takes 7 ns for the instruction to
Explore Courses for GATE exam

Similar GATE Doubts

Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer?
Question Description
Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer?.
Solutions for Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer?, a detailed solution for Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer? has been provided alongside types of Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider an instruction pipeline with five stages without any branch prediction: FetchInstruction (FI), Decode Instruction (DI), Fetch Operand (FO), Execute Instruction (EI) andWrite Operand (WO). The stage delays for FI, DI, FO, EI and WO are 5 ns, 7 ns, 10 ns, 8 nsand 6 ns, respectively. There are intermediate storage buffers after each stage and the delay ofeach buffer is 1 ns. A program consisting of I2 instructions I1 , I2 , I3 ,......I is executed in thispipelined processor. Instruction I4 is the only branch instruction and its branch target is 9 I . Ifthe branch is taken during the execution of this program, the time (in ns) needed to completethe program isa)132b)165c)176d)328Correct answer is option 'B'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev