InClassActivity12-sol - 9:33 PM Activity#12(Solution...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
3/2/03 9:33 PM ECSE-2660 Computer Architecture, Networks, & Operating Systems, Spring 2003 Page 1 of 2 Activity #12 (Solution) Activity 12.1 Branch penalties For the following questions, use the following data: Instruction Mix Instruction Type Usage Frequency Loads 15% Stores 11% R-type 50% Jumps 9% Conditional Branches 15% Additional Data 35% of load instructions are followed immediately by an instruction that uses the loaded result (i.e., causes a load-use data hazard that costs an extra cycle); 40% of store instructions are preceeded immediately by an instruction that calculates the value to be stored (i.e., causes a store-use data hazard that costs an extra cycle); Jumps always take 3 cycles Cycle time = 1.5 ns a. (24 points) Calculate the CPI for this machine assuming that the CPU is stalled for 3 cycles for each branch instruction, i.e. branch penalty is 3 cycles. Hint: For such questions that involve averages with weighted trees, it is convenient to use a “decision-tree table”: Instruction Weight Cycles Weighted cycles Loads 0.15 Hazard 0.35 2 0.15 x 0.35 x 2 = 0.1050 No Hazard 0.65 1 0.15 x 0.65 x 1 = 0.0975 Stores 0.11
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 2

InClassActivity12-sol - 9:33 PM Activity#12(Solution...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online