Documente Academic
Documente Profesional
Documente Cultură
Lesson 3
Annalisa Massini - 2014/2015
2014/2015
Two lessons
2014/2015
What is a computer?
A computer was a job title, not a piece of equipment!
Requirements of a computer:
Process data
Store data
Move data between the computer and the outside world
Control the operation of the above
2014/2015
2014/2015
Data processing
Data storage
Data movement
Control
2014/2015
ENIAC - background
Electronic Numerical Integrator And Computer
Eckert and Mauchly - University of Pennsylvania
Trajectory tables for weapons
Started 1943 - Finished 1946 - Used until 1955
Decimal (not binary) - 20 accumulators of 10 digits
Programmed manually by switches
18,000 vacuum tubes
30 tons - 15,000 square feet
140 kW power consumption
5,000 additions per second
2014/2015
von Neumann/Turing
Stored Program concept
Main memory storing programs and data
ALU operating on binary data
Control unit interpreting instructions from memory and
executing
Input and output equipment operated by control unit
Princeton Institute for Advanced Studies - IAS
Completed 1952
2014/2015
2014/2015
IAS
Binary number
2 x 20 bit instructions
10
2014/2015
Structure of IAS
11
2014/2015
Generations of Computer
2014/2015
Computer
Central
Processing
Unit
Computer
Main
Memory
Systems
Interconnection
Input
Output
Communication
lines
13
2014/2015
Arithmetic
and
Login Unit
Registers
I/O
System
Bus
Memory
CPU
Internal CPU
Interconnection
Control
Unit
14
2014/2015
Components
Input/output
Main memory
15
ALU
Registers
Internal data pahs
External data paths
Control Unit
Advanced and Parallel Architectures
2014/2015
Sequencing
Login
ALU
Internal
Bus
Registers
Control
Unit
Control Unit
Registers and
Decoders
Control
Memory
16
2014/2015
Functional Requirements
17
2014/2015
18
2014/2015
Processor level
19
Interfaces
Instruction sets
Data Representation
2014/2015
Register level
Primitives
Registers
Counters
Memories
ALUs
Clocks
20
2014/2015
Functional View
21
2014/2015
22
2014/2015
Operations - Storage
23
2014/2015
24
2014/2015
25
2014/2015
Observations
2014/2015
Observations
27
2014/2015
What is a program?
A sequence of steps
For each step, an arithmetic or logical operation is done
For each operation, a different set of control signals is
needed
For each operation a unique code is provided
28
2014/2015
Micro-Operations
see pipelining
Called micro-operations
Each step does very little
Atomic operation of CPU
29
2014/2015
Computer Components:
Top Level View
30
2014/2015
Instruction Cycle
Two steps:
31
Fetch
Execute
2014/2015
Fetch Cycle
32
2014/2015
Execute Cycle
Processor-memory
Processor I/O
Control
Data processing
Combination of above
33
2014/2015
Control unit
34
2014/2015
35
2014/2015
36
2014/2015
Types of Micro-operation
37
2014/2015
Sequencing
Execution
38
2014/2015
Control Signals
Clock
Instruction register
Flags
State of CPU
Results of previous operations
39
Interrupts
Acknowledgements
Advanced and Parallel Architectures
2014/2015
Within CPU
40
To memory
To I/O modules
2014/2015
41
2014/2015
Internal Organization
42
2014/2015
Hardwired Implementation
Clock
43
2014/2015
44
2014/2015
45
2014/2015
Micro-programmed Control
46
2014/2015
Implementation
47
2014/2015
Micro-instruction Types
(vertical micro-programming)
48
(horizontal micro-programming)
2014/2015
Organization of
Control Memory
49
2014/2015
Control Unit
50
2014/2015
51
2014/2015
52
2014/2015
Instructions
53
2014/2015
54
2014/2015
Elements of an Instruction
To this
Do this
55
2014/2015
Instruction Representation
56
ADD A,B
2014/2015
Instruction Types
Data processing
Data storage (main memory)
Data movement (I/O)
Program flow control
57
2014/2015
Number of Addresses
2 addresses
0 addresses
58
2014/2015
More addresses
Fewer addresses
59
2014/2015
Design Decisions
Operation repertoire
Data types
Instruction formats
Registers
How many ops? What can they do? How complex are they?
Addressing modes
RISC v CISC
60
2014/2015
Types of Operand
Addresses
Numbers
Characters
ASCII etc.
Logical Data
Integer/floating point
Bits or flags
61
2014/2015
Instructions execution
62
2014/2015
Instruction Cycle
Two steps:
63
Fetch
Execute
2014/2015
Fetch Cycle
64
2014/2015
Execute Cycle
Processor-memory
Processor I/O
Control
Data processing
Combination of above
65
2014/2015
66
2014/2015
67
2014/2015
Instruction Cycle
68
00: Fetch
01: Indirect
10: Execute
11: Interrupt
Advanced and Parallel Architectures
2014/2015
Interrupts
Timer
I/O
Hardware failure
69
2014/2015
Multiple Interrupts
Disable interrupts
Define priorities
70
2014/2015
Interrupt Cycle
71
2014/2015
72
2014/2015
73
2014/2015
74
2014/2015
75
2014/2015
76
2014/2015
Addressing Modes
Immediate
Direct
Indirect
Register
Register Indirect
Displacement (Indexed)
Stack
77
2014/2015
Immediate Addressing
78
2014/2015
Direct Addressing
Instruction
Address A
Memory
Operand
79
2014/2015
Indirect Addressing
Instruction
Address A
Memory
Pointer to operand
Operand
80
2014/2015
Register Addressing
Instruction
Register Address R
Registers
Operand
81
2014/2015
Register Address R
Memory
Registers
Pointer to Operand
82
Operand
2014/2015
Displacement Addressing
EA = A + (R)
Address field hold two values
A = base value
R = register that holds displacement
or vice versa
Instruction
Opcode
Register R
Address A
Memory
Registers
Pointer to Operand
83
Operand
2014/2015
Relative Addressing
84
2014/2015
Base-Register Addressing
A holds displacement
R holds pointer to base address
R may be explicit or implicit
e.g. segment registers in 80x86
85
2014/2015
Indexed Addressing
A = base
R = displacement
EA = A + R
Good for accessing arrays
86
EA = A + R
R++
2014/2015
Instruction Formats
87
2014/2015
Instruction Length
Memory size
Memory organization
Bus structure
CPU complexity
CPU speed
88
2014/2015