You are on page 1of 3

CS2323: Computer Architecture, Autumn 2022

Homework-1: Processor Performance and IC Manufacturing


Bonila Sai Likhith
ES19BTECH11024
-------------------------------------------------------------------------------------------------------------------------------

1. Consider two processors P1 and P2 operating at frequencies 1 GHz and 2 GHz, respectively.
P1 has an average cycle per instruction (CPI) of 2 while P2 has an average CPI of 3.4.
A high-level language program, when compiled for P1 and P2 produces 2x10 10 and 3x1010
instructions, respectively. Answer the following:
a. Which processor is faster and by how much
Given:
For P1:- CPI = 2
Clock rate = 1GHz
Instructions = 2x1010
CPU time P1 = (2 x 2 x 1010) / (1 x 109)
= 40s

For P2:- CPI = 3.4


Clock rate = 2GHz
Instructions = 3x1010
CPU time P2 = (3.4 x 3 x 1010) / (2 x 109)
= 51s

So we can clearly see that P1 is faster than P2.


And it is 1.275 (51/40) times faster.

b. What is the total execution time of the given program on the faster processor
Already mentioned in the previous question P1 has faster execution time = 40s.

c. If a new processor P3 is developed having a CPI of 1.5, what should be its frequency
such that it takes the same time to execute the given program as taken by the faster
processor. For P3, assume the number of instructions to be the same as that of the
faster processor.
We know that (Instructions x CPI) / (CPU time) is the clock rate.
therefore : (2 x 1010 x 1.5) / (40) = 0.75 x 109 = 0.75 GHz

2. Consider a processor operating at 2 GHz frequency. There are two compilers C1 and C2,
which generate machine code for this processor. The fraction of different types of instructions
generated by these compilers is shown in the table below. It is also known that C1 generates
1.2 times more instructions than C2.
Instruction type CPI Fraction of Fraction of
instr for C1 (%) instr for C2 (%)
Basic ALU 1 70 50
Load/Store 3 10 30
Others 4 20 20

Answer the following questions w.r.t. the given processor and the compilers.
a. Which compiler would generate a code with better performance.
Let number of instructions generated by: C2 = I; C1= 1.2I

Average CPI for C1 = (0.7 x 1.2I x 1 + 0.1 x 1.2I x 3 + 0.2 x 1.2I x 4) / (1.2I)= 1.8
Number of clock cycles for C1 :- Average CPI x Instructions = 1.8 x 1.2I = 2.16I cycles

Average CPI for C2 = (0.5 x 1 x I + 0.3 x 3 x I + 0.2 x 4 x I) / (I) = 2.2


Number of clock cycles for C2 :- Average CPI x Instructions = 2.2 x I = 2.2I cycles

Compiler C1 has better performance than Compiler C2.

b. What is the CPU execution time of the code generated by C1, if the total number of
instructions generated by C2 is 107
Given:
Instructions for C1 = 1.2 x 107
CPU time = (Instructions x Average CPI) / (Clock rate)
= (12 x 106 x 1.8) / (2 x 109)
= 10.8 ms
Therefore the CPU time should be 10.8

3. A wafer of diameter 18 cm is used for manufacturing 11mm x 12mm rectangular dies. The
wafer is processed using a manufacturing process having a defect rate of 0.04 defects/cm2. The
cost of processing each wafer is USD 200. Answer the following questions (assume that there is
no wafer area wastage due to corners):
We know that
Yield = 1 / (1 + (Defects per Area x Die Area / 2)) 2
No. of Dies = Wafer Area / Die Area
Cost = Cost per Wafer / (Dies per wafer x yield)
Given: diameter: 18 cm
rectangular dies: 11mm x 12mm
So die area= 11 x 12

a. What is the yield of the manufacturing process


Therefore the Yield is 1 / (1 + (Defects per Area x Die Area / 2)) 2
= 1 / (1 + (0.04 x 1.1 x 1.2/2))2
= 1 / (1 + 0.0264)2
= 1 / 1.0534
= 0.9493
b. What is the number of dies per wafer
No. of Dies = Wafer Area / Die Area
= (3.14 x 90 x 90) / (11 x 12)
= 25434 / 132
= 192.6818
So we Approximate it to 193.

c. What is the cost per die


Cost = Cost per Wafer / (Dies per wafer x yield)
= 200 / (193 x 0.95)
= 200 / 183.35 = 1.09080
Therefore 1.090 USD is the cost!

You might also like