in
JNTU World
JN
TU
or
ld
Computer Organization
www.alljntuworld.in
Syllabus:
JNTU World
or
ld
JN
TU
www.alljntuworld.in
JNTU World
or
ld
References
1. C. Hamacher, Z. Vranesic and S. Zaky, "Computer Organization", McGrawHill, 2002.
2. W. Stallings, "Computer Organization and Architecture - Designing for
Performance", Prentice Hall of India, 2002.
3. D. A. Patterson and J. L. Hennessy, "Computer Organization and Design The Hardware/Software Interface", Morgan Kaufmann,1998.
JN
TU
JN
TU
or
ld
www.alljntuworld.in
JNTU World
www.alljntuworld.in
JNTU World
Program Execution
or
ld
TU
JN
JNTU World
JN
TU
or
ld
www.alljntuworld.in
www.alljntuworld.in
JNTU World
or
ld
Application Program
Algorithms
Language
Software
JN
TU
Hardware
IInstruction
t ti Set
S t Architecture
A hit t
(and I/O Interfaces)
Microarchitecture
Circuits
Devices
www.alljntuworld.in
JNTU World
or
ld
TU
weather forecast
forecast, next frame of animation
animation, ...
cell phone, automotive engine controller, ...
JN
power
www.alljntuworld.in
JNTU World
or
ld
Al
Algorithm
ith
Software Design:
choose algorithms and data structures
TU
Programming:
g g to express
p
design
g
use language
JN
Program
Instr Set
A hit t
Architecture
Compiling/Interpreting:
convert language to
machine instructions
JNTU World
or
ld
www.alljntuworld.in
Microarch
Processor Design:
choose structures to implement ISA
JN
Circuits
TU
Logic/Circuit Design:
gates and low-level circuits to
implement components
Devices
www.alljntuworld.in
JNTU World
Problem Statement
or
ld
Algorithm
Program
TU
step-by-step
p y
p procedure,
p
, guaranteed
g
to finish
definiteness, effective computability, finiteness
express the algorithm using a computer language
high-level language, low-level language
JN
www.alljntuworld.in
JNTU World
Microarchitecture
or
ld
Logic Circuits
D i
Devices
TU
JN
www.alljntuworld.in
JNTU World
or
ld
FORTRAN
Jacobi
iteration
C++
Intel x86
TU
Sun SPARC
Gaussian
elimination
Red-black SOR
Pentium II
Pentium III
JN
Ripple-carry adder
CMOS
Bipolar
Java
Compaq Alpha
AMD Athlon
Carry-lookahead adder
GaAs
Multigrid
g
Tradeoffs:
cost
performance
power
(etc.)
www.alljntuworld.in
JNTU World
or
ld
Whats Next
Bits and Bytes
Digital Logic
How do we build a p
processor out of logic
g elements?
What operations (instructions) will we implement?
TU
JN
www.alljntuworld.in
JNTU World
or
ld
A computer is
i a complex
l
system; For analysis,
l i
understanding and design - Identify the
hierarchical nature of most complex system.
system
A hierarchical system
y
is a set of interrelated
subsystems, each in turn, hierarchical in structure;
until at the lowest level we have elementary
subsystems.
b
t
JN
TU
www.alljntuworld.in
JNTU World
or
ld
TU
Structure: The
h way iin which
hi h the
h components are
interrelated.
JN
www.alljntuworld.in
JNTU World
JN
TU
or
ld
JNTU World
Data processing
i
Data storage
Data movement
Control
or
ld
www.alljntuworld.in
TU
Central
C
t l Processing
P
i
Unit
U it (CPU):
(CPU) Controls
C t l the
th operation
ti
off
the computer and performs its data processing functions.
Often simply referred to as processor.
Main Memory: Stores data.
JN
www.alljntuworld.in
JNTU World
or
ld
The major
j
structural components
p
of a CPU are:
Control Unit (CU): Controls the operation of the
C
CPU
and
d hence
h
the
h computer.
TU
JN
CPU Interconnection:
I
i
communication
i
i
among the
h
control unit, ALU, and register.
www.alljntuworld.in
JNTU World
or
ld
Peripherals
JN
Computer
TU
Central
Processing
Unit
Main
M
Memory
Systems
Interconnection
Input
Output
Communication
lines
li
www.alljntuworld.in
JNTU World
or
ld
Computer
Registers
g
I/O
JN
Memory
CPU
TU
System
Bus
Arithmetic
and
Logic Unit
Internal CPU
Interconnection
CPU
Control
Unit
www.alljntuworld.in
JNTU World
or
ld
Sequencing
q
g
Logic
ALU
JN
Registers
Control
Unit
TU
Internal
Bus
Control Unit
CPU
Registers and
Decoders
Of CU
Control
Memory
www.alljntuworld.in
JNTU World
or
ld
Atanasoff Berry
y Computer
p
((1937 - 1938))
solved systems of linear equations.
John Atanasoff and Clifford Berryy of
TU
JN
www.alljntuworld.in
JNTU World
or
ld
TU
IBM 360
DEC PDP-8 and PDP-11
Cray-1
y supercomputer
p
p
JN
www.alljntuworld.in
JNTU World
or
ld
TU
JN
St
Stored-program
d
computers
t
have
h
become
b
known as von Neumann Architecture
systems.
www.alljntuworld.in
JNTU World
or
ld
JN
TU
JNTU World
JN
TU
or
ld
www.alljntuworld.in
IAS (P
(Princeton)
i
t ) computer
t model
d l by
b Von
V Neumanns
N
group.
Downloaded From JNTU World (http://www.alljntuworld.in)
www.alljntuworld.in
JNTU World
or
ld
- An arithmetic-logical
arithmetic logical unit (ALU) capable of operating on
binary data.
TU
JN
- Input
p
and output
p
(
(I/O)
/ ) equipment
q p
operated
p
by
y the
control unit.
www.alljntuworld.in
JNTU World
JN
TU
or
ld
CPU Organization
www.alljntuworld.in
JNTU World
This is a general
depiction of a von
Ne mann s
Neumann
system:
stem
or
ld
JN
TU
These computers
p
employ a fetchdecode-execute
cycle to run
programs as
follows . . .
www.alljntuworld.in
JNTU World
or
ld
JN
TU
Th
The control
t l unit
it fetches
f t h the
th nextt instruction
i t
ti
from
f
memory using the program counter to determine where
the instruction is located.
www.alljntuworld.in
JNTU World
or
ld
JN
TU
Th
The instruction
i t
ti
iis d
decoded
d d into
i t a language
l
that
th t the
th ALU
can understand.
www.alljntuworld.in
JNTU World
or
ld
JN
TU
A
Any d
data
t operands
d required
i d to
t execute
t the
th instruction
i t
ti
are fetched from memory and placed into registers
within the CPU.
www.alljntuworld.in
JNTU World
or
ld
JN
TU
Th
The ALU executes
t the
th instruction
i t
ti
and
d places
l
results
lt in
i
registers or memory.
www.alljntuworld.in
JNTU World
or
ld
JN
TU
Memory
y Buffer Register
g
Memory Address Register
Instruction Register
Instruction Buffer Register
Program Counter
Accumulator
Multiplier Quotient
www.alljntuworld.in
JNTU World
or
ld
Structure of IAS
Central Processing Unit
MQ
TU
Input
Output
Equipment
IBR
JN
IR
Instructions
Main
& Data
Memory
PC
MAR
Control
Circuits
Program
g
Control
Unit
Downloaded From JNTU World (http://www.alljntuworld.in)
Address
MQ - Multiplier/Quotient
www.alljntuworld.in
JNTU World
or
ld
TU
JN
B
But enormous iimprovements iin computational
i
l
power require departure from the classic von
Neumann architecture.
architecture
Adding processors is one approach.
Downloaded From JNTU World (http://www.alljntuworld.in)
www.alljntuworld.in
JNTU World
CPU
Main
Memory
I/O
Module
TU
Console
Controller
or
ld
DEC - PDP-8
PDP 8 Bus Structure
JN
OMNIBUS
I/O
Module
www.alljntuworld.in
JNTU World
Transistor - 1958-1964
or
ld
Very large scale integration: 1978 -1991; 100,000 - 100,000,000 devices on a chip
TU
JN
Multi-core
Multi
core Architectures 2000s ;
Over 100,000,000
100 000 000 devices on a chip
Over 10^9
10 9 devices on a chip
www.alljntuworld.in
JNTU World
or
ld
JN
TU
or
ld
www.alljntuworld.in
JN
TU
www.alljntuworld.in
JNTU World
or
ld
Application Program
Algorithms
Language
Software
JN
TU
Hardware
IInstruction
t ti Set
S t Architecture
A hit t
(and I/O Interfaces)
Microarchitecture
Circuits
Devices
www.alljntuworld.in
Computer Architecture
JNTU World
or
ld
TU
JN
JNTU World
Computer architecture is the conceptual design
and fundamental operational structure of a computer
system It is a functional description of requirements
system.
and design implementations for the various parts of a
p
computer.
or
ld
www.alljntuworld.in
TU
JN
Analogy:
l
building
b ildi
the
h d
design
i
and
d architecture
hi
off
house architecture may take more time due to
planning and then organization is building house by
bricks or by latest technology keeping the basic layout
and architecture of
house
mind.
Downloaded
From JNTU in
World (http://www.alljntuworld.in)
www.alljntuworld.in
JNTU World
or
ld
TU
JN
www.alljntuworld.in
JNTU World
or
ld
TU
JN
www.alljntuworld.in
JNTU World
or
ld
Compiler
I/O System
TU
Processor
Operating System
Software
Hardware
JN
www.alljntuworld.in
JNTU World
or
ld
Memory
Microprocessor
TU
JN
Network Interface
www.alljntuworld.in
S Bridge
S.
or
ld
Power Conn.
Conn
AGP
Processor
PCI Cards
TU
N. Bridge
JN
JNTU World
BIOS ROM
JNTU World
JN
TU
or
ld
www.alljntuworld.in
www.alljntuworld.in
JNTU World
or
ld
- handle
h dl b
bugs and
d errors (b
(bad
d pointers,
i t
overflow
fl
etc.)
t )
- multiple processors, processes, threads
TU
- shared memory
- disk access
JN
www.alljntuworld.in
or
ld
Enhancing Performance
(speed)
Pipelining
On board cache
On board L1 & L2 cache
JN
TU
Branch prediction
Data flow analysis (in compilers)
Speculative execution
Downloaded From JNTU World (http://www.alljntuworld.in)
JNTU World
www.alljntuworld.in
JNTU World
JN
TU
or
ld
www.alljntuworld.in
JNTU World
JN
TU
or
ld
www.alljntuworld.in
Performance Analysis
N *S
T
R
or
ld
JNTU World
R Cycle/sec
y
TU
JN
CPI Cycles
y
p
per Instruction;;
IPC Instructions per cycle = 1/CPI;
www.alljntuworld.in
JNTU World
g A:
e.g.
or
ld
%-age
g elapsed
p
time in CPU:
e.g.
g B:
0.327 0.01
0.45%
75
%-age
g elapsed
p
time in CPU:
TU
90.7 12.9
65%
159
JN
CPU execution
ti ti
time ffor a program =
www.alljntuworld.in
JNTU World
or
ld
TU
JN
A better measure:
Exec _ Time( A)
E _ Time
Exec
Ti ( B)
1 n
Exec _ time Timei
n i 1
seconds
sec onds
d
IInstructio
t ti ns clock
l k cycle
l
d
*
*
program Instruction clock cycle
program
Downloaded From JNTU World (http://www.alljntuworld.in)
www.alljntuworld.in
Performance - SPECS
Graphics/Workstations
MPI/OMP
(Orthogonal Multi-Processor)
Mail Servers
Network File System
SIP
TU
Power
Java Client/Server
or
ld
CPU
JNTU World
JN
www.alljntuworld.in
JNTU World
or
ld
TU
1/ n
SPEC SPECi
i 1
JN
www.alljntuworld.in
Benchmark
104.milc
Language
C
JNTU World
Application Area
Quantum Chromodynamics
107.leslie3d
Fortran
113.GemsFDTD
Fortran
115.fds4
C/Fortran
121 pop2
121.pop2
C/Fortran
122.tachyon
126.lammps
C++
Molecular Dynamics
127.wrf2
C/Fortran
Weather Forecasting
128.GAPgeofem
C/Fortran
129 tera tf
129.tera_tf
Fortran
3D Eulerian Hydrodynamics
or
ld
TU
JN
Computational Electromagnetics
Climate Modeling
Graphics: Ray Tracing
130.socorro
C/Fortran
Molecular Dynamics
132.zeusmp2
C/Fortran
Computational Astrophysics
137.lu
www.alljntuworld.in
JNTU World
or
ld
TU
JN
www.alljntuworld.in
JNTU World
or
ld
Increase in CPU p
performance,, may
y come from three factors:
Increase in clock rate
JN
TU
www.alljntuworld.in
JNTU World
Key terminologies:
or
ld
Control Path
ALU, FPU, GPU etc.
Microcontroller
Pipelining
CPU design
Cache
Von-Neumann architecture
Superscalar
Out-of-order
Out of order execution
Datapath
Register renaming
TU
Multi-core
M lti
(
(computing)
ti )
Dataflow architecture
multi-threading
Stream processing
RISC, CISC
Addressing Modes
Vector processor
Instruction set
JN
www.alljntuworld.in
JNTU World
Flynns taxonomy
MMX instructions
JN
TU
or
ld
SIMD, MIMD
JNTU World
or
ld
www.alljntuworld.in
END of INTRO
JN
TU