Control Unit - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

Control Unit

Description:

... arithmetic or logic operation and store the result in a processor ... Store a word of data from a processor register into a given memory location. Memory Timing ... – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 21
Provided by: ronh5
Category:
Tags: control | locator | store | unit

less

Transcript and Presenter's Notes

Title: Control Unit


1
Control Unit
  • ECE-445
  • Computer Organization
  • Dr. Ron Hayne
  • Electrical and Computer Engineering

2
Control Unit
MEM
MAR
MDR
Control
PC
R0
R1
IR
...
ALU
Rn-1
Processor
MAR - Memory Address Register MDR - Memory Data
Register
PC - Program Counter IR - Instruction Register
3
Fetch and Execute
MOVE NUM1,R1
  • Fetch
  • MAR ? PC
  • PC ? PC 1
  • MDR ? MEM(MAR)
  • IR ? MDR
  • Execute
  • MAR ? NUM1
  • MDR ? MEM(MAR)
  • R1 ? MDR

4
Single-Bus Architecture
BUS A
MAR
PC
MEM
MDR
1
2
IR
1
2
MUX
MUX
2
Y
1
1
REGS
A
B
ALU
R
Z
5
Instruction Execution
  • Perform one or more of the following operations
    in some specified sequence
  • Transfer a word of data from one processor
    register to another or to the ALU
  • Perform an arithmetic or logic operation and
    store the result in a processor register
  • Load the contents of a given memory location into
    a processor register
  • Store a word of data from a processor register
    into a given memory location

6
Memory Timing
  • MOVE NUM1,R1
  • 1. MAR ? NUM1
  • 2. MDR ? MEM(MAR)
  • 3. R1 ? MDR
  • One Clock Cycle
  • ? Clock Cycles
  • One Clock Cycle

7
Memory Detail
MEM
MAR
BUS_A
REG
ADDRESS
DATA_OUT
DATA_IN
Enable_Out
Enable_In
CLK
RAM
Write
Enable_In1
Enable_Out2
DATA_OUT
Read
DATA_IN1
DATA_OUT2
REG_2PORT
DATA_IN
DATA_OUT1
DATA_IN2
MFC
Enable_Out1
Enable_In2
CLK
CLK
MDR
MFC Memory-Function-Completed
8
Memory Timing
Step RTN Control Signals
1 MAR ? NUM1
2 MDR ? MEM(MAR)
3 R1 ? MDR
9
Memory Timing
Step RTN Control Signals
1 MAR ? NUM1 MAR_En_In, IR_En_Out1
2 MDR ? MEM(MAR) MEM_Read, MDR_En_In1, Wait MCF
3 R1 ? MDR MDR_En_Out2, REGS_Sel, REGS_Write
10
2
3
Step
1
Clock
MAR_En_In
Address
MEM_Read
MDR_En_In1
Data_Out
MFC
MDR_En_Out2
11
Another Example
ADD (R3),R1
  • Fetch
  • MAR ? PC
  • PC ? PC 1
  • MDR ? MEM(MAR)
  • IR ? MDR
  • Execute
  • MAR ? R3
  • MDR ? MEM(MAR)
  • Y ? R1
  • Z ? Y MDR
  • R1 ? Z

12
Control Signals
ADD (R3),R1
Step RTN Control Signals
1 MAR ? PC,PC ? PC 1
2 MDR ? MEM(MAR)
3 IR ? MDR
4 MAR ? R3
5 MDR ? MEM(MAR),Y ? R1
6 Z ? Y MDR
7 R1 ? Z
13
Control Signals
ADD (R3),R1
Step RTN Control Signals
1 MAR ? PC,PC ? PC 1 MAR_En_In, PC_En_Out,PC_Inc
2 MDR ? MEM(MAR) MEM_Read, MDR_En_In1
3 IR ? MDR MDR_En_Out2, IR_En_In1
4 MAR ? R3 MAR_EN_In, REGS_Sel, REGS_Read
5 MDR ? MEM(MAR),Y ? R1 MEM_Read, MDR_En_In1, REGS_Sel, REGS_Read, Y_En_In1
6 Z ? Y MDR Y_En_Out1, MDR_En_Out2, ALU_Op Add, Z_En_In
7 R1 ? Z Z_En_Out, REGS_Sel, REGS_Write
14
Branch Instructions
  • MOVE N,R1
  • MOVE NUM1,R2
  • MOVE 0,R0
  • LOOP ADD (R2),R0
  • ADD 1,R2
  • ADD -1,R1
  • BGTZ LOOP
  • MOVE R0,SUM
  • HALT
  • BGTZ -4
  • ? PC

15
Branch Instructions
BGTZ LOOP
  • Execute
  • if CCgt0, PC ? PC IR
  • Condition Code
  • Z 0, N 0

16
Multiple Bus Architecture
BUS A
BUS B
BUS C
PC
IR
1
1
2
A1
A2
1
REGS
2
2
MUX
A
ALU
R
B
NZVC
2
MDR
2
3
1
MAR
MEM
17
Example Revisited
ADD (R3),R1
  • Fetch
  • MAR ? PC
  • PC ? PC 1
  • MDR ? MEM(MAR)
  • IR ? MDR
  • Execute
  • MAR ? R3
  • MDR ? MEM(MAR)
  • R1 ? MDR R1

18
Control Signals
ADD (R3),R1
Step RTN Control Signals
1 MAR ? PC,PC ? PC 1
2 MDR ? MEM(MAR)
3 IR ? MDR
4 MAR ? R3
5 MDR ? MEM(MAR)
6 R1 ? MDR R1
19
Control Signals
ADD (R3),R1
Step RTN Control Signals
1 MAR ? PC,PC ? PC 1 MAR_En_In, PC_En_Out, ALU_Op Pass_B, PC_Inc
2 MDR ? MEM(MAR) MEM_Read, MDR_En_In1
3 IR ? MDR MDR_En_Out2, IR_En_In1,ALU_Op Pass_A
4 MAR ? R3 MAR_EN_In, REGS_Read1,ALU_Op Pass_A
5 MDR ? MEM(MAR) MEM_Read, MDR_En_In1
6 R1 ? MDR R1 MDR_En_Out2, REGS_Read2,ALU_Op Add, REGS_Write
20
Questions?
Write a Comment
User Comments (0)
About PowerShow.com