Answered step by step
Verified Expert Solution
Question
1 Approved Answer
When counting the number of cycles for a loop, find out when (in which cycle) the first instruction in the loop is fetched and when
When counting the number of cycles for a loop, find out when (in which cycle) the first instruction in the loop is fetched and when it is fetched again (assuming the loop repeats), and then calculate the difference of cycle numbers. The difference is the number of cycles an iteration takes. For example, if the first instruction in a loop is fetched in cycle 1 and fetched again in cycle 11, each iteration takes 10 cycles.
3. (20 points) Performance of deep pipeline. The original machine (the first machine) has a 5-stage pipeline with a 1 ns clock cycle. It experiences a stall due to a data hazard every 5 instructions. The second machine has a 12-stage pipeline with a 0.6 ns clock cycle. It experiences 3 stalls every 8 instructions. Both machines have the same dynamic branch predictor. The misprediction rate is 5%. If the prediction is correct, there is no penalty for branches. The misprediction penalty for 5-stage pipeline is 2 cycles, and that for the 12-stage machine is 5 cycles. Branches constitute 20% of the total instructions. If only data hazards are considered, what is the speedup of the 12-stage pipeline over the 5- stage pipeline? You need to calculate the CPI for each processor first. a) b) If both data hazards and control hazards are considered, what is the speedup of the 12-stage pipeline over the 5-stage pipeline? Again, you need to calculate the CPI for each processorStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started