Clara, now a senior engineer, at C3 (Creative Computer Corporation) is working o
ID: 3735998 • Letter: C
Question
Clara, now a senior engineer, at C3 (Creative Computer Corporation) is working on a new pipelined processor. She has a benchmark that has the following characteristics:
33% ALU instructions,
27% load instructions (15% of loads are followed by instructions that use the data being loaded)
16% store instructions 24% branch instructions (58% of these branches are taken).
This processor’s CPI is 1 (when there are no hazards).
Please answer the following questions:
Considering control and data hazards, please compute the overall CPI. Assume that all branch instructions cause hazards (the penalty is 1 clock cycle).
Explanation / Answer
As all branch instructions causes hazards and its clock cycle is 1. So, CPI is given as:
As there is 1 extra cycle for branch instruction due to hazard. so, total no. of cycles for branch instruction becomes 4.
CPI=(33/100*1)+(27/100*2)+(16/100*2)+(24/100*4)
=2.15
Instructions Percentage No. Of cycle ALU 33 1 Load 27 2 Store 16 2 Branch 24 3