Академический Документы
Профессиональный Документы
Культура Документы
Topics covered:
CPU Architecture
Multiple-bus organization
1
Multiple bus organization (contd..)
Incrementer
Bus A Bus B Bus C
PC
Register
file
Constant
MUX A
4
ALU R
Instruction
decoder
IR
2
Multiple bus organization (contd..)
3
Multiple bus organization (contd..)
ALU can also pass one of its two input operands unmodified
if needed:
Control signals for such an operation are R=A or R=B.
Three bus arrangement obviates the need for Registers Y
and Z in the single bus organization.
Incrementer unit:
Used to increment the PC by 4.
Source for the constant 4 at the ALU multiplexer can be used
to increment other addresses such as the memory addresses in
multiple load/store instructions.
4
Multiple bus organization (contd..)
Step Action
1. Pass the contents of the PC through ALU and load it into MAR.
Increment PC.
2. Wait for MFC.
3. Load the data received into MDR and transfer to IR through ALU.
4. Execution of the instruction is the last step.
5
Control unit
6
Hardwired control
Step Action
7
Hardwired control (contd..)
8
Hardwired control (contd..)
Control unit organization
Control signals
9
Hardwired control (contd..)
CLK
Clock Control step Reset
counter
Run End
Control signals
10
Hardwired control (contd..)
Control signals such as Zin, PCout, ADD are generated by encoder block
T4 T6
T1
11
Hardwired control (contd..)
12
Microprogrammed control
13
Microprogrammed control (contd..)
14
Microprogrammed control (contd..)
MDRout
WMFC
MAR in
Select
Read
PCout
R1out
R3out
Micro -
End
PCin
R1in
Add
Z out
IRin
Yin
Zin
instruction
1 0 1 1 1 0 0 0 1 1 1 0 0 0 0 0 0
2 1 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0
3 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0
4 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0
5 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0
6 0 0 0 0 1 0 0 0 1 1 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1
15
Microprogrammed control (contd..)
16
Microprogrammed control (contd..)
Control
store CW
17
Microprogrammed control (contd..)
18
Microprogrammed control (contd..)
AddressMicroinstruction
19
Microprogrammed control (contd..)
Control Unit with Conditional Branching in the Microprogram
External
inputs
Starting and
branch address Condition
IR codes
generator
Control
store CW
20
Microprogrammed control (contd..)
21
Microprogrammed control (contd..)
Microinstruction format
•Simple approach is to allocate one bit for each control signal
- Results in long microinstructions, since the number of control
signals is usually very large.
- Few bits are set to 1 in any microinstruction, resulting in a poor
use of bit space.
•For example:
- Only one ALU function is active at a time.
- Source for a data transfer must be unique.
- Read and Write memory signals cannot be active simultaneously.
22
Microprogrammed control (contd..)
Microinstruction format
•Group mutually exclusive signals in the same group.
•At most one microperation can be specified per group.
•Use binary coding scheme to represent signals within a
group.
Examples:
•If ALU has 16 operations, then 4 bits can be sufficient.
•Group register output signals into the same group, since only one of
these signals will be active at any given time (Why?)
If the CPU has 4 general purpose registers, then PCout, MDRout, Zout,
Offsetout, R0out, R1out, R2out, R3out and Tempout can be placed in a single
group, and 4 bits will be needed to represent these.
23
Microprogrammed control (contd..)
Microinstruction
F1 F2 F3 F4 F5
0000: No transfer 000: No transfer 000: No transfer 0000: Add 00: No action
0001: PCout 001: PCin 001: MARin 0001: Sub 01: Read
0010: MDRout 010: IRin 010: MDRin 10: Write •Each group occupies a
0011: Zout 011: Zin 011: TEMPin
0100: R0out 100: R0in 100: Yin 1111: XOR large enough field to
0101: R1out 101: R1in represent all the signals.
16 ALU
0110: R2out
0111: R3out
110: R2in
111: R3in
functions •Most fields must include
1010: TEMPout one inactive code, which
1011: Offsetout specifies no action.
•All fields do not have to
F6 F7 F8 include inactive code.
24