• retagged by
2,138 views
1 1 vote

x

2 Answers

1 1 vote

for first machine -

there will be 1 delay slot for branch instruction weather a branch will be taken or not but because 70% of time it will get filled by useful instruction so only 30% of time we have to pay branch penalty. there for cpi will be

CPI = 1 + 0.2x0.3 = 1.06 

for second machine- 

cpi = 1 + 0.2x0.35x2 = 1.14

0 0 votes

I'm not sure of the explanation however here is a try

For machine 70% of the delay slots are utilized so only 30% actually causes stalls. So taking stalls caused in machine 1 as

1(stage in which address is resolved -1 )*0.30≐.30 stalls/instruction.

Now  avg stall created is

0.30*.20*.35≐0.021

therefore cpi≐1.021

For machine 2

avg stall created ≐ 2*.20*.35≐0.14

therefor cpi≐1.14

Hope it helps..:)

Position:
Show:

Related questions

0 0 votes
1 1 answer
1.5k
1.5k views
bts1jimin asked Oct 3, 2018
1,517 views
Is branch prediction in pipelining im Co and architecture part of gate syllabus?
1 1 vote
1 1 answer
1.2k
1.2k views
paarthsinghrathore asked Aug 18, 2023
1,178 views
Consider the following sequence of instructions for a pipelined processor with one branch delay slot: I1 LABEL: ADD R3 ← R3 + 1I2 DIV R2 ← R2/R6I3 ...
0 0 votes
1 1 answer
1.1k
1.1k views
Raj Singh 1 asked Jan 9, 2019
1,140 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...
1 1 vote
1 1 answer
10.2k
10.2k views
Akriti sood asked Nov 3, 2016
10,241 views
can someone explain the diff between conditional and unconitional branch with some pipeline diagram or example??