Question: Problem 2: Why Not Both? (20 points) What is the CPI for the following schemes? a) Detect-and-stall for control and data hazards [5] b) Speculate-and-squash
Problem 2: Why Not Both? (20 points)
What is the CPI for the following schemes?
a) Detect-and-stall for control and data hazards [5]
b) Speculate-and-squash (always taken) for control hazards and detect-and-forward for data hazards [5]
c) Speculate-and-squash (always taken) for control hazards and detect-and-stall for data hazards [5]
d) Local 2-bit branch predictor for control hazards and detect-and-stall for data hazards [5]

![the following schemes? a) Detect-and-stall for control and data hazards [5] b)](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3d5145b29b_82766f3d513f0bd9.jpg)
For Problems 1 & 2, reference the following piece of assembly code lW nor loop beq posl negl count 4 done 1 //beqe nor3 nor 4 beq //beq1 even add6 beq e even add 7 else add 3 beq e else //beq2 1 loop //beq3 done halt count .fill 5 pos1 .fill 1 neg1 .fill -1 For Problems 1 & 2, reference the following piece of assembly code lW nor loop beq posl negl count 4 done 1 //beqe nor3 nor 4 beq //beq1 even add6 beq e even add 7 else add 3 beq e else //beq2 1 loop //beq3 done halt count .fill 5 pos1 .fill 1 neg1 .fill -1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
