1,578 views
0 votes
0 votes

give proper explanation.

confusing.

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 12 instructions I1, I2, I3, …, I12 is executed in this pipelined processor. Instruction I4 is the only branch instruction and its branch target is I9. If the branch is taken during the execution of this program, the time (in ns) needed to complete the program is :
1. 165
2. 190
3. 215
4.328

2 Answers

1 votes
1 votes
The Branch instruction is avail at Execution state which is the 4th stage of pipeline.
So From I1 to I7 instruction are fetched coz I7 FI overlap with the EI of I4 here branch instruction is known so it transfer the control to I9 skipping I8 therefore I9 FI overlap with I4 WO.

So total instruction Fetched = 11
using (k+n-1)tp = > (11+5-1) (10+1) = 165ns
0 votes
0 votes
All instructions before I4 will be pipelined & then I9-I12 will be pipelined so .  Tp = maxt + delay = 11

T = (n1-1+n2-1+2*k)*Tp  , n1 is first 3 instruction and n2 is 4 instructions from 9-12 , k is total stages in pipeline

T = (3+4-2+2*5)*11 = 15*11 = 165

Related questions

0 votes
0 votes
2 answers
1
prasoon054 asked Jan 7
195 views
In which stage of the classic RISC pipeline, operand is fetched. Is it in Instruction Decode or Execute (ALU) stage?
0 votes
0 votes
1 answer
4
shima abdullah asked Jun 27, 2022
887 views
if an unpipelined processor with a cycle time of 25 ns is evenly divided into 5 pipeline stages using pipeline latches with 1-ns latency,what is the total latency of the ...