Академический Документы
Профессиональный Документы
Культура Документы
Reading: Chapter 8
Introduction
Seatbelt
3-tap FIR filter
warning light
program
program
e 3
2
1
0
2x4
Instruction
memory I
x(t)
xt0
Seatbelt warning
light single-purpose
processor
x(t-1)
c0
xt1
c1
xt2
c2
PC
IR
reg
n-bit
2x1
Register file
RF
Controller
Control unit
Data memory D
x(t-2)
Other
programs
ALU
Datapath
General-purpose processor
Basic Architecture
Data memory D
n-bit
2x1
Register file RF
ALU
Datapath
3
connected
to the
outside
world
operation (ADD, SUB, AND, OR, etc.), and writing back into RF.
Store operation: Stores RF register value back into data memory
Each operation can be done in one clock cycle
Data memory D
Data memory D
Data memory D
n-bit
2x1
n-bit
2x1
n-bit
2x1
a
Register file RF
Register file RF
Register file RF
ALU
ALU
ALU
ALU operation
Store operation
Load operation
Q: Which
Data memory D
Data memory D
Data memory D
n-bit
2x1
n-bit
2x1
n-bit
2x1
Register file RF
Register file RF
Register file RF
ALU
ALU
ALU
ALU operation
Store operation
Load operation
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
Data memory D
n-bit
2x 1
PC
IR
Register file RF
Controller
ALU
Control unit
Datapath
PC
01
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
IR
RF[0]=D[0]
PC
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
Data memory D
D[0]: 99
IR
RF[0]=D[0]
PC
1
Controller
n-bit
2x 1
IR
RF[0]=D[0]
Register file RF
R[0]: ?? 99
Controller
Control unit
(a)
Fetch
7
"load"
Controller
Control unit
(b)
Decode
ALU
Datapath
Control unit
Execute
(c)
PC
12
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
IR
RF[1]=D[1]
PC
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
Data memory D
D[1]: 102
IR
RF[1]=D[1]
PC
2
Controller
n-bit
2x 1
IR
RF[1]=D[1]
Register file RF
R[1]: ?? 102
Controller
Control unit
(a)
Fetch
8
"load"
Controller
Control unit
(b)
Decode
ALU
Datapath
Control unit
Execute
(c)
PC
23
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
IR
RF[2]=RF[0]+RF[1]
PC
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
Data memory D
IR
RF[2]=RF[0]+RF[1]
PC
3
Controller
IR
RF[2]=RF[0]+RF[1]
Register file RF
R[2]: ?? 201
Controller
Control unit
(a)
Fetch
9
"ALU (add)"
99
Controller
Decode
ALU
Datapath
Control unit
Execute
102
201
Control unit
(b)
n-bit
2x 1
(c)
PC
34
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
IR
D[9]=RF[2]
PC
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
Data memory D
D[9]=?? 201
IR
D[9]=RF[2]
PC
4
Controller
n-bit
2x 1
IR
D[9]=RF[2]
Register file RF
R[2]: 201
Controller
Control unit
(a)
Fetch
10
"store"
Controller
Control unit
(b)
Decode
ALU
Datapath
Control unit
Execute
(c)
Init
PC=0
Fetch
Decode
Execute
IR=I[PC]
PC=PC+1
Instruction memory I
0: RF[0]=D[0]
1: RF[1]=D[1]
2: RF[2]=RF[0]+RF[1]
3: D[9]=RF[2]
Data memory D
n-bit
2x1
Controller
PC
IR
Register file RF
Controller
ALU
11
Control unit
Datapath