A Simple Computer
A Simple Computer
1
CPU Basics
2
CPU Basics
3
The Bus
This is a point-to-point
bus configuration:
4
The Bus
5
The Bus
6
The Bus
7
A Simple Processor
8
A Simple Processor
9
Simple Processor
10
A Simple Processor
11
A Simple Processor
12
A Simple Processor
13
A Simple Processor
14
A Simple Processor
15
A Simple Processor
16
A Simple Processor
17
A Simple Processor
19
A Simple Processor
MAR X
MBR M[MAR]
AC AC + MBR
20
A Simple Processor
21
Instruction Processing
22
Instruction Processing
23
A Simple Program
24
A Simple Program
25
A Simple Program
26
A Discussion on Assemblers
27
A Discussion on Assemblers
28
A Discussion on Assemblers
29
A Discussion on Assemblers
30
Extending Our Instruction Set
31
Extending Our Instruction Set
MAR X
MBR M[MAR]
MAR MBR
MBR M[MAR]
AC AC + MBR
32
Extending Our Instruction Set
AC 0
• We put our new instructions to work in the program
on the following slide.
34
Extending Our Instruction Set
35
A Discussion on Decoding
36
A Discussion on Decoding
MAR X
MBR M[MAR]
AC AC + MBR
37
A Discussion on Decoding
38
Real World Architectures
What was the largest memory that the 8086 could address?
39
Real World Architectures
40
Real World Architectures
41
Real World Architectures
42
Real World Architectures
43
44
Fetch memory cycle and Control Signals
• No of Cycles = 3+ 2 = 5
• Assuming Fetch takes 3 clock cycles
46
Store X
• MBR AC AcToBus, MbrLd
• M[MAR] MBR MbrToBus, Write
• No of Cycles = 3 + 2 = 5
47
Add X
• MBR M[MAR] MEMtoBus,MbrLd
• AC AC + MBR AccPlus , AcLd
• 3+2 = 5 Cycles
48
Subt X
• MBR M[MAR] MEtoBus, MbrLd
• AC AC + MBR AccMinus , AcLd
• 3 + 2 Cycles
49
Jump X
• MBR M[MAR] MEMtoBus, MbrLd
• PC MBR MbrToBus , PcLd
• 3 + 2 cycles
50
Skipcond
• If IR[11 - 10] = 00 then
• If AC < 0 then PC PC + 1
• else If IR[11 - 10] = 01 then
• If AC = 0 then PC PC + 1
• else If IR[11 - 10] = 11 then
• If AC > 0 then PC PC + 1
• 3 Cycles
51
AddI x
• MBR M[MAR] MEMtoBus, MBRLd
• MAR MBR MBRtoBus,
MARLd ,Read
• MBR M[MAR] MEMtoBus, MBRLd
• AC AC + MBR Plus, AcLd
• 3+ 4 = 7 cycles
52
• A CPU is just a finite state machine, by
specifying the states and their micro-
operations,
58
Control signals required and
states
• Read = Fetch1 v Fetch3 v AddI2
• PCtoBus = Fetch1
• MARLd = Fetch1 v Fetch3 v AddI2
• MEMtoBus = Fetch2 v Add1 v Store1 v
Jump1 v AddI1 v AddI3
• IRLd = Fetch2
• IRtoBus = Fetch3
59
Real World Architectures
60
Conclusion
61
Conclusion
62
End of Chapter 4
63