Professional Documents
Culture Documents
Lecture12
CONTROL
1. The Data Path
• The data path is the arithmetic
organ of the von Neumann
organization
• It consists of registers, internal
buses, arithmetic units and
shifters
2. A Unibus Data Path Implementation
31 0 <31..0>
R0
R1 32 lines
General
purpose
registers
(32-bits each) A
R31 ADD
ALSU SUB
…
31 0
PC SHL
IR
MAR
MBR
C
Other
To external ALSU
CPU bus functions
Internal processor bus
3. Timing Step Generator
T1
T2
0
A 3-bit T3
binary counter 1
T4
2
T5
T6
T7
clear
Timing Step Generator
Waveforms
Eight
mutually
exclusive
time
steps
Timing Step Generator
Waveforms
Step RTL
T0 MAR PC, C PC + 4;
T3 A R[rb];
Instruction T4 C A - R[rc];
Execute
T5 R[ra] C;
…
31 0
PC SHL
IR
MAR
MBR
C
Other
To external ALSU
CPU bus functions
Internal processor bus
ALSU Functions Needed
ALSU Needed for the following
assuming Function instructions/operations
a barrel
ADD add, addi, address calculation for disp and rel
shifter
with five SUB sub
n<4..0> NEG neg; applies to the B input of the ALSU
signals
AND and, andi
available
as well OR or, ori
NOT not; applies to the B input of the ALSU
SHL shl
Use uppercase for control
SHR shr
signals, because lowercase
SHC shc was used for mnemonics
SHRA shra
C=B to load from the bus directly into C
INC4 to increment the PC by 4; applies to the B input;
A Unibus Data Path Implementation
31 0
e <31..0>
R0 l id
s
R1 Question: s
General iou 32 lines
e
purpose v
Whatpr will be the implications if the
registers
om
connection between registerAC and the
f r
(32-bits each)
all internal processor bus is bi-directional ?
ec
R (one would like to have such a
R31 ADD
connection to avoid loading C through
ALSU SUB
…
31 0
the ALSU) SHL
PC
IR
MAR
MBR
C
Other
To external ALSU
CPU bus functions
Internal processor bus
Structural RTL for the add instruction
Syntax: add ra, rb, rc
Step RTL
T0-T2 Instruction fetch
T3 A R[rb];
T4 C A + R[rc];
T5 R[ra] C;
Step RTL
T0-T2 Instruction fetch
T3 C !(R[rb]);
T4 R[ra] C;
Step RTL
T0-T2 Instruction fetch
T3 A R[rb];
T4 C A + c2(sign extend);
T5 R[ra] C;
T5 MAR C; MAR C;