Computer Organization-Basic Processing Unit
Computer Organization-Basic Processing Unit
Computer Organization-Basic Processing Unit
Overview
Some Fundamental
Concepts
Fundamental Concepts
Executing an Instruction
Processor Organization
Internal processor
bus
MDR HAS
TWO INPUTS
AND TWO
OUTPUTS
Control signals
PC
Instruction
Address
lines
decoder and
MAR
control logic
Memory
bus
MDR
Data
lines
IR
Y
R0
Constant 4
Select
Datapath
MUX
Add
ALU
control
lines
Sub
R ( n -
ALU
Carry-in
XOR
TEMP
Z
1 )
Executing an Instruction
Register Transfers
Internal processor
b us
R i in
Ri
R i out
Y
in
Y
Constant 4
Select
MUX
B
ALU
in
out
Fig 2 Input and output gating for the registers shown in Fig1.
Register Transfers
All operations and data transfers are controlled by the processor clock.
Bus
0
D
1
Q
Ri in
Riout
Clock
Figure
Inputand
and
output
ating
g forfor
re
gister
Fig7.3.
3. Input
output
gating
oneone
register
bit. bit.
Performing an Arithmetic or
Logic Operation
R1out, Yin
R2out, SelectY, Add, Zin
Zout, R3in
MDRoutE
MDRout
Internal processor
bus
MDR
MDR inE
MDRin
Fig7.4.
4 Connection
and control
signalssignals
for register
MDR.MDR.
Figure
Connection
and control
forgister
re
Step
Timing
Clock
MARin
Assume MAR
is always available
on the address lines
of the memory bus.
MAR [R1]
Address
Read
MR
MDRinE
Data
MDR out
Figure 7.5.ofTiming
of a memory
Read operation
operation.
Fig 5 Timing
a Memory
Read
Execution of a Complete
Instruction
Add (R3), R1
Fetch the instruction
Fetch the first operand (the contents of the
memory location pointed to by R3)
Perform the addition
Load the result into R1
Internal processor
b us
R i in
Architecture
Ri
R i out
Y
in
Y
Constant 4
Select
MUX
B
ALU
in
out
Execution of a Complete
Instruction
Internal processor
bus
Control signals
PC
Instruction
Address
lines
Add (R3), R1
decoder and
MAR
Step Action
control logic
Memory
bus
MDR
MDRout , IRin
Data
lines
IR
Y
R0
Constant 4
Select
MUX
Add
ALU
control
lines
Sub
R( n - 1)
ALU
Carry-in
XOR
TEMP
Z
Execution of Branch
Instructions
Execution of Branch
Instructions
Step Action
1
MDR out , IR in
Offset-field-of-IRout, Add, Z in
Multiple-Bus Organization
Bus A
Bus B
Bus C
Incrementer
PC
Re
gister
Registerfile
file
MUX
Constant 4
A
ALU
Instruction
decoder
IR
MDR
MAR
Memory b
data lines
Memory
bus
datalines
Figure 7.8.
us
Address
lines
Fig 8Three-b
Three-busus ororganization
ofdatapath.
the datapath
g anization of the
Multiple-Bus Organization
Step Action
1
WMFC
Internal processor
bus
Control signals
Quiz
PC
Instruction
Address
lines
decoder and
MAR
control logic
Memory
bus
MDR
Data
lines
IR
Y
R0
Constant 4
Select
ALU
control
lines
MUX
Add
Sub
R( n - 1 )
ALU
Carry-in
XOR
TEMP
Z
Hardwired Control
Overview
CLK
Control step
counter
External
inputs
IR
Decoder/
encoder
Condition
codes
Control signals
CLK
Control step
counter
Reset
Step decoder
T 1 T2
Tn
INS1
External
inputs
INS2
IR
Instruction
decoder
Encoder
Condition
codes
INSm
Run
End
Control signals
Generating Zin
Zin = T1 + T6 ADD + T4 BR +
Branch
T4
Add
T6
T1
Figure 7.12. Generation of the Zin control signal for the processor in Figure 7.1.
Generating End
Branch
N
T7
T5
T4
End
T5
A Complete Processor
Instruction
unit
Integer
unit
Instruction
cache
Floating-point
unit
Data
cache
Bus interface
Processor
System bus
Main
memory
Input/
Output
Microprogrammed
Control
Overview
Micro instruction
PCout
MAR in
Read
MDRout
IRin
Yin
Select
Add
Zin
Z out
R1out
R1in
R3out
WMFC
End
Overview
Step
Action
MDR out , IR in
Overview
Control store
IR
Starting
address
generator
Clock
PC
Control
store
One function
cannot be carried
out by this simple
organization.
CW
Overview
The previous organization cannot handle the situation when the control
unit is required to check the status of the condition codes or external
inputs to choose between alternative courses of action.
Use conditional branch microinstruction.
AddressMicroinstruction
0
MDRout , IR in
3
Branch to starting addressof appropriatemicroroutine
. ... .. ... ... .. ... .. ... ... .. ... ... .. ... .. ... ... .. ... .. ... ... .. ... ..
25
26
27
Overview
External
inputs
IR
Clock
Starting and
branch address
generator
PC
Control
store
Figure 7.18.
Condition
codes
CW
Microinstructions
F2
F3
F4
F1 (4 bits)
F2 (3 bits)
F3 (3 bits)
0000: No transfer
0001: PCout
0010: MDRout
0011: Zout
0100: R0out
0101: R1out
0110: R2out
0111: R3out
1010: TEMPout
1011: Offsetout
000: No transfer
001: PCin
010: IRin
011: Zin
100: R0in
101: R1in
110: R2in
111: R3in
F6
F7
F4 (4 bits)
F5
F5 (2 bits)
00: No action
01: Read
10: Write
16 ALU
functions
F8
F6 (1 bit)
F7 (1 bit)
F8 (1 bit)
0: SelectY
1: Select4
0: No action
1: WMFC
0: Continue
1: End
Further Improvement
Microprogram Sequencing
- Bit-ORing
- Wide-Branch Addressing
- WMFC
Mode
Contents of IR
OP code
0 1
11 10
Rsrc
87
Rdst
4 3
Address
(octal)
Microinstruction
000
4, Add, Zin
PCout, MARin, Read, Select
001
002
MDRout, IRin
003
121
122
Zout, Rsrcin
123
170
171
MDRout, Yin
172
Rdstout , SelectY
, Add, Zin
173
External
Inputs
Condition
codes
Decoding circuits
A R
Control store
I R
Next address
Microinstruction decoder
Control signals
Microinstruction
F0
F0 (8 bits)
F1
F1 (3 bits)
F4
F5
F2
F3
F2 (3 bits)
F3 (3 bits)
000: No transfer
001: PCin
010: IRin
011: Zin
100: Rsrcin
101: Rdstin
000: No transfer
001: MARin
010: MDRin
011: TEMPin
100: Yin
F6
F7
F4 (4 bits)
F5 (2 bits)
F6 (1 bit)
F7 (1 bit)
0000: Add
0001: Sub
00: No action
01: Read
10: Write
0: SelectY
1: Select4
0: No action
1: WMFC
F9
F10
1111: XOR
F8
F8 (1 bit)
F9 (1 bit)
F10 (1 bit)
0: NextAdrs
1: InstDec
0: No action
1: ORmode
0: No action
1: ORindsrc
Implementation of the
Microroutine
Octal
address
F0
F1
F3
F2
0
1
0
0
F4
F5 F6 F7 F8 F9 F10
01
00
00
00
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
1
0
0
0
0
121
122
0 1 0 1 0 0 1 0 1 0 0 01 1 0 0 1 0 0 0 0 01
0 1 1 1 1 0 0 0 0 1 1 10 0 0 0 0 0 0 0 0 00
1
0
0
1
0
0
0
0
0
1
1
1
1
1
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
7
7
7
7
0
1
2
3
0
1
2
3
0
0
0
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
0
0
0
0
0
1
1
1
0
0
0
0
0
0
0
0
0
0
1
1
0
0
1
1
0
1
0
1
0
1
0
1
0
0
0
0
0
0
0
1
0
0
1
1
0
1
1
0
1
1
1
0
0
0
0
1
1
01
00
01
00
00
00
01
10
1
1
0
0
0
0
1
1
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
01
00
00
00
R15in
R15out
R0in
R0out
Decoder
Decoder
IR
Rsrc
Rdst
InstDecout
External
inputs
Decoding
circuits
Condition
codes
ORmode
ORindsrc
A R
Control store
Next address
F1
F2
F8 F9 F10
Rdstout
Rdstin
Rsrcout
Microinstruction
decoder
Rsrcin
bit-ORing
Micro-Programmed Control
Emulation
47
Micro-Programmed Control
Organization
48