{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

w05-quiz1-solution

# w05-quiz1-solution - ECE 30 Introduction to Computer...

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

ECE 30 Introduction to Computer Engineering Quiz 1 January 19, 2005 Name Solution Student ID Signature Your score out of 1 6 2 6 3 8 Total 20 You may only use the MIPS assembly instructions listed below. Do not use any other instructions! arithmetic add add sub subtract addi add immediate special lui load upper immediate slt set if less than data lw load word from memory transfer sw store word in memory lb load byte from memory sb store byte in memory branch beq branch if equal bne branch if not equal jump j jump jal jump and link jr jump register

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

View Full Document
1. Performance measurement (6 points) The machine P is a 4 GHz implementation of the MIPS R2000 instruction set. Using a large set of scientific computation benchmarks, we have obtained the CPI as follows. frequency CPI Integer arithmetic 30% 0.5 Floating-point arithmetic 20% 3 Load/Store 30% 1.5 Branch/Jump 20% 2 (a) (1 point) What is the average CPI of P ? CPI = 0 . 3 × 0 . 5 + 0 . 2 × 3 + 0 . 3 × 1 . 5 + 0 . 2 × 2 = 0 . 15 + 0 . 6 + 0 . 45 + 0 . 4 = 1 . 6 (b) (1 point) If the total execution time of the benchmark program is 1 second, what is the total number of instructions executed for this benchmark? Recall that the clock rate
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

w05-quiz1-solution - ECE 30 Introduction to Computer...

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

View Full Document
Ask a homework question - tutors are online