in CO and Architecture retagged by
1,935 views
0 votes
0 votes

We have $10$-stage pipeline, where the branch target conditions are resolved at stage $5$. How many stalls are there for an incorrectly predicted branch?

  1. $5$
  2. $6$
  3. $7$
  4. $4$
in CO and Architecture retagged by
by
1.9k views

2 Comments

Ans may be 4
1
1
0
0

3 Answers

3 votes
3 votes

→ A branch predictor is a digital circuit that tries to guess which way a branch (e.g. an if–then–else structure) will go before this is known definitively.
→ The purpose of the branch predictor is to improve the flow in the instruction pipeline.
→ The technique involves only executing certain instructions if certain predicates are true.
→ Branch prediction is typically implemented in hardware using a branch predictor.
→ Branch target conditions resolved at stage 5 means upto 4 stages there are incorrect branch target conditions are there.
→ So Branch condition is resolved at nth stage means, the number of stalls are (n-1)

Answer will be 4

1 vote
1 vote
In branched instr. if target insturction resolved at n stage no. of stall cycle will be (n-1)'
1 vote
1 vote
A given that branch occurs at stage 5 , then 4 stages are wasted as we draw the pipeline stage diagram.
Answer:

Related questions