retagged by
711 views
2 votes
2 votes

Program consists of 16 instructions (I1, I2, I3, ...., I16). In which I6 is a unconditional branch instruction transfer the controls of I12. In the pipeline, branch target address will be available at the end of execute state. Each instruction spends the same amount of time in all the pipeline stages. The cycle time of the pipeline is 10 nsec.

What is the time (in nsec) required to execute the above program without using branch prediction?

retagged by

1 Answer

3 votes
3 votes
Let there be four stages
S1 = Instruction fetch
S2 = Instruction decode
S3 = Execute
S4 = Write back

Using (K+n-1)tp
1. I1 to I6 execute first
2. I7 & I8 will also be executed at this point I6 will reach to execute stage so it sends the control to I12
3.I12 to 116  will execute

so total 13 instruction
(13-1+4)10 = 160ns
edited by

Related questions

0 votes
0 votes
1 answer
1
kathan Mistry asked Aug 9, 2022
612 views
In a pipelined architecture Static branch prediction is used with branch taken assumption. Assume that 30% of the instructions executed for a program are branch instructi...
0 votes
0 votes
0 answers
3
rahuldb asked Nov 12, 2016
361 views
Write down the sequence of control signals required to execute LDA 1000 instruction (loading the content of 1000 into accumulator) in single bus CPU organisation.Please s...