Computer Organization
Computer Organization
Adeel Israr
Consultation
Office:Room 214, EE Department
Email: [email protected]
Consultation Hrs: Thru email or Any time I am not
busy and available in office
TA
Irfan Ullah
Lab Incharge
Khiyam Iftikhar
Books
Text Books:
Computer Organization & Design : The Hardware/Software
Interface By Patterson & Hennessy, Morgan & Kauffman Series
Reference Books:
MIPS Assembly Language Programming by Robert Britton
Computer Organization and Architecture, by William Stallings
Required Background
Ability to program confidently in Java or C
Ability to design a combinational and sequential circuit
Adeel Israr | COMSATS Institute of Information Technology, Islamabad
Next . . .
Welcome to EEE 343
Components of a Computer System
High-Level, Assembly-, and Machine-Languages
Chip Manufacturing Process
Technology Improvements
Programmer's View of a Computer System
Computer
Datapath
Memory
Control
I/O Devices
Input
Control
Processor
B
U
S
Datapath
Output
Disk
Input devices
Output devices
Network
Input Devices
Key Cap
Spring
Mechanical switch
Conductor-coated membrane
Contacts
Membrane switch
10
Output Devices
Cleaning of
excess toner
Charging
Fusing of toner
Heater
Rotating
drum
Light from
optical
system
Rollers
Sheet of paper
Toner
Laser printing
Adeel Israr | COMSATS Institute of Information Technology, Islamabad
11
Memory Devices
Volatile Memory Devices
RAM = Random Access Memory
DRAM = Dynamic RAM
1-Transistor cell + capacitor
Dense but slow, must be refreshed
Typical choice for main memory
12
Track 2
Track 1
Track 0
Arm
Direction of
rotation
Platter
Spindle
13
Sector
Actuator
Recording area
Track 2
Track 1
Track 0
Arm
Direction of
rotation
Platter
Spindle
14
Calculate
Time of one rotation (in milliseconds)
Average time to access a block of 80 consecutive sectors
Answer
Rotations per second = 5400/60 = 90 RPS
Rotation time in milliseconds = 1000/90 = 11.1 ms
Average rotational latency = time of half rotation = 5.56 ms
Time to transfer 80 sectors = (80/200) * 11.1 = 4.44 ms
Average access time = 9 + 5.56 + 4.44 = 19 ms
Adeel Israr | COMSATS Institute of Information Technology, Islamabad
15
Instruction
Cache
Instruction
Program Counter
Next Program
Counter
Registers
A
L
U
Data
Cache
Control
16
Datapath Components
Program Counter (PC)
Contains address of instruction to be fetched
Next Program Counter: computes address of next instruction
Register File
General-purpose registers used for intermediate computations
Buses
Used to wire and interconnect the various components
Adeel Israr | COMSATS Institute of Information Technology, Islamabad
17
Instruction Decode
Execute
Fetch instruction
Compute address of next instruction
Generate control signals for instruction
Read operands from registers
Compute result value
Memory Access
Writeback Result
18
Clocking
Operation of digital hardware is governed by a clock
Clock period
Clock (cycles)
Data transfer
and computation
Update state
19
Next . . .
Components of a Computer System
High-Level, Assembly-, and Machine-Languages
Chip Manufacturing Process
Technology Improvements
Programmer's View of a Computer System
20
21
A Hierarchy of Languages
Application Programs
High-Level Languages
Machine independent
High-Level Language
Machine specific
Low-Level Language
Assembly Language
Machine Language
Hardware
22
Assembly language
Slightly higher-level language
Readability of instructions is better than machine language
One-to-one correspondence with machine language instructions
23
24
Translating Languages
Program (C Language):
A statement in a high-level
language is translated
typically into several
machine-level instructions
$2,$5, 2
$2,$4,$2
$15,0($2)
$16,4($2)
$16,0($2)
$15,4($2)
$31
00051080
00821020
8C620000
8CF20004
ACF20000
AC620004
03E00008
25
Advantages of High-Level
Languages
Program development is faster
High-level statements: fewer instructions to code
26
27
Assembler
Converts assembly language programs into object files
Object files contain the machine instructions
Linker
Combines object files created by the assembler with link libraries
Produces a single executable program
Debugger
Allows you to trace the execution of a program
Allows you to view machine instructions, memory, and registers
Adeel Israr | COMSATS Institute of Information Technology, Islamabad
28
Assembler
Object
File
Source
File
Assembler
Object
File
Linker
Assembler
Object
File
Link
Libraries
Source
File
Executable
File
29
30
Next . . .
Components of a Computer System
Assembly-, Machine-, and High-Level Languages
Chip Manufacturing Process
Technology Improvements
Programmer's View of a Computer System
31
Silicon ingot
Slicer
8-12 in diameter
12-24 in long
20 to 40 processing steps
< 0.1 in thick
Tested dies
Die
Tester
Dicer
Packaged dies
Bond die to
package
Patterned wafer
Individual dies
Ship to
Customers
32
33
26 dies, 15 good
34
35
Next . . .
Components of a Computer System
Assembly-, Machine-, and High-Level Languages
Chip Manufacturing Process
Technology Improvements
Programmer's View of a Computer System
36
Technology Improvements
Year
Technology
1951
Vacuum tube
1965
Transistor
1975
1995
2005
Relative performance/cost
1
35
900
2,400,000
6,200,000,000
37
38
Processor Performance
Slowed down
by power and
memory latency
39
Classes of Computers
Desktop / Notebook Computers
General purpose, variety of software
Subject to cost/performance tradeoff
Server Computers
Network based
High capacity, performance, reliability
Range from small servers to building sized
Embedded Computers
Hidden as components of systems
Stringent power/performance/cost constraints
Adeel Israr | COMSATS Institute of Information Technology, Islamabad
40
Computer Sales
41
Microprocessor Sales
ARM processor
sales exceeded Intel
IA-32 processors,
which came second
ARM processors
are used mostly in
cellular phones
Most processors
today are embedded
in cell phones, digital
TVs, video games,
and a variety of
consumer devices
42
Millions of Units
43
Next . . .
Components of a Computer System
Assembly-, Machine-, and High-Level Languages
Chip Manufacturing Process
Technology Improvements
Programmer's View of a Computer System
44
Software
Application Programs
High-Level Language
Level 5
Assembly Language
Level 4
Operating System
Interface
SW & HW
Level 3
Instruction Set
Architecture
Level 2
Microarchitecture
Level 1
Hardware
Physical Design
Increased level
of abstraction
Level 0
45
Programmer's View 2
Application Programs (Level 5)
Written in high-level programming languages
Such as Java, C++, Pascal, Visual Basic . . .
Programs compile into assembly language level (Level 4)
46
Programmer's View 3
Instruction Set Architecture (Level 2)
Interface between software and hardware
Specifies how a processor functions
Machine instructions, registers, and memory are exposed
Machine language is executed by Level 1 (microarchitecture)
Microarchitecture (Level 1)
Controls the execution of machine instructions (Level 2)
Implemented by digital logic
47