Instruction Decoding and Execution: Mod I, Part IV
Instruction Decoding and Execution: Mod I, Part IV
Mod I, Part IV
Data Path
• The processing unit consists of data-path and control Unit.
• Simple computer architecture is decomposed into:
• Datapath for performing operations
• Control unit for controlling the data path operations
• A data-path is specified by:
• A set of registers to hold data
• functional units, such as arithmetic logic units and shifters, to
operate on data
• The microoperations performed on the data stored in the registers
• A control interface
2
Datapath
• The set of registers
• Collection of individual registers
• A set of registers with common access resources called a
register file
• Microoperation implementation
• Buses - shared transfer paths
• Arithmetic-Logic Unit (ALU) - shared resource for
implementing arithmetic and logic microoperations
• Shifter - shared resource for implementing shift
microoperations
3
Datapath Example
• Four parallel-load
Load enable A select B select
Write A address B address
registers (R0-R3) D data n
Load
• Two mux-based n
R0
n
2 2
register selectors
Load
• Register destination
R1
0
n 1
decoder n
2
MUX
0 3
• Mux B for external Load
1
2
MUX
R2
constant input n n
3
• Microoperation: R0 ← R1 + R2 Write
D data n
A address B address
4 A B 2
▪ Apply 1 to Load Enable to force the V
S2:0 || Cin
Arithmetic/logic 0
S
IR Shifter IL 0
unit (ALU)
Load input to R0 to 1 so that R0 is N
C
G
n
H
n
loaded on the clock pulse (not shown) Z Zero Detect
0 1
MF select MUX F Function unit
▪ The overall microoperation requires F
n n Data In
6
Arithmetic Logic Unit (ALU)
Ci Ci Ci +1
Ai Ai
One stage of
Bi B i arithmetic
circuit 2-to-1
S0 S0
0 MUX
S1 S1
Gi
1
Ai S
B i One stage of
logic circuit
C in S0
S1
S2
• Most significant select signals, S0 for the arithmetic circuit and S1 for the
logic circuit, are wired together, completing the two select signals for the
logic circuit.