• retagged by
1,290 views
2 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?

1 Answer

3 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
Position:
Show:

Related questions

0 0 votes
1 1 answer
1.2k
1.2k views
kathan Mistry asked Aug 9, 2022
1,199 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 0 votes
1 answers 1 answer
1.5k
1.5k views
munindra tripathi asked Jun 15, 2016
1,490 views
In a system which supports overlay two programs want to run.Size of program1 = 90kbSize of program 2 = 100kbSize of common code = 10kbSize of overlay driver = 20kbSize of...
0 0 votes
0 0 answers
527
527 views
rahuldb asked Nov 12, 2016
527 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...
0 0 votes
1 1 answer
1.1k
1.1k views
Raj Singh 1 asked Jan 9, 2019
1,145 views
The title says it all: How many stall cycles are caused due to each incorrect branch prediction?Additional details you might need:Branch is executed in execution stage of...