Documente Academic
Documente Profesional
Documente Cultură
3/2/2004
Section 5
Page 5-1
Basic Computer
Organization and
Design
z
z
z
z
z
z
Slides with white background courtesy of Mano text for this class
1
Instruction Code
z
Instruction format
AC accumulator
4-bit op code
12-bit address (for 212 = 4096 memory words)
Address Types
z
Immediate
Direct
Indirect
Actual
data value
Memory
Memory
z
z
5
3/2/2004
Page 5-2
10
Common Bus
Load (LD)
Increment (INR)
Clear (CLR)
z
z
z
z
z
11
12
3/2/2004
Accumulator (AC)
Page 5-3
z
z
output of AC
data register (DR)
8-bit input register (INPR)
16-bit
Output
16-bit
E
Timing Is Everything
Input
16-bit
13
input of AC
flip-flop (extended AC bit, aka overflow)
14
Bus Connections
16
Instruction Format
z
z
z
z
17
18
3/2/2004
Basic Instructions
Page 5-4
19
Control Unit
z
z
z
20
Control Unit
22
Timing Diagram
23
24
3/2/2004
Instruction Cycle
z
z
z
Page 5-5
z
z
z
T0: AR PC
T1: IR M[AR],
PC PC + 1
T2: D0,D7 decode IR(12-14),
AR IR(0-11),
I IR(15)
25
Fetch Phase
26
27
Instruction Paths
z
z
z
z
D7IT3:
D7IT3:
D7IT3:
D7IT3:
28
Register-Reference Instructions
AR M[AR]
Do nothing
Execute a register-reference instruction
Execute an I/O instruction
29
30
3/2/2004
Page 5-6
AND to AC
Memory-Reference Instructions
z
z
D0T4: DR M[AR]
D0T5: AC AC DR, SC 0
31
ADD to AC
z
z
32
LDA: Load AC
D1T4: DR M[AR]
D1T5: AC AC + DR, E Cout, SC 0
z
z
D2T4: DR M[AR]
D2T5: AC DR, SC 0
33
STA: Store AC
z
35
34
D4T4: PC AR, SC 0
36
3/2/2004
Page 5-7
BSA Example
37
z
z
Memory-Reference Instructions
38
If value = 0, increment PC
D6T4: DR M[AR]
D6T5: DR DR + 1
D6T6: M[AR] DR, SC 0,
if (DR = 0) then (PC PC + 1)
39
Initially cleared to 0
40
41
Initially set to 1
FGO set to 1
More output can now be sent from computer
42
3/2/2004
Input-Output Configuration
Page 5-8
Input-Output Instructions
43
Interrupt Flowchart
44
46
Interrupt Cycle
z
47
48
3/2/2004
Page 5-9
Two decoders
z
z
DR bits 0 through 15
Check if DR = 0
49
50
AR Control Gates
z
z
51
AR Control Gates
52
53
54
3/2/2004
Page 5-10
55
56
S0 = x1 + x3 + x5 + x7
S1 = x2 + x3 + x6 + x7
S2 = x4 + x5 + x6 + x7
z
z
57
58
AC Control Gates
z
59
3/2/2004
AC Control Gates
61
63
Page 5-11
62