You are on page 1of 3

Tutorial 2

the clock rate


->

total
instructions

effective (PI = CPIx freq

freq -
Instruction/ total instruction

Anithmetic: Point:
Integer Floating
eCP1 =
(45,000/100,000)
1 x eCPI =

2 x (15,000/100,000)
0.45
=>
=0.30

transfer:
Bata control transfer

eCPI 2
=

(32,000/100,000)
x 2CPI 2 x (8000/100,000)
=

=
0.64 => 0.16

(PI 0.45 + 0.64 0.30 0.16


effective
=
+ +

=
1.55

MIPS rate: instruction count/execution time


execution CPU time instruction countx(PI/clock rate
= =

time

execution 100,000
=
1.55
x =
1.9375ms.
time
80,000,000

MIPS rate 100,000


=

1.9375

51.61
=>
2. clock rate 100 MHz =

Total instruction 10,000,000


=

execution time 0.255 =

crutine instruction
-
count xCPI/clock rate
0.25 = 10,000,000 xCP1/(100 x 10"
CP1 =
0.25 x (100 x 183)
10,000,000

CP1 2.5
=

MIPS instruction count/execution time


=
x 10
MIP3 10,000,000/ (0.25x10%)
=

MIPS 48 =

-
P is not superscalar because (PIis<1

3. Clock rate 50MHz =


(P)
clock rate =
75 MHz (P')

a. how fast p'thanp?


75/50 1.5
=

microprocessor p'is times


1.5
faster

MIPSP:instruction count/execution time (a)


p:instruction /X

MIPS p':
instruction/(n/1.5)
p' 1.5p
=

b. The suppose improvement time 250/1.5


=

1675
=
4.

1) CPU clock cycles instruction -


x CPI

CPU clock cycles A ix2 =

CPU clock cycles B i = 1.2


x

2) Calculate CPU time

CPU time CPU clock cycles/clock


=
rate

CPU time A (ix2) =

250ps
x

500ps
=>

CPU time B (i x
1.2)
x500ps
=

=600ps

cutimeB
388
=
1.2
=

CPU time A

-CPUA
is 1.2 times
faster than B

5.

Total CPU clock cycles of A (2 x 1)


=
+ (1x2) + (2x 3)
10
-

Total CPU clock cycles of B (4x1)


= + (1x2) ((x 3)
+

9
=

5 10
=
1.1
=

-code A
is 1.11 times faster than code 3

for the CPI:

effective (P1 n.
=
of cycles/frequency (instruction/ total instructions)

<Plcode A
1
=
=
2

1
CPI code B = 1.5
=

You might also like