CmpE 110 Homework Set 1:

Due Oct 6, 2003

A new processor, the Di Blas XMA 3000 processor is about to arrive out on the CPU market.  The marketing department wants to give an honest representation of the processor to the public, because they are confident it will perform well.  They decide to use a brand new benchmark, that is capable of giving an accurate system performance relative to a reference machine X.  This benchmark can be determined based on the running time results of one program.  Below are the statistics for the two machines.

Machines / CPI s   Load / Store Instructions     Branch/ Jump Instructions  Basic Arithmetic / logic Instructions  Complex arithmetic instructions
Reference Machine X  2.5 GHZ 4 2 3 8
Di Blas XMA 3000  3.0 GHZ 3 1 3 9

*Complex arithmetic instructions are things like multiplication and division

Here are the statistics for the Benchmark Program

Program length is 10,000 instructions

Load / Store instructions 50%
Branch / Jump instructions 10%
Basic Arithmetic/ Logic instructions 20%
Complex arithmetic instructions 20%

Assumptions to make about the program:

1.) It fits entirely in main memory, so no extended waiting is needed to bring pieces in from memory

2.) The program is not interrupted, it runs completely start to finish (ie no "other" time, and no "system time")

3.) Assume no loops, the program will run through the instructions once

4.) For reasons of simplification, the percentage of each instruction mix is EXACT

Questions

1.) What is the clock period of each processor?  (1/2 point for each processor)

A) Reference machine X: Clock period = 1 / Frequency = 1 / 2.5 e9 (GHz) = .4 e-9 or .4 nanoseconds or 400 picoseconds

B) DiBlas XMA 3000: Clock period = 1 / Frequency = 1 / 3 e9 (GHz) =  .333 nanoseconds or .33333 e-9 or 333 picoseconds

2.) What is the average CPI for the bench program on each processor? (2 points total)

A) Reference Machine X: Average CPI =  4 * 0.5 + 2 * 0.1 + 3 * 0.2 + 8 * 0.2 = 4.4 CPI

B) DiBlas XMA 3000: Average CPI = 3* 0.5 + 1 * 0.1 + 3 * 0.2 + 9 * 0.2 = 4.0 CPI

3.) What is the total running time of the program on each processor? (2 points)

A) Reference Machine X: Total Running time = 10,000 I * 4.4 CPI * .4 e-9 SPC (seconds per Cycle) = 17.6 microseconds

B) DiBlas XMA 3000: Total Running Time = 10,000 I * 4 CPI * .333 e-9 SPC (seconds per cycle) =  13.3 microseconds

4.) What is the speed performance ratio of the Di Blas XMA 3000 vs the Reference X machine? (1 point)

Performance of DiBlas XMA 3000 relative to Reference Machine X = Total Time on Machine X / Total time on DiBlas XMA 3000

                                                                                                                   = 17.6 e-6 / 13.3 e-6 = 1.3233

5.) Just before the marketing department starts there ad campaign, the compiler department is able to simplify complex arithmetic instructions.  This is done by replacing each complex instruction with 2 arithmetic instructions. Note* this is really not feasible 

On this problem you must reconfigure the average CPI for the DB XMA 3000.  First you must note that you are replacing the 2000 Complex arithmetic instructions with 4000 basic instructions.  You then must recalculate the instruction mix averages to be out of 12000 instructions instead of 10000.

New % mixes are : L/S =   41.6666% B/J = 8.333 %  Basic Arithmetic = 50%

A. )  What is the new average CPI for the benchmark program for the DiBlas XMA 3000? (1 points)

Average CPI = 3 *0.41666 + 1 * 0.083333 + 3 * 0.5 =  2.833333 CPI

B.)   What is the new running time of the program on each processor? (1 point)

New Total Running Time = 12000 I * 2.8333 CPI * .333e-9 SPC = 11.3 microseconds

C.) What is the new speed performance ratio? (1 point)

Performance of DiBlas XMA 3000 relative to Reference Machine X = Total Time on Machine X / Total Time on DiBlas XMA 3000

                                                                                                                   = 17.6e-6 / 11.3e-6 = 1.5575

Notes: There will be no more complex arithmetic instructions for the processor to worry about, however there are more instructions in the program, so percentages should be recomputed.