You are on page 1of 4

EE 204 — Computer Architecture

Assignment #1

Name: Section: ID:

Assignments are to be done individually. No late assignments will be accepted. Print this
assignment and solve it on these sheets. Submit your assignment in class on the day that
it is due. You are to hand in at the start of class.

1. A processor M has a clock rate of 200MHz and program P is executing on M. The instruction
types, the cycles per instruction and the percentage of instructions of each type in P are
shown below.

Instruction Type Cycles per instruction P Instructions (in %)


Integer Arithmetic 1 55%
Load/Store 4 30%
Floating Point 3 10%
Branch/Jump 2 5%

(a) Calculate the CPI of the program P when executed on processor M.

(b) How much time will it take to execute P on processor M? Assume that P contains a
million instructions.

(c) We want to design a processor N which can execute program P in 4ms. Assuming that
N would take the same number of cycles as M to execute P, what should be the clock
rate of N?

(d) We now want to design a new processor T. Newer technology enables us to reduce the
CPI of Load/Store instructions. How many times faster do we need to make Load/Store
instructions to make machine T run program P at-least 60% faster than M? (What
should be the new CPI for Load/Store instructions to meet the performance demand?)
2. You are running a benchmark on your company’s processor, which runs at 200 MHz, and has
these characteristics:

Instruction Type Frequency (%) Cycles


Arithmetic and Logical 40% 1
Load and Store 30% 2
Branches 20% 3
Floating Point 10% 4

Your company is considering offering a cheaper, lower-performance version of the processor.


Their plan is to remove some of the floating point hardware to reduce the die size of the chip.
After the changes, the floating point instructions will take 12 cycles to execute.

(a) What is the CPI and MIPS rating of the original processor?

(b) What is the CPI and MIPS rating of the smaller processor?

Your competitors produce a chip that runs at 250 MHz and has the following character-
istics for the benchmark:
Instruction Type Frequency (%) Cycles
Arithmetic and Logical 40 1
Load and Store 30 3
Branches 20 3
Floating Point 10 5

(c) What is the CPI and MIPS rating of your competitor’s processor for this benchmark?
(d) Your company’s advertising department wants to defend your company’s motto (The
Appearance of Excellence) by advertising a higher MIPS rating for your processor than
your competitor’s processor. They want you to write a benchmark that gives this result.
Describe an instruction mix that would accomplish this (give specific percentages of each
instruction type).

(e) Instead, you decide to improve the compiler that is used to compile this benchmark
on your processor. Your compiler reduces the branches by 50%, but it increases the
number of arithmetic and logical instructions by 25%; it does not affect the number of
other instructions. What is your new CPI and MIPS?

(f) Using the original instruction mix, which machine is faster? Why?
3. A designer wants to improve the overall performance of a given machine with respect to a tar-
get benchmark suite and is considering an enhancement X that applies to 50% of the original
dynamically-executed instructions, and speeds each of them up by a factor of 3. The designers
manager has some concerns about the complexity and the cost-effectiveness of X and suggests
that the designer should consider an alternative enhancement Y. Enhancement Y, if applied
only to some (as yet unknown) fraction of the original dynamically-executed instructions,
would make them only 75% faster. Determine what percentage of all dynamically-executed
instructions should be optimized using enhancement Y in order to achieve the same overall
speedup as obtained using enhancement X.

Honor Policy
This assignment is a individual learning opportunity that will be evaluated based on your ability
to think independently, work through a problem in a logical manner solve the problems on your
own. You may however discuss verbally or via email the general nature of the conceptual
problem to be solved with your classmates or the course instructor, but you are to complete the
actual assignment without resorting to help from any other person or other resources that are
not authorized as part of this course. If in doubt, ask the course instructor. You may not use
the Internet to search for solutions to the problem.

You might also like