Computer architecture AVR thanks in advance Consider two di

Computer architecture, AVR, thanks in advance! :)

Consider two different CPUs A and B (machines) with two different instruction sets, and with the same clock rate of 200MHz. The above measurements are recorded on these two machines running a given program.

1. What is the clock period (in ns) of these CPUs?

2. What is the execution time (in ms) on Machine A for this program?

3. What is the execution time (in ms) on Machine B for this program?

4. What is the performance ratio of Machine A over Machine B (i.e., PerformanceA/PerformanceB)?

5. Which machine is better?

6. What is the effective CPI for machine A?

7. What is the effective CPI for machine B? (specify up to 3 decimal points)

8. If Machine B design is improved so that the Arithmetic and Logic instructions now only take 6M instructions instead of 10 as shown in the above table, what will be the \"speed-up\" achieved for Machine B? (specify up to 3 decimal points)

9. A common measure of performance for a processor is the rate at which instructions are executed, expressed as millions of instructions per second (MIPS), referred to as the
MIPS rate. We can express the MIPS rate in terms of the clock rate and CPI as follows: MIPS Rate=Clock Rate/(CPIx10^6).

a) What is the MIPS rate for each machine A above?

b) What is the MIPS rate for machine B?

Instruction type Machine A Arithmetic and logic Load and store Branch Others Machine B Arithmetic and logic Load and store Branch Others Instruction count (millions) Cycles per instruction

Solution

1. Clock Period (in ns)

Given Clock Rate = 200MHz

So Clock Period = 1/ 200MHz

= 5 ns

2.
Execution Time (in ms) on Machine A for this program = Instructions * Cycles per instruction * CPU clock cycle

Cycles Per Instruction = (8 * 1) + (4*3) +( 4* 2) + ( 4 * 3)

= 8 + 12 + 8 + 12 = 40 cycles

So ther are 40 cycles for 20 million instructions

Effective CPI = Total program execution cycles / Instructions count

= 40 / 20
= 2

Execution Time (in ms) on Machine A = 20 * 2 * 5 ns
= 200 ns
= 0.0020 ms

3.
Execution Time (in ms) on Machine B for this program = Instructions * Cycles per instruction * CPU clock cycle

Cycles Per Instruction = (10 * 1) + (8*2) +( 2* 4) + ( 4 * 3)

= 10 + 16 + 8 + 12
= 46 cycles

So ther are 46 cycles for 24 million instructions

Effective CPI = Total program execution cycles / Instructions count

= 46 / 24
= 1.9167

Execution Time (in ms) on Machine B = 24 * 1.9167 * 5 ns
= 230 ns
= 0.0023 ms

4.

(Programs/second)PerformanceA = 1 / Execution TimeA(Seconds/program)
= 1 / 0.002ms


PerformanceB = 1 / Execution TimeB
= 1/ 0.0023 ms

PerformanceA/PerformanceB = 0.0023/0.002 = 1.15


5. Machine A is 1.15 times faster than Machine B. Hence Machine A is better.

6 Effective CPI of A = 2
  
7.Effective CPI of B = 1.916

8. Cycles Per Instruction = (6 * 1) + (8*2) +( 2* 4) + ( 4 * 3)

= 6 + 16 + 8 + 12
= 42 cycles

So ther are 42 cycles for 20 million instructions

Effective CPI = Total program execution cycles / Instructions count

= 42 / 20
= 2.1

Execution Time (in ms) on Machine B = 20 * 2.1 * 5 ns
= 210 ns
= 0.0021 ms

So For machine B, speed up achieved is = 0.0023 - 0.0021 = 0.0002 ms

9.
(a) MIPS Rate A = Clock Rate/(CPIx10^6)
= 200 MHz/ 2 * 10 ^ 6
= 100

(b)MIPS Rate B = Clock Rate/(CPIx10^6)
= 200 MHz / 1.9167
= 104

Computer architecture, AVR, thanks in advance! :) Consider two different CPUs A and B (machines) with two different instruction sets, and with the same clock ra
Computer architecture, AVR, thanks in advance! :) Consider two different CPUs A and B (machines) with two different instruction sets, and with the same clock ra

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site