SlideShare a Scribd company logo
William Stallings
Computer Organization
and Architecture
7th
Edition
Chapter 16
Control Unit Operation
Micro-Operations
• A computer executes a program
• Fetch/execute cycle
• Each cycle has a number of steps
—see pipelining
• Called micro-operations
• Each step does very little
• Atomic operation of CPU
Constituent Elements of
Program Execution
Fetch - 4 Registers
• Memory Address Register (MAR)
—Connected to address bus
—Specifies address for read or write op
• Memory Buffer Register (MBR)
—Connected to data bus
—Holds data to write or last data read
• Program Counter (PC)
—Holds address of next instruction to be fetched
• Instruction Register (IR)
—Holds last instruction fetched
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
Fetch Sequence (symbolic)
• t1:MAR <- (PC)
• t2:MBR <- (memory)
• PC <- (PC) +1
• t3:IR <- (MBR)
• (tx = time unit/clock cycle)
• 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
Indirect Cycle
• 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?)
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
—N.B. saving context is done by interrupt
handler routine, not micro-ops
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)
• Note no overlap of micro-operations
Execute Cycle (ISZ)
• ISZ X - increment and skip if zero
—t1: MAR <- (IRaddress)
—t2: MBR <- (memory)
—t3: MBR <- (MBR) + 1
—t4: memory <- (MBR)
— if (MBR) == 0 then PC <- (PC) + 1
• Notes:
—if is a single micro-operation
—Micro-operations done during t4
Execute Cycle (BSA)
• BSA X - Branch and save address
—Address of instruction following BSA is saved
in X
—Execution continues from X+1
—t1: MAR <- (IRaddress)
— MBR <- (PC)
—t2: PC <- (IRaddress)
— memory <- (MBR)
—t3: PC <- (PC) + 1
Instruction Cycle
• Each phase decomposed into sequence of
elementary micro-operations
• E.g. fetch, indirect, and interrupt cycles
• Execute cycle
—One sequence of micro-operations for each
opcode
• Need to tie sequences together
• Assume new 2-bit register
—Instruction cycle code (ICC) designates which
part of cycle processor is in
– 00: Fetch
– 01: Indirect
– 10: Execute
– 11: Interrupt
Flowchart for Instruction Cycle
Functional Requirements
• Define basic elements of processor
• Describe micro-operations processor
performs
• Determine functions control unit must
perform
Basic Elements of Processor
• ALU
• Registers
• Internal data pahs
• External data paths
• Control Unit
Types of Micro-operation
• Transfer data between registers
• Transfer data from register to external
• Transfer data from external to register
• Perform arithmetic or logical ops
Functions of Control Unit
• Sequencing
—Causing the CPU to step through a series of
micro-operations
• Execution
—Causing the performance of each micro-op
• This is done using Control Signals
Control Signals
• Clock
—One micro-instruction (or set of parallel micro-
instructions) per clock cycle
• Instruction register
—Op-code for current instruction
—Determines which micro-instructions are
performed
• Flags
—State of CPU
—Results of previous operations
• From control bus
—Interrupts
—Acknowledgements
Model of Control Unit
Control Signals - output
• Within CPU
—Cause data movement
—Activate specific functions
• Via control bus
—To memory
—To I/O modules
Example Control Signal Sequence - Fetch
• MAR <- (PC)
—Control unit activates signal to open gates
between PC and MAR
• MBR <- (memory)
—Open gates between MAR and address bus
—Memory read control signal
—Open gates between data bus and MBR
Data Paths and Control Signals
Internal Organization
• Usually a single internal bus
• Gates control movement of data onto and
off the bus
• Control signals control data transfer to
and from external systems bus
• Temporary registers needed for proper
operation of ALU
CPU with
Internal
Bus
Intel 8085 CPU Block Diagram
Intel 8085 Pin
Configuration
Intel 8085 OUT Instruction
Timing Diagram
Hardwired Implementation (1)
• Control unit inputs
• Flags and control bus
—Each bit means something
• Instruction register
—Op-code causes different control signals for
each different instruction
—Unique logic for each op-code
—Decoder takes encoded input and produces
single output
—n binary inputs and 2n
outputs
Hardwired Implementation (2)
• Clock
—Repetitive sequence of pulses
—Useful for measuring duration of micro-ops
—Must be long enough to allow signal
propagation
—Different control signals at different times
within instruction cycle
—Need a counter with different control signals
for t1, t2 etc.
Control Unit with Decoded Inputs
Problems With Hard Wired Designs
• Complex sequencing & micro-operation
logic
• Difficult to design and test
• Inflexible design
• Difficult to add new instructions
Required Reading
• Stallings chapter 16

More Related Content

What's hot

Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
mali yogesh kumar
 
Control unit design
Control unit designControl unit design
Control unit design
Dhaval Bagal
 
chapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptchapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.ppt
PoliceNiranjanReddy
 
IO Techniques in Computer Organization
IO Techniques in Computer OrganizationIO Techniques in Computer Organization
IO Techniques in Computer Organization
Om Prakash
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
Vinit Raut
 
Chapter 8
Chapter 8Chapter 8
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
Kamal Acharya
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
Subhasis Dash
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
Asif Iqbal
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
Vinit Raut
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5Umang Gupta
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
cs19club
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Designmekind
 
Timing and control circuit
Timing and control circuitTiming and control circuit
Timing and control circuit
Rajan Shah
 
Control unit
Control  unitControl  unit
Control unit
Sameer Patil
 
Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionCésar de Souza
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
Kamal Acharya
 
Introduction to Computer Architecture
Introduction to Computer ArchitectureIntroduction to Computer Architecture
Introduction to Computer ArchitectureAnkush Srivastava
 
Computer architecture and organization
Computer architecture and organizationComputer architecture and organization
Computer architecture and organization
Tushar B Kute
 

What's hot (20)

Computer Architecture and organization ppt.
Computer Architecture and organization ppt.Computer Architecture and organization ppt.
Computer Architecture and organization ppt.
 
Control unit design
Control unit designControl unit design
Control unit design
 
chapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptchapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.ppt
 
IO Techniques in Computer Organization
IO Techniques in Computer OrganizationIO Techniques in Computer Organization
IO Techniques in Computer Organization
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Pipelining and vector processing
Pipelining and vector processingPipelining and vector processing
Pipelining and vector processing
 
Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1) Computer Organisation & Architecture (chapter 1)
Computer Organisation & Architecture (chapter 1)
 
Register organization, stack
Register organization, stackRegister organization, stack
Register organization, stack
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Computer organiztion5
Computer organiztion5Computer organiztion5
Computer organiztion5
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
Timing and control circuit
Timing and control circuitTiming and control circuit
Timing and control circuit
 
Control unit
Control  unitControl  unit
Control unit
 
Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and Interconection
 
Input Output Organization
Input Output OrganizationInput Output Organization
Input Output Organization
 
Introduction to Computer Architecture
Introduction to Computer ArchitectureIntroduction to Computer Architecture
Introduction to Computer Architecture
 
Computer architecture and organization
Computer architecture and organizationComputer architecture and organization
Computer architecture and organization
 

Similar to 16 control unit

Control unit
Control unitControl unit
Control unit
Syed Zaid Irshad
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processorMuhammad Ishaq
 
CPU.ppd
CPU.ppdCPU.ppd
Chapter01 (1).ppt
Chapter01 (1).pptChapter01 (1).ppt
Chapter01 (1).ppt
AvadhRakholiya3
 
For students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionFor students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionlimyamahgoub
 
03 top level view of computer function and interconnection
03 top level view of computer function and interconnection03 top level view of computer function and interconnection
03 top level view of computer function and interconnectionSher Shah Merkhel
 
Cs intro-ca
Cs intro-caCs intro-ca
Cs intro-ca
aniketbijwe143
 
03_Buses (1).ppt
03_Buses (1).ppt03_Buses (1).ppt
03_Buses (1).ppt
WanizaSiddiqui
 
Chap 3 CA.pptx
Chap 3 CA.pptxChap 3 CA.pptx
Chap 3 CA.pptx
SahalAhmed4
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnectionSajid Marwat
 
cs-procstruc.ppt
cs-procstruc.pptcs-procstruc.ppt
cs-procstruc.ppt
Mohamoud Saed Mohamed
 
pipeline and pipeline hazards
pipeline and pipeline hazards pipeline and pipeline hazards
pipeline and pipeline hazards
Bharti Khemani
 
IT209 Cpu Structure Report
IT209 Cpu Structure ReportIT209 Cpu Structure Report
IT209 Cpu Structure ReportBis Aquino
 
03 top level view of computer function and interconnection.ppt.enc
03 top level view of computer function and interconnection.ppt.enc03 top level view of computer function and interconnection.ppt.enc
03 top level view of computer function and interconnection.ppt.enc
Anwal Mirza
 
03 buses
03 buses03 buses
03 buses
dilip kumar
 
Basic Computer Architecture
Basic Computer ArchitectureBasic Computer Architecture
Basic Computer Architecture
Yong Heui Cho
 
Wk 4 top_level_view_of_computer_function_and_interconnection
Wk 4 top_level_view_of_computer_function_and_interconnectionWk 4 top_level_view_of_computer_function_and_interconnection
Wk 4 top_level_view_of_computer_function_and_interconnection
limyamahgoub
 
UNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsUNIT 3 - General Purpose Processors
UNIT 3 - General Purpose Processors
ButtaRajasekhar2
 
12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and function
dilip kumar
 
Basic non pipelined cpu architecture
Basic non pipelined cpu architectureBasic non pipelined cpu architecture
Basic non pipelined cpu architecture
kalyani yogeswaranathan
 

Similar to 16 control unit (20)

Control unit
Control unitControl unit
Control unit
 
Micro operation control of processor
Micro operation control of processorMicro operation control of processor
Micro operation control of processor
 
CPU.ppd
CPU.ppdCPU.ppd
CPU.ppd
 
Chapter01 (1).ppt
Chapter01 (1).pptChapter01 (1).ppt
Chapter01 (1).ppt
 
For students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnectionFor students wk4_computer_function_and_interconnection
For students wk4_computer_function_and_interconnection
 
03 top level view of computer function and interconnection
03 top level view of computer function and interconnection03 top level view of computer function and interconnection
03 top level view of computer function and interconnection
 
Cs intro-ca
Cs intro-caCs intro-ca
Cs intro-ca
 
03_Buses (1).ppt
03_Buses (1).ppt03_Buses (1).ppt
03_Buses (1).ppt
 
Chap 3 CA.pptx
Chap 3 CA.pptxChap 3 CA.pptx
Chap 3 CA.pptx
 
top level view of computer function and interconnection
top level view of computer function and interconnectiontop level view of computer function and interconnection
top level view of computer function and interconnection
 
cs-procstruc.ppt
cs-procstruc.pptcs-procstruc.ppt
cs-procstruc.ppt
 
pipeline and pipeline hazards
pipeline and pipeline hazards pipeline and pipeline hazards
pipeline and pipeline hazards
 
IT209 Cpu Structure Report
IT209 Cpu Structure ReportIT209 Cpu Structure Report
IT209 Cpu Structure Report
 
03 top level view of computer function and interconnection.ppt.enc
03 top level view of computer function and interconnection.ppt.enc03 top level view of computer function and interconnection.ppt.enc
03 top level view of computer function and interconnection.ppt.enc
 
03 buses
03 buses03 buses
03 buses
 
Basic Computer Architecture
Basic Computer ArchitectureBasic Computer Architecture
Basic Computer Architecture
 
Wk 4 top_level_view_of_computer_function_and_interconnection
Wk 4 top_level_view_of_computer_function_and_interconnectionWk 4 top_level_view_of_computer_function_and_interconnection
Wk 4 top_level_view_of_computer_function_and_interconnection
 
UNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsUNIT 3 - General Purpose Processors
UNIT 3 - General Purpose Processors
 
12 processor structure and function
12 processor structure and function12 processor structure and function
12 processor structure and function
 
Basic non pipelined cpu architecture
Basic non pipelined cpu architectureBasic non pipelined cpu architecture
Basic non pipelined cpu architecture
 

More from dilip kumar

FLAT Notes
FLAT NotesFLAT Notes
FLAT Notes
dilip kumar
 
18 parallel processing
18 parallel processing18 parallel processing
18 parallel processing
dilip kumar
 
17 micro programmed control
17 micro programmed control17 micro programmed control
17 micro programmed control
dilip kumar
 
15 ia64
15 ia6415 ia64
15 ia64
dilip kumar
 
14 superscalar
14 superscalar14 superscalar
14 superscalar
dilip kumar
 
13 risc
13 risc13 risc
13 risc
dilip kumar
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
dilip kumar
 
10 instruction sets characteristics
10 instruction sets characteristics10 instruction sets characteristics
10 instruction sets characteristics
dilip kumar
 
09 arithmetic
09 arithmetic09 arithmetic
09 arithmetic
dilip kumar
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
dilip kumar
 
07 input output
07 input output07 input output
07 input output
dilip kumar
 
06 external memory
06 external memory06 external memory
06 external memory
dilip kumar
 
05 internal memory
05 internal memory05 internal memory
05 internal memory
dilip kumar
 
04 cache memory
04 cache memory04 cache memory
04 cache memory
dilip kumar
 
02 computer evolution and performance
02 computer evolution and performance02 computer evolution and performance
02 computer evolution and performance
dilip kumar
 
01 introduction
01 introduction01 introduction
01 introduction
dilip kumar
 

More from dilip kumar (16)

FLAT Notes
FLAT NotesFLAT Notes
FLAT Notes
 
18 parallel processing
18 parallel processing18 parallel processing
18 parallel processing
 
17 micro programmed control
17 micro programmed control17 micro programmed control
17 micro programmed control
 
15 ia64
15 ia6415 ia64
15 ia64
 
14 superscalar
14 superscalar14 superscalar
14 superscalar
 
13 risc
13 risc13 risc
13 risc
 
11 instruction sets addressing modes
11  instruction sets addressing modes 11  instruction sets addressing modes
11 instruction sets addressing modes
 
10 instruction sets characteristics
10 instruction sets characteristics10 instruction sets characteristics
10 instruction sets characteristics
 
09 arithmetic
09 arithmetic09 arithmetic
09 arithmetic
 
08 operating system support
08 operating system support08 operating system support
08 operating system support
 
07 input output
07 input output07 input output
07 input output
 
06 external memory
06 external memory06 external memory
06 external memory
 
05 internal memory
05 internal memory05 internal memory
05 internal memory
 
04 cache memory
04 cache memory04 cache memory
04 cache memory
 
02 computer evolution and performance
02 computer evolution and performance02 computer evolution and performance
02 computer evolution and performance
 
01 introduction
01 introduction01 introduction
01 introduction
 

Recently uploaded

Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 

Recently uploaded (20)

Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 

16 control unit

  • 1. William Stallings Computer Organization and Architecture 7th Edition Chapter 16 Control Unit Operation
  • 2. Micro-Operations • A computer executes a program • Fetch/execute cycle • Each cycle has a number of steps —see pipelining • Called micro-operations • Each step does very little • Atomic operation of CPU
  • 4. Fetch - 4 Registers • Memory Address Register (MAR) —Connected to address bus —Specifies address for read or write op • Memory Buffer Register (MBR) —Connected to data bus —Holds data to write or last data read • Program Counter (PC) —Holds address of next instruction to be fetched • Instruction Register (IR) —Holds last instruction fetched
  • 5. 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
  • 6. Fetch Sequence (symbolic) • t1:MAR <- (PC) • t2:MBR <- (memory) • PC <- (PC) +1 • t3:IR <- (MBR) • (tx = time unit/clock cycle) • or • t1:MAR <- (PC) • t2:MBR <- (memory) • t3:PC <- (PC) +1 • IR <- (MBR)
  • 7. 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
  • 8. Indirect Cycle • 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?)
  • 9. 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 —N.B. saving context is done by interrupt handler routine, not micro-ops
  • 10. 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) • Note no overlap of micro-operations
  • 11. Execute Cycle (ISZ) • ISZ X - increment and skip if zero —t1: MAR <- (IRaddress) —t2: MBR <- (memory) —t3: MBR <- (MBR) + 1 —t4: memory <- (MBR) — if (MBR) == 0 then PC <- (PC) + 1 • Notes: —if is a single micro-operation —Micro-operations done during t4
  • 12. Execute Cycle (BSA) • BSA X - Branch and save address —Address of instruction following BSA is saved in X —Execution continues from X+1 —t1: MAR <- (IRaddress) — MBR <- (PC) —t2: PC <- (IRaddress) — memory <- (MBR) —t3: PC <- (PC) + 1
  • 13. Instruction Cycle • Each phase decomposed into sequence of elementary micro-operations • E.g. fetch, indirect, and interrupt cycles • Execute cycle —One sequence of micro-operations for each opcode • Need to tie sequences together • Assume new 2-bit register —Instruction cycle code (ICC) designates which part of cycle processor is in – 00: Fetch – 01: Indirect – 10: Execute – 11: Interrupt
  • 15. Functional Requirements • Define basic elements of processor • Describe micro-operations processor performs • Determine functions control unit must perform
  • 16. Basic Elements of Processor • ALU • Registers • Internal data pahs • External data paths • Control Unit
  • 17. Types of Micro-operation • Transfer data between registers • Transfer data from register to external • Transfer data from external to register • Perform arithmetic or logical ops
  • 18. Functions of Control Unit • Sequencing —Causing the CPU to step through a series of micro-operations • Execution —Causing the performance of each micro-op • This is done using Control Signals
  • 19. Control Signals • Clock —One micro-instruction (or set of parallel micro- instructions) per clock cycle • Instruction register —Op-code for current instruction —Determines which micro-instructions are performed • Flags —State of CPU —Results of previous operations • From control bus —Interrupts —Acknowledgements
  • 21. Control Signals - output • Within CPU —Cause data movement —Activate specific functions • Via control bus —To memory —To I/O modules
  • 22. Example Control Signal Sequence - Fetch • MAR <- (PC) —Control unit activates signal to open gates between PC and MAR • MBR <- (memory) —Open gates between MAR and address bus —Memory read control signal —Open gates between data bus and MBR
  • 23. Data Paths and Control Signals
  • 24. Internal Organization • Usually a single internal bus • Gates control movement of data onto and off the bus • Control signals control data transfer to and from external systems bus • Temporary registers needed for proper operation of ALU
  • 26. Intel 8085 CPU Block Diagram
  • 28. Intel 8085 OUT Instruction Timing Diagram
  • 29. Hardwired Implementation (1) • Control unit inputs • Flags and control bus —Each bit means something • Instruction register —Op-code causes different control signals for each different instruction —Unique logic for each op-code —Decoder takes encoded input and produces single output —n binary inputs and 2n outputs
  • 30. Hardwired Implementation (2) • Clock —Repetitive sequence of pulses —Useful for measuring duration of micro-ops —Must be long enough to allow signal propagation —Different control signals at different times within instruction cycle —Need a counter with different control signals for t1, t2 etc.
  • 31. Control Unit with Decoded Inputs
  • 32. Problems With Hard Wired Designs • Complex sequencing & micro-operation logic • Difficult to design and test • Inflexible design • Difficult to add new instructions