You are on page 1of 1

Homework 1 1. Suppose we have two implementations of the same instruction set architecture (ISA): Machine A and Machine B.

For some program with instruction count I, machine A has a clock cycle time of 200 ps and a CPI of 2.0, machine B has a clock cycle time of 400 ps and a CPI of 1.5. What machine is faster for this program, and by how much? 2. A compiler designer is trying to decide between two code sequences for a particular machine. Based on the hardware implementation, there are three different classes of instructions: Class A, Class B, and Class C, and they require one, two, and three cycles (respectively). The first code sequence has 6 instructions: 1 of A, 3 of B, and 2 of C The second code sequence has 7 instructions: 3 of A, 2 of B, and 2 of C. Which sequence will be faster? How much? What is the CPI for each code sequence? 3. Suppose we have made the following measurements Frequency of FP operations = 25% Average CPI of FP operations = 4.0 Average CPI of other instructions = 1.33 New design: reduce the average CPI of all FP operations to 2. Which design will be faster? 4. Ex 1.13 (text book) 5. Ex 1.14 (text book) 6. Ex 1.15 (text book) 7. Ex 1.16 (text book)

You might also like