SlideShare una empresa de Scribd logo
1 de 29
Program Control Units
Prof. Anish Goel
TERMINOLOGY
2 Prof. Anish Goel
Controller functions
1. Fetch and instruction sequencing (fetch cycle)‐Generates
control signal to fetch instruction from memory and the
sequence of operations involved in processing an instruction
2.Instruction interpretation and execution (execution cycle)‐Tasks
involved are
 Interpreting the operand addressing mode implied in the operation
code and fetching the operands
 Sequencing the successive micro operations on the data path to
execute the operation code specified in the instruction
3.Interrupt processing (interrupt cycle)‐Process unmasked
interrupt. Tasks are
 Suspend execution of current program
 Save context
 Set PC to start address of interrupt handler routine
 Process interrupt
 Restore context and continue interrupted program
3 Prof. Anish Goel
Interaction BetweenData and Control Units
4 Prof. Anish Goel
Control Unit
5 Prof. Anish Goel
CONTROL TRANSFER
 CPU fetches and executes each instruction of the
program
 Successively goes through fetch, execute and
interrupt cycles
 Two flip‐flops marked F and E identify each of these
3 cycles
 Two general operations
 Instruction control transfer
 Program control transfer
6 Prof. Anish Goel
Instruction Cycle (with Interrupts) ‐
State Diagram
7 Prof. Anish Goel
Instruction Control Transfer
 PC holds the address of the instruction to be executed
 During fetch cycle PC is incremented to hold the address
of the next instruction
 Assuming each instruction has a length of one word, then
PC incremented by one, that is,PC <= PC + 1;
 Length of a variable length instruction needs to be
specified in some bits of the operation code field of
instruction
 Transfer of control to non sequential instruction occurs
during execution cycle of conditions branch with specified
condition satisfied or by an unconditional branch
instruction.
 Example
 Jump X (Unconditional branch to X) or
 Jump ZX (Branch to X if the result of last arithmetic operation is
zero)
 X stored in the operand field of instruction register8 Prof. Anish Goel
FETCH CYCLE
 The instruction whose address is determined by the PC
is obtained from the memory
 Loaded into the IR.
 The PC is then incremented to point to the next
instruction and switch over to execution cycle
 CPU enters fetch cycle if F=1andE=0
 Sequence of micro-operations of fetch cycle
C01:MARPC
C02C03:MDRM(MAR);PCPC+1
C04:IRMDR
C05:F0;E1
9 Prof. Anish Goel
INSTRUCTION INTERPRETATION AND
EXECUTION
 Instruction loaded into Instruction Register (IR)
 Processor interprets instruction and performs required
actions
 Different for each instruction
 e.g. ADD X, R1 ‐add the contents of location X to
Register 1 , result in R1
 C61:MAR <‐(IRaddress)
 C62:MDR <‐(memory)
 C63:R1 <‐R1 + (MDR)
Note no overlap of micro‐operations
10 Prof. Anish Goel
COMPARISON OF CONTROL UNIT
IMPLEMENTATIONS
11 Prof. Anish Goel
HARDWIRED CONTROL
 The controller is designed as a sequential logic circuit
which generates the specific sequence of control signals
as its primary output
 The sequence of 4 control signals C0,C1,C2,C3 can be
developed by using a 2 ‐ bit sequence counter
 C0=C01:MAR PC
 C1=C02 C03:MDR M(MAR);PC PC+1
 C2=C04:IR MDR
 C3=C05:F0;E1
 Sequence of micro-operations of fetch cycle
 Its output is decoded to derive the desired control signals
in the given sequence.
12 Prof. Anish Goel
Controller Block Diagram
13 Prof. Anish Goel
Detailed control sequencing
 ADD (R3), R1 High‐level execution sequence:
 Fetch instruction.
 Fetch memory operand.
 Perform addition.
 Store result in R1.
 Detailed control sequencing:
1: PCout, MARin, Read, Clear Y, Set carry‐in to ALU, Add,
Zin
2: Zout, PCin, WMFC
3: MDRout, IRin
4: R3out, MARin, Read
5: R1out, Yin, WMFC
6: MDRout, Add, ZinZout, R1in, END
14 Prof. Anish Goel
Methods for systematic design of hardwired
control logic
 Sequence counter method: To design controller of
moderate complexity
 Delay element method: Depends on the use of
clocked delay elements for generating the sequence
of control signals
 State table method: Employs the algorithmic
approach to sequential circuit design using classical
state table method
15 Prof. Anish Goel
Sequence counter method
 Step 1: Identify the distinct phases in the flowchart.
Employ log p number of flip flops to handle p number
distinct phases
 Step 2: Identify the maximum number of distinct
steps, k, in each of the phases .Employ a mod k
counter to generate control signals for each of the k
steps.
 Step 3 : design a combinational logic circuit to
generate the sequence of control signals to control
the micro operations of each phase
16 Prof. Anish Goel
Sequence counter method
17 Prof. Anish Goel
Delay element method
 Control unit based on delay element method for the
fetch cycle
18 Prof. Anish Goel
State table method
 The state Si (i=1,2…) has been marked above each
block of the flowchart.
 This the state of the controller which generates the
control signals to control the micro operations in the
data path
19 Prof. Anish Goel
Steps to design the Control structure
realizing flowchart
 State Assignment: States are assigned as
s1,s2,s3…;each such assignment specifies a
particular state of the controller at the specific time
step. State table derived from state assignment
 State Minimization: A set of states {Sa,Sb,…Sc} can
be merged to a single state S’ if Si & Sj is pair wise
compatible
 State Encoding: State variables are defined and
states are encoded in terms of state variables
20 Prof. Anish Goel
Hard‐wired Control Unit‐advantages
1. Minimizes the average number of clock cycles
needed per instruction
2. occupies a relatively small area (typically 10%) of
the CPU chip area
3. High efficiency in terms of operation speed
4. is to minimize cost of the circuit
21 Prof. Anish Goel
Problems With Hard Wired Designs
•Complex sequencing & micro‐operation logic
•Difficult to design and test
•Inflexible design
•Large design turn around time for complex design
•Difficult to add new instructions
22 Prof. Anish Goel
Microprogrammed Control
 The concept of micro programmed control, employ the following
steps:
 Any instruction to be executed on a CPU can be broken down into a
set of sequential micro operations –each specifying a RTL operation
on the data path. The set of micro operations to be executed on the
RTL components at any time step is referred as microinstructions.
 The sequence of control signals necessary to execute the sequential
microinstructions stored in ROM called control ROM
 To implement an instruction on the data path , the control signals
stored in the ROM can be accessed
 The control signals read from the ROM are used to control the micro
operations associated with a microinstruction to be executed at any
time step
 The address of the next micro instruction is generated
 The steps 3,4 and 5 are repeated till the set of sequential
microinstructions associated with the instruction is executed
23 Prof. Anish Goel
Microprogrammed Control
24 Prof. Anish Goel
Wilkes's Microprogrammed Control Unit
25 Prof. Anish Goel
Micro instruction execution
Two basic actions
 Generating next microinstruction address and fetching
micro program instruction from control memory by this
address
 Executing the micro operations controlled by different
signals encoded in various control fields of the
microinstruction
 Decoding and applying control signals on the CPU data path
 Executing the intended micro operations controlled by the
signals
 Storing the output in the destination register specified in the
micro operation on the CPU data path
26 Prof. Anish Goel
MICROINSTRUCTION SEQUENCING
Sequencing Capabilities Required in a Control Storage
Incrementing of the control address register
Unconditional and conditional branches
A mapping process from the bits of the machine instruction to an address for control memory
A facility for subroutine call and return
27 Prof. Anish Goel
Micro‐programmed Control Unit
‐Advantages
1. A micro‐programmed control unit is flexible and
allows designers to incorporate new and more
powerful instructions as VLSI technology increases
the available chip area for the CPU
2. allows any design errors discovered during the
prototyping stage to be removed
28 Prof. Anish Goel
Micro-programmed Control Unit
‐Disadvantages
1. requires several clock cycles to execute each
instruction, due to the access time of the micro-
program memory
2. Occupies a large portion (typically 55%) of the CPU
chip area
29 Prof. Anish Goel

Más contenido relacionado

La actualidad más candente

3 4- computer organization and archietecture- COA- CO- Computer organization
3 4- computer organization and archietecture- COA- CO- Computer organization3 4- computer organization and archietecture- COA- CO- Computer organization
3 4- computer organization and archietecture- COA- CO- Computer organizationJay Patel
 
Microinstruction sequencing new
Microinstruction sequencing newMicroinstruction sequencing new
Microinstruction sequencing newMahesh Kumar Attri
 
Unit 2 ca- control unit
Unit 2 ca- control unitUnit 2 ca- control unit
Unit 2 ca- control unitBBDITM LUCKNOW
 
Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control UnitKamal Acharya
 
Control unit-implementation
Control unit-implementationControl unit-implementation
Control unit-implementationWBUTTUTORIALS
 
BLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
BLOCK DIAGRAM OF HARDWIRED CONTROL UNITBLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
BLOCK DIAGRAM OF HARDWIRED CONTROL UNITRahul Sharma
 
Basic processing unit by aniket bhute
Basic processing unit by aniket bhuteBasic processing unit by aniket bhute
Basic processing unit by aniket bhuteAniket Bhute
 
Computer Organization
Computer OrganizationComputer Organization
Computer OrganizationAnish Goel
 
Microarchitecture
MicroarchitectureMicroarchitecture
Microarchitecturemeashi
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed controlShashank Singh
 
Unit2 control unit
Unit2 control unitUnit2 control unit
Unit2 control unitAshim Saha
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit DesignVinit Raut
 

La actualidad más candente (20)

Hardwired control
Hardwired controlHardwired control
Hardwired control
 
3 4- computer organization and archietecture- COA- CO- Computer organization
3 4- computer organization and archietecture- COA- CO- Computer organization3 4- computer organization and archietecture- COA- CO- Computer organization
3 4- computer organization and archietecture- COA- CO- Computer organization
 
Microinstruction sequencing new
Microinstruction sequencing newMicroinstruction sequencing new
Microinstruction sequencing new
 
Unit 2 ca- control unit
Unit 2 ca- control unitUnit 2 ca- control unit
Unit 2 ca- control unit
 
Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control Unit
 
Control unit-implementation
Control unit-implementationControl unit-implementation
Control unit-implementation
 
BLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
BLOCK DIAGRAM OF HARDWIRED CONTROL UNITBLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
BLOCK DIAGRAM OF HARDWIRED CONTROL UNIT
 
control unit
control unitcontrol unit
control unit
 
Basic processing unit by aniket bhute
Basic processing unit by aniket bhuteBasic processing unit by aniket bhute
Basic processing unit by aniket bhute
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Microarchitecture
MicroarchitectureMicroarchitecture
Microarchitecture
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed control
 
Control unit
Control unitControl unit
Control unit
 
Unit2 control unit
Unit2 control unitUnit2 control unit
Unit2 control unit
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Ch7 official
Ch7 officialCh7 official
Ch7 official
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 

Similar a Program Control Units: Fetch, Execution & Interrupt Cycles

20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptxPerumalPitchandi
 
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnnchapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnnNineTo1
 
assignment on control unit and control signal micro instruction
assignment on control unit and control signal micro instructionassignment on control unit and control signal micro instruction
assignment on control unit and control signal micro instructionChHusnainHassanI
 
Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptxgodfrey35
 
MIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptxMIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptxJEEVANANTHAMG6
 
Basic_Processing_Unit.pdf
Basic_Processing_Unit.pdfBasic_Processing_Unit.pdf
Basic_Processing_Unit.pdfUmamaheswariV4
 
Design pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelinesDesign pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelinesMahmudul Hasan
 
Timing and control
Timing and controlTiming and control
Timing and controlchauhankapil
 
Design_amp_analysis_of_16_bit_RISC_processor_using_low_power_pipelining.pdf
Design_amp_analysis_of_16_bit_RISC_processor_using_low_power_pipelining.pdfDesign_amp_analysis_of_16_bit_RISC_processor_using_low_power_pipelining.pdf
Design_amp_analysis_of_16_bit_RISC_processor_using_low_power_pipelining.pdfssuser1e1bab
 
chapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptchapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptPoliceNiranjanReddy
 
computer architecture
computer architecturecomputer architecture
computer architecturePandiya Rajan
 

Similar a Program Control Units: Fetch, Execution & Interrupt Cycles (20)

4876238.ppt
4876238.ppt4876238.ppt
4876238.ppt
 
Control unit
Control unit Control unit
Control unit
 
20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx20IT204-COA- Lecture 17.pptx
20IT204-COA- Lecture 17.pptx
 
Thesis1 3-23
Thesis1 3-23Thesis1 3-23
Thesis1 3-23
 
Control Memory
Control MemoryControl Memory
Control Memory
 
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnnchapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
chapter3_CA.pptt nnnnnnnnnnnnnnnnnnnnnnn
 
assignment on control unit and control signal micro instruction
assignment on control unit and control signal micro instructionassignment on control unit and control signal micro instruction
assignment on control unit and control signal micro instruction
 
Dp&amp;co
Dp&amp;coDp&amp;co
Dp&amp;co
 
Lecture on PIC-1.pptx
Lecture on PIC-1.pptxLecture on PIC-1.pptx
Lecture on PIC-1.pptx
 
Digital-Unit-III.ppt
Digital-Unit-III.pptDigital-Unit-III.ppt
Digital-Unit-III.ppt
 
MIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptxMIPS IMPLEMENTATION.pptx
MIPS IMPLEMENTATION.pptx
 
Basic_Processing_Unit.pdf
Basic_Processing_Unit.pdfBasic_Processing_Unit.pdf
Basic_Processing_Unit.pdf
 
Design pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelinesDesign pipeline architecture for various stage pipelines
Design pipeline architecture for various stage pipelines
 
Timing and control
Timing and controlTiming and control
Timing and control
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit 2
Unit 2Unit 2
Unit 2
 
Unit 3 CO.pptx
Unit 3 CO.pptxUnit 3 CO.pptx
Unit 3 CO.pptx
 
Design_amp_analysis_of_16_bit_RISC_processor_using_low_power_pipelining.pdf
Design_amp_analysis_of_16_bit_RISC_processor_using_low_power_pipelining.pdfDesign_amp_analysis_of_16_bit_RISC_processor_using_low_power_pipelining.pdf
Design_amp_analysis_of_16_bit_RISC_processor_using_low_power_pipelining.pdf
 
chapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptchapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.ppt
 
computer architecture
computer architecturecomputer architecture
computer architecture
 

Último

Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHSneha Padhiar
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptxmohitesoham12
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionSneha Padhiar
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfBalamuruganV28
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSsandhya757531
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSneha Padhiar
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptJohnWilliam111370
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Romil Mishra
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.elesangwon
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxStephen Sitton
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxRomil Mishra
 
Theory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfTheory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfShreyas Pandit
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communicationpanditadesh123
 
STATE TRANSITION DIAGRAM in psoc subject
STATE TRANSITION DIAGRAM in psoc subjectSTATE TRANSITION DIAGRAM in psoc subject
STATE TRANSITION DIAGRAM in psoc subjectGayathriM270621
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsResearcher Researcher
 
70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical trainingGladiatorsKasper
 

Último (20)

Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptxTriangulation survey (Basic Mine Surveying)_MI10412MI.pptx
Triangulation survey (Basic Mine Surveying)_MI10412MI.pptx
 
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACHTEST CASE GENERATION GENERATION BLOCK BOX APPROACH
TEST CASE GENERATION GENERATION BLOCK BOX APPROACH
 
Python Programming for basic beginners.pptx
Python Programming for basic beginners.pptxPython Programming for basic beginners.pptx
Python Programming for basic beginners.pptx
 
Cost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based questionCost estimation approach: FP to COCOMO scenario based question
Cost estimation approach: FP to COCOMO scenario based question
 
CS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdfCS 3251 Programming in c all unit notes pdf
CS 3251 Programming in c all unit notes pdf
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMSHigh Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
High Voltage Engineering- OVER VOLTAGES IN ELECTRICAL POWER SYSTEMS
 
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATIONSOFTWARE ESTIMATION COCOMO AND FP CALCULATION
SOFTWARE ESTIMATION COCOMO AND FP CALCULATION
 
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.pptROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
ROBOETHICS-CCS345 ETHICS AND ARTIFICIAL INTELLIGENCE.ppt
 
Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________Gravity concentration_MI20612MI_________
Gravity concentration_MI20612MI_________
 
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
2022 AWS DNA Hackathon 장애 대응 솔루션 jarvis.
 
Turn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptxTurn leadership mistakes into a better future.pptx
Turn leadership mistakes into a better future.pptx
 
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptxCurve setting (Basic Mine Surveying)_MI10412MI.pptx
Curve setting (Basic Mine Surveying)_MI10412MI.pptx
 
Designing pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptxDesigning pile caps according to ACI 318-19.pptx
Designing pile caps according to ACI 318-19.pptx
 
Theory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdfTheory of Machine Notes / Lecture Material .pdf
Theory of Machine Notes / Lecture Material .pdf
 
multiple access in wireless communication
multiple access in wireless communicationmultiple access in wireless communication
multiple access in wireless communication
 
STATE TRANSITION DIAGRAM in psoc subject
STATE TRANSITION DIAGRAM in psoc subjectSTATE TRANSITION DIAGRAM in psoc subject
STATE TRANSITION DIAGRAM in psoc subject
 
Novel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending ActuatorsNovel 3D-Printed Soft Linear and Bending Actuators
Novel 3D-Printed Soft Linear and Bending Actuators
 
70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training70 POWER PLANT IAE V2500 technical training
70 POWER PLANT IAE V2500 technical training
 

Program Control Units: Fetch, Execution & Interrupt Cycles

  • 3. Controller functions 1. Fetch and instruction sequencing (fetch cycle)‐Generates control signal to fetch instruction from memory and the sequence of operations involved in processing an instruction 2.Instruction interpretation and execution (execution cycle)‐Tasks involved are  Interpreting the operand addressing mode implied in the operation code and fetching the operands  Sequencing the successive micro operations on the data path to execute the operation code specified in the instruction 3.Interrupt processing (interrupt cycle)‐Process unmasked interrupt. Tasks are  Suspend execution of current program  Save context  Set PC to start address of interrupt handler routine  Process interrupt  Restore context and continue interrupted program 3 Prof. Anish Goel
  • 4. Interaction BetweenData and Control Units 4 Prof. Anish Goel
  • 5. Control Unit 5 Prof. Anish Goel
  • 6. CONTROL TRANSFER  CPU fetches and executes each instruction of the program  Successively goes through fetch, execute and interrupt cycles  Two flip‐flops marked F and E identify each of these 3 cycles  Two general operations  Instruction control transfer  Program control transfer 6 Prof. Anish Goel
  • 7. Instruction Cycle (with Interrupts) ‐ State Diagram 7 Prof. Anish Goel
  • 8. Instruction Control Transfer  PC holds the address of the instruction to be executed  During fetch cycle PC is incremented to hold the address of the next instruction  Assuming each instruction has a length of one word, then PC incremented by one, that is,PC <= PC + 1;  Length of a variable length instruction needs to be specified in some bits of the operation code field of instruction  Transfer of control to non sequential instruction occurs during execution cycle of conditions branch with specified condition satisfied or by an unconditional branch instruction.  Example  Jump X (Unconditional branch to X) or  Jump ZX (Branch to X if the result of last arithmetic operation is zero)  X stored in the operand field of instruction register8 Prof. Anish Goel
  • 9. FETCH CYCLE  The instruction whose address is determined by the PC is obtained from the memory  Loaded into the IR.  The PC is then incremented to point to the next instruction and switch over to execution cycle  CPU enters fetch cycle if F=1andE=0  Sequence of micro-operations of fetch cycle C01:MARPC C02C03:MDRM(MAR);PCPC+1 C04:IRMDR C05:F0;E1 9 Prof. Anish Goel
  • 10. INSTRUCTION INTERPRETATION AND EXECUTION  Instruction loaded into Instruction Register (IR)  Processor interprets instruction and performs required actions  Different for each instruction  e.g. ADD X, R1 ‐add the contents of location X to Register 1 , result in R1  C61:MAR <‐(IRaddress)  C62:MDR <‐(memory)  C63:R1 <‐R1 + (MDR) Note no overlap of micro‐operations 10 Prof. Anish Goel
  • 11. COMPARISON OF CONTROL UNIT IMPLEMENTATIONS 11 Prof. Anish Goel
  • 12. HARDWIRED CONTROL  The controller is designed as a sequential logic circuit which generates the specific sequence of control signals as its primary output  The sequence of 4 control signals C0,C1,C2,C3 can be developed by using a 2 ‐ bit sequence counter  C0=C01:MAR PC  C1=C02 C03:MDR M(MAR);PC PC+1  C2=C04:IR MDR  C3=C05:F0;E1  Sequence of micro-operations of fetch cycle  Its output is decoded to derive the desired control signals in the given sequence. 12 Prof. Anish Goel
  • 13. Controller Block Diagram 13 Prof. Anish Goel
  • 14. Detailed control sequencing  ADD (R3), R1 High‐level execution sequence:  Fetch instruction.  Fetch memory operand.  Perform addition.  Store result in R1.  Detailed control sequencing: 1: PCout, MARin, Read, Clear Y, Set carry‐in to ALU, Add, Zin 2: Zout, PCin, WMFC 3: MDRout, IRin 4: R3out, MARin, Read 5: R1out, Yin, WMFC 6: MDRout, Add, ZinZout, R1in, END 14 Prof. Anish Goel
  • 15. Methods for systematic design of hardwired control logic  Sequence counter method: To design controller of moderate complexity  Delay element method: Depends on the use of clocked delay elements for generating the sequence of control signals  State table method: Employs the algorithmic approach to sequential circuit design using classical state table method 15 Prof. Anish Goel
  • 16. Sequence counter method  Step 1: Identify the distinct phases in the flowchart. Employ log p number of flip flops to handle p number distinct phases  Step 2: Identify the maximum number of distinct steps, k, in each of the phases .Employ a mod k counter to generate control signals for each of the k steps.  Step 3 : design a combinational logic circuit to generate the sequence of control signals to control the micro operations of each phase 16 Prof. Anish Goel
  • 17. Sequence counter method 17 Prof. Anish Goel
  • 18. Delay element method  Control unit based on delay element method for the fetch cycle 18 Prof. Anish Goel
  • 19. State table method  The state Si (i=1,2…) has been marked above each block of the flowchart.  This the state of the controller which generates the control signals to control the micro operations in the data path 19 Prof. Anish Goel
  • 20. Steps to design the Control structure realizing flowchart  State Assignment: States are assigned as s1,s2,s3…;each such assignment specifies a particular state of the controller at the specific time step. State table derived from state assignment  State Minimization: A set of states {Sa,Sb,…Sc} can be merged to a single state S’ if Si & Sj is pair wise compatible  State Encoding: State variables are defined and states are encoded in terms of state variables 20 Prof. Anish Goel
  • 21. Hard‐wired Control Unit‐advantages 1. Minimizes the average number of clock cycles needed per instruction 2. occupies a relatively small area (typically 10%) of the CPU chip area 3. High efficiency in terms of operation speed 4. is to minimize cost of the circuit 21 Prof. Anish Goel
  • 22. Problems With Hard Wired Designs •Complex sequencing & micro‐operation logic •Difficult to design and test •Inflexible design •Large design turn around time for complex design •Difficult to add new instructions 22 Prof. Anish Goel
  • 23. Microprogrammed Control  The concept of micro programmed control, employ the following steps:  Any instruction to be executed on a CPU can be broken down into a set of sequential micro operations –each specifying a RTL operation on the data path. The set of micro operations to be executed on the RTL components at any time step is referred as microinstructions.  The sequence of control signals necessary to execute the sequential microinstructions stored in ROM called control ROM  To implement an instruction on the data path , the control signals stored in the ROM can be accessed  The control signals read from the ROM are used to control the micro operations associated with a microinstruction to be executed at any time step  The address of the next micro instruction is generated  The steps 3,4 and 5 are repeated till the set of sequential microinstructions associated with the instruction is executed 23 Prof. Anish Goel
  • 25. Wilkes's Microprogrammed Control Unit 25 Prof. Anish Goel
  • 26. Micro instruction execution Two basic actions  Generating next microinstruction address and fetching micro program instruction from control memory by this address  Executing the micro operations controlled by different signals encoded in various control fields of the microinstruction  Decoding and applying control signals on the CPU data path  Executing the intended micro operations controlled by the signals  Storing the output in the destination register specified in the micro operation on the CPU data path 26 Prof. Anish Goel
  • 27. MICROINSTRUCTION SEQUENCING Sequencing Capabilities Required in a Control Storage Incrementing of the control address register Unconditional and conditional branches A mapping process from the bits of the machine instruction to an address for control memory A facility for subroutine call and return 27 Prof. Anish Goel
  • 28. Micro‐programmed Control Unit ‐Advantages 1. A micro‐programmed control unit is flexible and allows designers to incorporate new and more powerful instructions as VLSI technology increases the available chip area for the CPU 2. allows any design errors discovered during the prototyping stage to be removed 28 Prof. Anish Goel
  • 29. Micro-programmed Control Unit ‐Disadvantages 1. requires several clock cycles to execute each instruction, due to the access time of the micro- program memory 2. Occupies a large portion (typically 55%) of the CPU chip area 29 Prof. Anish Goel