HW2.sols.09

# HW2.sols.09 - Computer Architecture Homework 2 Due...

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

Computer Architecture Homework 2 Due: Wednesday, September 23, 2009 SOLUTIONS 1. Frequency Instruction type MIPS examples Average CPI gcc spice Avg arithmetic add, sub, addi 1.0 clock cycles 55% 55% 53% data transfer lw, sw, lui 1.5 clock cycles 31% 40% 35.5% conditional branch beq, bne 1.6 clock cycles 11% 7% 9% jump j, jr, jal 1.2 clock cycles 3% 2% 2.5% Effective CPI = (1*.53) + (1.5 * .355) + (1.6 * .09) + (1.2 * .025) = 1.2365 1.24 2. a) Using the above data, with gcc if N instructions are executed: .31N are data transfer (L/S) instructions .55 of L/S instructions are loads, so .55 * (.31N) = 0.1705N are loads This part of the problem assumes that 50% of the loads occur in the load-add pattern that will be replaced (in the new machine) by a single addm instruction, and this .5 * (0.1705N) = 0.08525N instructions will be eliminated T old = N * CPI * CCT T new = N’ * CPI * (1.1*CCT) = (N - .08525N) * CPI * (1.1*CCT) = (1 - .08525) * 1.1 * N * CPI * CCT = (.91475) * 1.1 * T

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 2

HW2.sols.09 - Computer Architecture Homework 2 Due...

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

View Full Document
Ask a homework question - tutors are online