Professional Documents
Culture Documents
Master of Information Technology: 1 - CPU Organization
Master of Information Technology: 1 - CPU Organization
Master of Information Technology: 1 - CPU Organization
1 – CPU Organization
Kasun Gunawardana
kgg ‘at’ ucsc.cmb.ac.lk
MIT 1202
4. Data 3. Memory
Representation Organization
Cache
Input Main
Output CU ALU Memory
Registers
15
14
13
12
11
10
Address
9
8
7
6
5
4
3
2
1
0
ess
7
6
5
4
3
2
1
0
0 0
1 1
2 2
3 3
Data 4 4
Or
Instructions 5 5
6 6
7 7
…. ….
M N
8 bits 16 bits
Master of Information Technology 13 February 2023 16
Different Attributes of Memory
• Address Length and Address Range
• Word Size
• Word Addressable
• Byte Addressable
1
𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒 𝑇𝑖𝑚𝑒 =
𝐶𝑙𝑜𝑐𝑘 𝑆𝑝𝑒𝑒𝑑
1
𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒 𝑇𝑖𝑚𝑒 = 𝑠
750,000,000
1
𝑇 = 𝑁𝑜. 𝑜𝑓 𝐶𝑙𝑜𝑐𝑘 𝐶𝑦𝑐𝑙𝑒𝑠 ×
𝐶𝑙𝑜𝑐𝑘 𝑅𝑎𝑡𝑒
• 𝑁 – Number of Instructions
• 𝐶𝑃𝐼 – Average clock cycles per instruction
Machine A Machine B
A - Clock Cycle time 10ns Clock Cycle time 20ns - B
- CPI 2.0 CPI 1.2 -
Which machine is
faster?
• Machine A is fater…!
2 4 1 1 A 1
B 2
C 3
§ Which sequence executes more instructions?
§ Which is faster?
§ Which has lower CPI?
Master of Information Technology 13 February 2023 50
Activity
• Let’s calculate it,
Sequence 1 Sequence 2
Instruction Count 2+1+2 = 5 4+1+1 = 6
2×1 + 1×2 + 2×3 4×1 + 1×2 + 1×3
Total Cycles
= 10 =9