SlideShare a Scribd company logo
+
Control Unit
Lecturer by
Mazin Adnan
+
Outline
 Control Unit
 Control Signals
 Control word
 Control Registers
 Control Cycle
 Control Unit Implementation
 Hardwired Control
 Microprogramed Control
 Horizontal
 Vertical
+
Control Unit
 Control Unit (CU) is a component of a computer's central
processing unit (CPU) that performs two tasks:
1. It causes the processor to step through a series of micro-
operations in the proper sequence, based on the program being
executed.
2. it generates the control signals that cause each micro-operation to
be executed.
+
Control Unit
+
Control Unit
Control Signals
 Group of bits used to opening and closing of logic
gates, resulting in the transfer of data to and from
registers (or memory and I/O modules) and the
operation of the ALU.
Control word
 The combination of bits which each bit represents
one control line.
 Each microoperation represented by a different
pattern of 1s and 0s in the control word
5
1 0 1 0 0 0 1 0
+
Control Signals (The inputs)
1. Clock
 An electronic device in a computer that issues a steady high-
frequency signal that synchronizes all the internal components
2. Instruction register
 The opcode and addressing mode of the current instruction are
used to determine which micro-operations to perform during the
execute cycle
3. Flags
A. State of processor
B. outcome of previous ALU operations
4. From control bus
 portion of the system bus
+
Control Signals (The outputs)
1. Within CPU
A. Cause data movement between registers
B. Activate specific ALU functions
2. Via control bus
A. To memory
B. To I/O modules
+
Control Registers Utilized
Control Cycle
 Program Counter (PC)
 Holds address of next instruction to be fetched
 Memory Address Register (MAR)
 Connected to address bus
 Specifies address for read or write from or to memory
 Memory Buffer Register (MBR)
 Connected to data bus
 Holds data to write or last data read
 Instruction Register (IR)
 Holds last instruction fetched
+
Constituent Elements of Program
Execution
+
Fetch Sequence
 Address of next instruction is in PC
 Address (MAR) is placed on address bus
 Control unit issues READ command
 Result (data from memory) appears on data bus
 Data from data bus copied into MBR
 PC incremented by 1 (in parallel with data fetch from memory)
 Data (instruction) moved from MBR to IR
 MBR is now free for further data fetches
00000000011001000000000001100100
Main Memory
Control Unit
R
0011100001101110
0011100001101110
MAR
MBR
PC
IR
AC
Fetch Cycle
+10000000001100101
t1: MAR <- (PC)
t2: MBR <- (memory)
PC <- (PC) +1
t3: IR <- (MBR)
0000000001100100
+
Fetch Sequence (get data)
 t1: MAR <- (PC)
 t2: MBR <- (memory)
PC <- (PC) +1
 t3: IR <- (MBR)
OR
 t1: MAR <- (PC)
 t2: MBR <- (memory)
 t3: PC <- (PC) +1
IR <- (MBR)
+
Rules for Clock Cycle Grouping
 Proper sequence must be followed
 MAR <- (PC) must precede MBR <- (memory)
 Conflicts must be avoided
 Must not read & write same register at same time
 MBR <- (memory) & IR <- (MBR) must not be in same cycle
 Also: PC <- (PC) +1 involves addition
 Use ALU
 May need additional micro-operations
00000000011001000000000001100100
Main Memory
Control Unit
R
0011100001101110
0011100001101110
MAR
MBR
PC
IR
AC
Indirect Cycle
t1: MAR <- (IR (Address))
t2: MBR <- (memory)
t3: IR (Address) <- MBR
(Address)
0000000001100100
+
Indirect Cycle (get address)
 MAR <- (IRaddress) - address field of IR
 MBR <- (memory)
 IRaddress <- (MBRaddress)
 MBR contains an address
 IR is now in same state as if direct addressing had been used
 (What does this say about IR size?)
0000000001100100
0100101101101001
Main Memory
Control Unit
W
0011100001101110
MAR
MBR
PC
IR
AC
Interrupt Cycle
t1: MBR <-(PC)
t2: MAR <- save-address
PC <- routine-address
t3: memory <- (MBR)
0000000001100100
0000000001100100
+
Interrupt Cycle
 t1: MBR <-(PC)
 t2: MAR <- save-address
 PC <- routine-address
 t3: memory <- (MBR)
 This is a minimum
 May be additional micro-ops to get addresses
00000000011001000000000001100100
Main Memory
Control Unit
R
0011100001101110
MAR
MBR
PC
IR
AC
Execute Cycle (ADD)
t1: MAR <- (IR (Address))
t2: MBR <- (memory)
t3: R1 <- R1 + (MBR)
0000000001100100
0000001101100000R1
+
0011101111001110
+
Execute Cycle (ADD)
 Different for each instruction
 e.g. ADD R1,X - add the contents of location X to Register 1 ,
result in R1
 t1: MAR <- (IRaddress)
 t2: MBR <- (memory)
 t3: R1 <- R1 + (MBR)
+
Control Unit Implementation
 A wide variety of techniques have been used. Most of these
fall into one of two categories:
 Hardwired control:
 Microprogrammed control
20
+
Hardwired control
 The control unit is essentially a state machine circuit. Its
input logic signals are transformed into a set of output
logic signals, which are the control signals
+ 22
Hardwired Control
+
Decoder Table
+
Example
+
Example
C5 = Fetch ∙ T2 + Indirect ∙ T2 = ( Fetch + Indirect )∙ T2
CR = Fetch ∙ T2 + Indirect ∙ T2 = ( Fetch + Indirect )∙ T2
C4 = Fetch ∙ T3 + Indirect ∙ T3 = ( Fetch + Indirect )∙ T3
+
Example
C4
C5 CR
T3
T2
Fetch
Indirect
C5 = Fetch ∙ T2 + Indirect ∙ T2 = ( Fetch + Indirect )∙ T2
CR = Fetch ∙ T2 + Indirect ∙ T2 = ( Fetch + Indirect )∙ T2
C4 = Fetch ∙ T3 + Indirect ∙ T3 = ( Fetch + Indirect )∙ T3
+
 The logic in Micro-programmed control unit is
specified by a microprogram
 Microprogram (Firmware) consists of a sequence of
instructions in a microprogramming language
 Instructions specify set of
micro-operations (microinstructions)
27
Microprogrammed Control
+
Microprogrammed Control
Microprogram
instructions
micro-operations
micro-operations
micro-operations
………
instructions
micro-operations
micro-operations
micro-operations
………
instructions
micro-operations
micro-operations
micro-operations
………
……….
MicroprogrammedControl
MicroprogrammedControl
+
MicroprogrammedControl
+
Organization of Control Memory
•
•
•
Jump to indirect or execute
•
•
•
Jump to execute
•
•
•
Jump to fetch
Jump to opcode routine
•
•
•
Jump to fetch or interrupt
Fetch cycle routine
Indirect cycle routine
Interrupt cycle routine
Execute cycle routine
ADD routine
•
•
•
•
•
•
+ Compare Hard Wired and Microprogramed
Hardwired Microprogrammed
1 Uses logic gates and other digital
circuits
Uses microprogramming
language
2 As the name implies it is a
hardware control unit
As the name implies it is a
software control unit.
3 The decoders and sequencing
logic unit are very complex
pieces of logic
The decoders and sequencing
logic unit
are very simple pieces of logic
4 Difficult to design, test and
implement compared to
microprogrammed
Easy to design, test and
implement compared to
hardwired
+ Compare Hard Wired and Microprogramed
Hardwired Microprogrammed
5 Inflexible to modify Flexible to modify.
6 Expensive and high error prone
to implement
Cheaper and less error prone to
implement
7 Used in RISC processor Used in CISC processor
8 Faster than micro- programmed
control unit
Slower than micro- programmed
control unit
+
Microinstruction Control Signals
for the add Instruction
 Addresses 101–103 are the instruction fetch
 Addresses 200–202 do the add
 Change of control from 103 to 200 uses a kind of branch
.
101
102
103
200
201
202
• • •
• • •
• • •
• • •
• • •
• • •
1 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0
0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0
0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0
0
0
0 0 1 1 10 0 0 0 0 0 0 0 0 0 0 0
1 1 1 10 0 0 0 0 0 0 00 0 0 0 0
1 0 0 0 0 0 0 0 1 0 0 0 0 0 01 1
+
 In horizontal microcode, each control signal is
represented by a bit in the instruction
 Fewer control store words of more bits per word
 In vertical microcode, a set of true control signals
is represented by a shorter code
 more compact (fewer bits) than horizontal
microinstructions
 small additional amount of logic and time delay
than horizontal microinstructions
Microprogrammed Types
+
Microinstruction Formats
+
Horizontal vs. Vertical
+ Example Microprogramming Formats
Horizontal vs
Vertical
+
horizontal
+
Vertical Microprogramming
000: NO OP
001: PC ABUS
010: IR ABUS
011: MBR MBUS
100: MAR M
101: AC RBUS
110: ALU Res RBUS
00 = Wait
01 = AC<15>
10 = IR<15>
11 = IR<14>
Register Transfer Format
0 Source Destination Operation
1 3 3 3
000: NO OP
001: RBUSAC
010: MBUSIR
011: ABUS MAR
100: M MBR
101: RBUSMBR
110: ABUS PC
111: MBR M
000: NO OP
001: ALU ADD
010: ALU PASS B
011: 0 PC
100: PC + 1PC
101: Read
110: Write
+ Vertical Microprogramming
ROM ADDRESS SYMBOLIC CONTENTS BINARY CONTENTS
000000 RES RT PC  MAR, PC +1  PC 0 001 011 100
000001 IF0 RT MAR  M, Read 0 100 000 101
000010 BJ Wait=0, IF0 1 000 000 001
000011 IF1 RT MAR  M, M  MBR, Read 0 100 100 101
000100 BJ Wait=1, IF1 1 001 000 011
000101 IF2 RT MBR  IR 0 011 010 000
000110 BJ Wait=0, IF2 1 000 000 101
000111 RT IR  MAR 0 010 011 000
001000 OD BJ IR<15>=1, OD1 1 101 010 101
001001 BJ IR<14>=1, ST0 1 111 010 000
001010 LD0 RT MAR  M, Read 0 100 000 101
001011 LD1 RT MAR  M, M  MBR, Read 0 100 100 101
001100 BJ Wait=1, LD1 1 001 001 011
001101 LD2 RT MBR  AC 0 110 001 010
001110 BJ Wait=0, RES 1 000 000 000
001111 BJ Wait=1, RES 1 001 000 000
+ Microprogramms
Horizontal Vertical
1 Longer word Shorter word
2 Little encoding of control information More encoding of control information
3 Micro data hardware path simpler Micro data hardware path more complicated
4 Ex: PowerPC’s employed horizontal code Ex: older IBM main frames (s360/s3670)used
it
5 Big control memory (ROM) word length Small control memory (ROM) word length
6 Less complex, less complicated to program,
more flexibility
More complex, more complicated to
program, less flexibility
7 More easy to modify More difficult to modify
8 Faster Slower
+
Thank you

More Related Content

What's hot (20)

PPTX
Computer registers
DeepikaT13
 
PPTX
Micro Programmed Control Unit
Kamal Acharya
 
PPT
Instruction cycle
shweta-sharma99
 
PPTX
Instruction cycle presentation
Moniba Irfan
 
PPTX
Instruction Execution Cycle
utsav_shah
 
PDF
Chapter 1-Microprocessors, Microcomputers, and Assembly Language
cmkandemir
 
PPT
Addressing modes
Mahesh Kumar Attri
 
PPTX
Instruction cycle with interrupts
Shubham Jain
 
PPTX
Bus aribration
Saiyam Agrawal
 
PDF
Chapter 2-8085 Microprocessor Architecture and Microcomputer Systems
cmkandemir
 
PPTX
Control unit
Piyush Rochwani
 
PPTX
MicroProgrammed Explained .
Muhammad Umar
 
PPTX
Hardwired control
Siddique Ibrahim
 
PPTX
General register organization (computer organization)
rishi ram khanal
 
PPTX
Part I:Introduction to assembly language
Ahmed M. Abed
 
PPTX
8086 Microprocessor Pipeline Architecture.pptx
Green University of Bangladesh
 
PPTX
Addressing modes
karthiga selvaraju
 
PPTX
Control unit design
Dhaval Bagal
 
PPTX
Intel Pentium Pro
Muhtasim Fuad Rafid
 
PPTX
Timing and control unit
Destro Destro
 
Computer registers
DeepikaT13
 
Micro Programmed Control Unit
Kamal Acharya
 
Instruction cycle
shweta-sharma99
 
Instruction cycle presentation
Moniba Irfan
 
Instruction Execution Cycle
utsav_shah
 
Chapter 1-Microprocessors, Microcomputers, and Assembly Language
cmkandemir
 
Addressing modes
Mahesh Kumar Attri
 
Instruction cycle with interrupts
Shubham Jain
 
Bus aribration
Saiyam Agrawal
 
Chapter 2-8085 Microprocessor Architecture and Microcomputer Systems
cmkandemir
 
Control unit
Piyush Rochwani
 
MicroProgrammed Explained .
Muhammad Umar
 
Hardwired control
Siddique Ibrahim
 
General register organization (computer organization)
rishi ram khanal
 
Part I:Introduction to assembly language
Ahmed M. Abed
 
8086 Microprocessor Pipeline Architecture.pptx
Green University of Bangladesh
 
Addressing modes
karthiga selvaraju
 
Control unit design
Dhaval Bagal
 
Intel Pentium Pro
Muhtasim Fuad Rafid
 
Timing and control unit
Destro Destro
 

Similar to Computer architecture control unit (20)

PDF
Central processing unit ii
JyotiprakashMishra18
 
PPT
Bca 2nd sem-u-3.2-basic computer programming and micro programmed control
Rai University
 
PPT
B.sc cs-ii-u-3.2-basic computer programming and micro programmed control
Rai University
 
PPT
basic computer programming and micro programmed control
Rai University
 
PPT
UNIT-3(Processor Organization)_computer organization.ppt
anushachalla14
 
PPT
COMPUTER ORGANIZATION - Design of control unit
KAVITHA N S
 
PPT
Control Memory
mahesh kumar prajapat
 
PDF
Compuer organizaion processing unit
Deepak John
 
PPT
4876238.ppt
RohitPaul71
 
PPT
COMPUTER ORGANIZATION - Design of control unit final
KAVITHA N S
 
PPT
Chapter 7 of Computer system and architecture
mayank7067038682
 
PPTX
MICROPROGRAMMEDCONTROL-3.pptx
PhoenixEagles
 
PPTX
Chapter7.pptx
radhushri
 
PPT
Unit 3 Control Unit.ppt ..................
rameshpath3
 
PPT
Qwertyuiopasdfghjklzcbmmeuehdkdmdkksbejkssh
rameshpath3
 
PPTX
20IT204-COA- Lecture 17.pptx
PerumalPitchandi
 
PPT
Computer_Architecture_3rd_Edition_by_Moris_Mano_Ch_07.ppt
RafiyaKouser2
 
PPTX
Microprogrammed of organisation and architecture of computer.pptx
SahithBeats
 
PPTX
COA 2.1 Microprogrammed control systems of btech 2nd year students.pptx
SahithBeats
 
PPTX
2024_lecture10__come321..................................
ghada507476
 
Central processing unit ii
JyotiprakashMishra18
 
Bca 2nd sem-u-3.2-basic computer programming and micro programmed control
Rai University
 
B.sc cs-ii-u-3.2-basic computer programming and micro programmed control
Rai University
 
basic computer programming and micro programmed control
Rai University
 
UNIT-3(Processor Organization)_computer organization.ppt
anushachalla14
 
COMPUTER ORGANIZATION - Design of control unit
KAVITHA N S
 
Control Memory
mahesh kumar prajapat
 
Compuer organizaion processing unit
Deepak John
 
4876238.ppt
RohitPaul71
 
COMPUTER ORGANIZATION - Design of control unit final
KAVITHA N S
 
Chapter 7 of Computer system and architecture
mayank7067038682
 
MICROPROGRAMMEDCONTROL-3.pptx
PhoenixEagles
 
Chapter7.pptx
radhushri
 
Unit 3 Control Unit.ppt ..................
rameshpath3
 
Qwertyuiopasdfghjklzcbmmeuehdkdmdkksbejkssh
rameshpath3
 
20IT204-COA- Lecture 17.pptx
PerumalPitchandi
 
Computer_Architecture_3rd_Edition_by_Moris_Mano_Ch_07.ppt
RafiyaKouser2
 
Microprogrammed of organisation and architecture of computer.pptx
SahithBeats
 
COA 2.1 Microprogrammed control systems of btech 2nd year students.pptx
SahithBeats
 
2024_lecture10__come321..................................
ghada507476
 
Ad

More from Mazin Alwaaly (20)

PPTX
Pattern recognition voice biometrics
Mazin Alwaaly
 
PPTX
Pattern recognition palm print authentication system
Mazin Alwaaly
 
PPTX
Pattern recognition on line signature
Mazin Alwaaly
 
PPTX
Pattern recognition multi biometrics using face and ear
Mazin Alwaaly
 
PPTX
Pattern recognition IRIS recognition
Mazin Alwaaly
 
PPT
Pattern recognition hand vascular pattern recognition
Mazin Alwaaly
 
PPTX
Pattern recognition Hand Geometry
Mazin Alwaaly
 
PPTX
Pattern recognition forensic dental identification
Mazin Alwaaly
 
PPT
Pattern recognition fingerprints
Mazin Alwaaly
 
PPTX
Pattern recognition facial recognition
Mazin Alwaaly
 
PPTX
Pattern recognition ear as a biometric
Mazin Alwaaly
 
PPTX
Pattern recognition 3d face recognition
Mazin Alwaaly
 
PPTX
Multimedia multimedia over wireless and mobile networks
Mazin Alwaaly
 
PPT
Multimedia network services and protocols for multimedia communications
Mazin Alwaaly
 
PPTX
Multimedia content based retrieval in digital libraries
Mazin Alwaaly
 
PPTX
Multimedia lossy compression algorithms
Mazin Alwaaly
 
PPTX
Multimedia lossless compression algorithms
Mazin Alwaaly
 
PPTX
Multimedia basic video compression techniques
Mazin Alwaaly
 
PPT
Multimedia image compression standards
Mazin Alwaaly
 
PPTX
Multimedia fundamental concepts in video
Mazin Alwaaly
 
Pattern recognition voice biometrics
Mazin Alwaaly
 
Pattern recognition palm print authentication system
Mazin Alwaaly
 
Pattern recognition on line signature
Mazin Alwaaly
 
Pattern recognition multi biometrics using face and ear
Mazin Alwaaly
 
Pattern recognition IRIS recognition
Mazin Alwaaly
 
Pattern recognition hand vascular pattern recognition
Mazin Alwaaly
 
Pattern recognition Hand Geometry
Mazin Alwaaly
 
Pattern recognition forensic dental identification
Mazin Alwaaly
 
Pattern recognition fingerprints
Mazin Alwaaly
 
Pattern recognition facial recognition
Mazin Alwaaly
 
Pattern recognition ear as a biometric
Mazin Alwaaly
 
Pattern recognition 3d face recognition
Mazin Alwaaly
 
Multimedia multimedia over wireless and mobile networks
Mazin Alwaaly
 
Multimedia network services and protocols for multimedia communications
Mazin Alwaaly
 
Multimedia content based retrieval in digital libraries
Mazin Alwaaly
 
Multimedia lossy compression algorithms
Mazin Alwaaly
 
Multimedia lossless compression algorithms
Mazin Alwaaly
 
Multimedia basic video compression techniques
Mazin Alwaaly
 
Multimedia image compression standards
Mazin Alwaaly
 
Multimedia fundamental concepts in video
Mazin Alwaaly
 
Ad

Recently uploaded (20)

PPTX
ION EXCHANGE CHROMATOGRAPHY NEW PPT (JA).pptx
adhagalejotshna
 
PPTX
Microbiome_Engineering_Poster_Fixed.pptx
SupriyaPolisetty1
 
PDF
Global Congress on Forensic Science and Research
infoforensicscience2
 
PDF
Unit-5 ppt.pdf unit 5 organic chemistry 3
visionshukla007
 
PPTX
CNS.pptx Central nervous system meninges ventricles of brain it's structure a...
Ashwini I Chuncha
 
DOCX
Paper - Suprasegmental Features (Makalah Presentasi)
Sahmiral Amri Rajagukguk
 
PPTX
Diagnostic Features of Common Oral Ulcerative Lesions.pptx
Dr Palak borade
 
PDF
A High-Caliber View of the Bullet Cluster through JWST Strong and Weak Lensin...
Sérgio Sacani
 
PDF
Adding Geochemistry To Understand Recharge Areas - Kinney County, Texas - Jim...
Texas Alliance of Groundwater Districts
 
PDF
GUGC Research Overview (December 2024)
Ghent University Global Campus
 
PDF
Rapid protoplanet formation in the outer Solar System recorded in a dunite fr...
Sérgio Sacani
 
PPTX
Bacillus thuringiensis.crops & golden rice
priyadharshini87125
 
PDF
High-speedBouldersandtheDebrisFieldinDARTEjecta
Sérgio Sacani
 
PDF
Carbon-richDustInjectedintotheInterstellarMediumbyGalacticWCBinaries Survives...
Sérgio Sacani
 
PDF
Asthamudi lake and its fisheries&importance .pdf
J. Bovas Joel BFSc
 
PDF
The ALMA-CRISTAL survey: Gas, dust, and stars in star-forming galaxies when t...
Sérgio Sacani
 
PDF
Pharmakon of algorithmic alchemy: Marketing in the age of AI
Selcen Ozturkcan
 
PDF
oil and gas chemical injection system
Okeke Livinus
 
PDF
Portable Hyperspectral Imaging (pHI) for the enhanced recording of archaeolog...
crabbn
 
PDF
Preserving brand authenticity amid AI-driven misinformation: Sustaining consu...
Selcen Ozturkcan
 
ION EXCHANGE CHROMATOGRAPHY NEW PPT (JA).pptx
adhagalejotshna
 
Microbiome_Engineering_Poster_Fixed.pptx
SupriyaPolisetty1
 
Global Congress on Forensic Science and Research
infoforensicscience2
 
Unit-5 ppt.pdf unit 5 organic chemistry 3
visionshukla007
 
CNS.pptx Central nervous system meninges ventricles of brain it's structure a...
Ashwini I Chuncha
 
Paper - Suprasegmental Features (Makalah Presentasi)
Sahmiral Amri Rajagukguk
 
Diagnostic Features of Common Oral Ulcerative Lesions.pptx
Dr Palak borade
 
A High-Caliber View of the Bullet Cluster through JWST Strong and Weak Lensin...
Sérgio Sacani
 
Adding Geochemistry To Understand Recharge Areas - Kinney County, Texas - Jim...
Texas Alliance of Groundwater Districts
 
GUGC Research Overview (December 2024)
Ghent University Global Campus
 
Rapid protoplanet formation in the outer Solar System recorded in a dunite fr...
Sérgio Sacani
 
Bacillus thuringiensis.crops & golden rice
priyadharshini87125
 
High-speedBouldersandtheDebrisFieldinDARTEjecta
Sérgio Sacani
 
Carbon-richDustInjectedintotheInterstellarMediumbyGalacticWCBinaries Survives...
Sérgio Sacani
 
Asthamudi lake and its fisheries&importance .pdf
J. Bovas Joel BFSc
 
The ALMA-CRISTAL survey: Gas, dust, and stars in star-forming galaxies when t...
Sérgio Sacani
 
Pharmakon of algorithmic alchemy: Marketing in the age of AI
Selcen Ozturkcan
 
oil and gas chemical injection system
Okeke Livinus
 
Portable Hyperspectral Imaging (pHI) for the enhanced recording of archaeolog...
crabbn
 
Preserving brand authenticity amid AI-driven misinformation: Sustaining consu...
Selcen Ozturkcan
 

Computer architecture control unit

  • 2. + Outline  Control Unit  Control Signals  Control word  Control Registers  Control Cycle  Control Unit Implementation  Hardwired Control  Microprogramed Control  Horizontal  Vertical
  • 3. + Control Unit  Control Unit (CU) is a component of a computer's central processing unit (CPU) that performs two tasks: 1. It causes the processor to step through a series of micro- operations in the proper sequence, based on the program being executed. 2. it generates the control signals that cause each micro-operation to be executed.
  • 5. + Control Unit Control Signals  Group of bits used to opening and closing of logic gates, resulting in the transfer of data to and from registers (or memory and I/O modules) and the operation of the ALU. Control word  The combination of bits which each bit represents one control line.  Each microoperation represented by a different pattern of 1s and 0s in the control word 5 1 0 1 0 0 0 1 0
  • 6. + Control Signals (The inputs) 1. Clock  An electronic device in a computer that issues a steady high- frequency signal that synchronizes all the internal components 2. Instruction register  The opcode and addressing mode of the current instruction are used to determine which micro-operations to perform during the execute cycle 3. Flags A. State of processor B. outcome of previous ALU operations 4. From control bus  portion of the system bus
  • 7. + Control Signals (The outputs) 1. Within CPU A. Cause data movement between registers B. Activate specific ALU functions 2. Via control bus A. To memory B. To I/O modules
  • 8. + Control Registers Utilized Control Cycle  Program Counter (PC)  Holds address of next instruction to be fetched  Memory Address Register (MAR)  Connected to address bus  Specifies address for read or write from or to memory  Memory Buffer Register (MBR)  Connected to data bus  Holds data to write or last data read  Instruction Register (IR)  Holds last instruction fetched
  • 9. + Constituent Elements of Program Execution
  • 10. + Fetch Sequence  Address of next instruction is in PC  Address (MAR) is placed on address bus  Control unit issues READ command  Result (data from memory) appears on data bus  Data from data bus copied into MBR  PC incremented by 1 (in parallel with data fetch from memory)  Data (instruction) moved from MBR to IR  MBR is now free for further data fetches
  • 11. 00000000011001000000000001100100 Main Memory Control Unit R 0011100001101110 0011100001101110 MAR MBR PC IR AC Fetch Cycle +10000000001100101 t1: MAR <- (PC) t2: MBR <- (memory) PC <- (PC) +1 t3: IR <- (MBR) 0000000001100100
  • 12. + Fetch Sequence (get data)  t1: MAR <- (PC)  t2: MBR <- (memory) PC <- (PC) +1  t3: IR <- (MBR) OR  t1: MAR <- (PC)  t2: MBR <- (memory)  t3: PC <- (PC) +1 IR <- (MBR)
  • 13. + Rules for Clock Cycle Grouping  Proper sequence must be followed  MAR <- (PC) must precede MBR <- (memory)  Conflicts must be avoided  Must not read & write same register at same time  MBR <- (memory) & IR <- (MBR) must not be in same cycle  Also: PC <- (PC) +1 involves addition  Use ALU  May need additional micro-operations
  • 14. 00000000011001000000000001100100 Main Memory Control Unit R 0011100001101110 0011100001101110 MAR MBR PC IR AC Indirect Cycle t1: MAR <- (IR (Address)) t2: MBR <- (memory) t3: IR (Address) <- MBR (Address) 0000000001100100
  • 15. + Indirect Cycle (get address)  MAR <- (IRaddress) - address field of IR  MBR <- (memory)  IRaddress <- (MBRaddress)  MBR contains an address  IR is now in same state as if direct addressing had been used  (What does this say about IR size?)
  • 16. 0000000001100100 0100101101101001 Main Memory Control Unit W 0011100001101110 MAR MBR PC IR AC Interrupt Cycle t1: MBR <-(PC) t2: MAR <- save-address PC <- routine-address t3: memory <- (MBR) 0000000001100100 0000000001100100
  • 17. + Interrupt Cycle  t1: MBR <-(PC)  t2: MAR <- save-address  PC <- routine-address  t3: memory <- (MBR)  This is a minimum  May be additional micro-ops to get addresses
  • 18. 00000000011001000000000001100100 Main Memory Control Unit R 0011100001101110 MAR MBR PC IR AC Execute Cycle (ADD) t1: MAR <- (IR (Address)) t2: MBR <- (memory) t3: R1 <- R1 + (MBR) 0000000001100100 0000001101100000R1 + 0011101111001110
  • 19. + Execute Cycle (ADD)  Different for each instruction  e.g. ADD R1,X - add the contents of location X to Register 1 , result in R1  t1: MAR <- (IRaddress)  t2: MBR <- (memory)  t3: R1 <- R1 + (MBR)
  • 20. + Control Unit Implementation  A wide variety of techniques have been used. Most of these fall into one of two categories:  Hardwired control:  Microprogrammed control 20
  • 21. + Hardwired control  The control unit is essentially a state machine circuit. Its input logic signals are transformed into a set of output logic signals, which are the control signals
  • 25. + Example C5 = Fetch ∙ T2 + Indirect ∙ T2 = ( Fetch + Indirect )∙ T2 CR = Fetch ∙ T2 + Indirect ∙ T2 = ( Fetch + Indirect )∙ T2 C4 = Fetch ∙ T3 + Indirect ∙ T3 = ( Fetch + Indirect )∙ T3
  • 26. + Example C4 C5 CR T3 T2 Fetch Indirect C5 = Fetch ∙ T2 + Indirect ∙ T2 = ( Fetch + Indirect )∙ T2 CR = Fetch ∙ T2 + Indirect ∙ T2 = ( Fetch + Indirect )∙ T2 C4 = Fetch ∙ T3 + Indirect ∙ T3 = ( Fetch + Indirect )∙ T3
  • 27. +  The logic in Micro-programmed control unit is specified by a microprogram  Microprogram (Firmware) consists of a sequence of instructions in a microprogramming language  Instructions specify set of micro-operations (microinstructions) 27 Microprogrammed Control
  • 32. + Organization of Control Memory • • • Jump to indirect or execute • • • Jump to execute • • • Jump to fetch Jump to opcode routine • • • Jump to fetch or interrupt Fetch cycle routine Indirect cycle routine Interrupt cycle routine Execute cycle routine ADD routine • • • • • •
  • 33. + Compare Hard Wired and Microprogramed Hardwired Microprogrammed 1 Uses logic gates and other digital circuits Uses microprogramming language 2 As the name implies it is a hardware control unit As the name implies it is a software control unit. 3 The decoders and sequencing logic unit are very complex pieces of logic The decoders and sequencing logic unit are very simple pieces of logic 4 Difficult to design, test and implement compared to microprogrammed Easy to design, test and implement compared to hardwired
  • 34. + Compare Hard Wired and Microprogramed Hardwired Microprogrammed 5 Inflexible to modify Flexible to modify. 6 Expensive and high error prone to implement Cheaper and less error prone to implement 7 Used in RISC processor Used in CISC processor 8 Faster than micro- programmed control unit Slower than micro- programmed control unit
  • 35. + Microinstruction Control Signals for the add Instruction  Addresses 101–103 are the instruction fetch  Addresses 200–202 do the add  Change of control from 103 to 200 uses a kind of branch . 101 102 103 200 201 202 • • • • • • • • • • • • • • • • • • 1 0 0 0 1 1 0 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 10 0 0 0 0 0 0 0 0 0 0 0 1 1 1 10 0 0 0 0 0 0 00 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 01 1
  • 36. +  In horizontal microcode, each control signal is represented by a bit in the instruction  Fewer control store words of more bits per word  In vertical microcode, a set of true control signals is represented by a shorter code  more compact (fewer bits) than horizontal microinstructions  small additional amount of logic and time delay than horizontal microinstructions Microprogrammed Types
  • 39. + Example Microprogramming Formats Horizontal vs Vertical
  • 41. + Vertical Microprogramming 000: NO OP 001: PC ABUS 010: IR ABUS 011: MBR MBUS 100: MAR M 101: AC RBUS 110: ALU Res RBUS 00 = Wait 01 = AC<15> 10 = IR<15> 11 = IR<14> Register Transfer Format 0 Source Destination Operation 1 3 3 3 000: NO OP 001: RBUSAC 010: MBUSIR 011: ABUS MAR 100: M MBR 101: RBUSMBR 110: ABUS PC 111: MBR M 000: NO OP 001: ALU ADD 010: ALU PASS B 011: 0 PC 100: PC + 1PC 101: Read 110: Write
  • 42. + Vertical Microprogramming ROM ADDRESS SYMBOLIC CONTENTS BINARY CONTENTS 000000 RES RT PC  MAR, PC +1  PC 0 001 011 100 000001 IF0 RT MAR  M, Read 0 100 000 101 000010 BJ Wait=0, IF0 1 000 000 001 000011 IF1 RT MAR  M, M  MBR, Read 0 100 100 101 000100 BJ Wait=1, IF1 1 001 000 011 000101 IF2 RT MBR  IR 0 011 010 000 000110 BJ Wait=0, IF2 1 000 000 101 000111 RT IR  MAR 0 010 011 000 001000 OD BJ IR<15>=1, OD1 1 101 010 101 001001 BJ IR<14>=1, ST0 1 111 010 000 001010 LD0 RT MAR  M, Read 0 100 000 101 001011 LD1 RT MAR  M, M  MBR, Read 0 100 100 101 001100 BJ Wait=1, LD1 1 001 001 011 001101 LD2 RT MBR  AC 0 110 001 010 001110 BJ Wait=0, RES 1 000 000 000 001111 BJ Wait=1, RES 1 001 000 000
  • 43. + Microprogramms Horizontal Vertical 1 Longer word Shorter word 2 Little encoding of control information More encoding of control information 3 Micro data hardware path simpler Micro data hardware path more complicated 4 Ex: PowerPC’s employed horizontal code Ex: older IBM main frames (s360/s3670)used it 5 Big control memory (ROM) word length Small control memory (ROM) word length 6 Less complex, less complicated to program, more flexibility More complex, more complicated to program, less flexibility 7 More easy to modify More difficult to modify 8 Faster Slower