SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Basic Processing Unit

                              V.Saranya
                                AP/CSE
   Sri Vidya College of Engineering and
                            Technology,
                          Virudhunagar
Objective
Execution of Instructions.
Single Bus Organization of the Processor.
Multiple Bus Organization of the Processors.
Some Fundamental Concepts
 Processor (CPU): the active part of the
  computer, which does all the work (data
  manipulation and decision-making).
 Datapath: portion of the processor which
  contains hardware necessary to perform all
  operations required by the computer (the
  brawn).
 Control: portion of the processor (also in
  hardware) which tells the data path what needs
  to be done (the brain).
Instruction
 Instruction execution    Fetch

 cycle:
                           Instruction
 fetch, decode, execute    Decode
 .
    Fetch: fetch next     Operand
                           Fetch
     instruction  (using
     PC) from memory       Execute
     into IR.
                           Result
    Decode: decode the    Store
     instruction.
    Execute: execute
                           Next
                           Instruction
     instruction.
Fetch
 Fetch: Fetch next instruction into IR
 (Instruction Register).
   Assume each word is 4 bytes and each
    instruction is stored in a word, and that
    the memory is byte addressable.
   PC (Program Counter) contains address
    of next instruction.
          IR  [[PC]]
          PC [PC] + 4
Single Bus Organization
                                                        Internal processor bus


                                                                                   Control signals
                                   PC
                                                                                       ...
                                                                                 Instruction decoder
              Address line                                                       and control logic
                                   MAR
Memory bus
                                   MDR
                 Data line
                                                                                 IR
                                   Y
              Constant 4
                                                                                 RO
  Select                     MUX
                                                                                        :
                                                                                        :
                Add
                               A         B                                       R(n–1)
ALU control     Sub
lines                 :            ALU
                                             Carry-in
                 XOR
                                                                                 TEMP

                                   Z
Instruction Execution
 An instruction can be executed by performing one
  or more of the following operations in some
  specified sequence:
    Transfer a word of data from one register to
     another or to the ALU (Arithmetic Logic Unit).
    Perform an arithmetic or a logic operation and
     store the result in a register.
    Fetch the contents of a given memory location
     and load them into a register.
    Store a word of data from a register into a given
     memory location.
Register Transfer
 Register to register transfer:
    For each register Ri, two control signals:
       Riin used to load the data on the bus into the
        register.
       Riout to place the register’s contents on the
        bus.
    Example: To transfer contents of R1 to R4:
       Set R1out to 1. This places contents of R1 on
        the bus.
       Set R4in to 1. This loads data from the
        processor bus into R4.
Register Transfer (2)
                                              Internal processor
                                              bus

                                                                            Riin
                                 Yin
                                                                   X
                                          X
                                                                       Ri
                            Y
         Constant 4
                                                                   X

Select               MUX                                                    Riout


                       A          B
                           ALU


               Zin          X


                            Z

                                              X
                                   Zout
Arithmetic/Logic Operation
                                                                         Internal
                                                                         processor bus
 ALU: Performs                                                                                   Riin
                                                            Yin
    arithmetic and logic                                                                 X
                                                                     X
    operations on its A
                                                                                             Ri
                                                       Y
    and B inputs.                    Constant 4
                                                                                         X
   To perform
                                                                                                  Riout
                            Select              MUX
    R3  [R1] + [R2]:
     1. R1out, Yin                                A          B
                                                      ALU
     2. R2out, SelectY, A
        dd, Zin                           Zin          X
     3. Zout, R3in
                                                       Z

                                                                         X
                                                              Zout
Arithmetic/Logic Operation (2)
 If there are n operations, do we need n ALU
    control lines?
   We could use encoding, which requires log2 n
    control lines for n operations. However, this
    will increase complexity and hardware
    (additional decoder needed).

                         Add
                                   A         B
                         Sub
           ALU control                 ALU
           lines               :
                                                 Carry-in
                         XOR
Reading a Word from Memory
 Move R3, (R2)          /* R2  [[R1]]
    1.   MAR  [R2]
    2.   Start a Read operation on the memory bus
    3.   Wait for the MFC response from the memory
    4.   Load MDR from the memory bus
    5.   R3  [MDR]
 MDR has four control signals: MDRin, MDRout, MDRinE and
   MDRoutE

                           Memory-bus data                   Internal processor
                           lines                             bus
MOVE R3, (R2)                          MDRinE          MDRin

Control Signals…                             X           X
R2out, MARin, Read.                              MDR
WMFC
MDRout, R3in                                 X           X

                                       MDRoutE         MDRout
Reading a Word from Memory (2)
  Move (R1), R2     /* R2  [[R1]]
  Sequence of control steps:
    1. R1out, MARin, Read
    2. R2out, MDRinE, WMFC
    3. MDRout, R2in
  WMFC: Wait for arrival of MFC (Memory-Function-
   Completed) signal.
  MFC: To accommodate variability in response time, the
   processor waits until it receives an indication that the
   Read/Write operation has been completed. The
   addressed device sets MFC to 1 to indicate this.
Storing a Word in Memory
 Move R2, (R1) /* [R1]  [R2]
 Sequence of control steps:
  1.R1out, MARin
  2.R2out, MDRin, Write
  3.MDRoutE, WMFC
  4.R1in.
Example 2
• MOVE (R2), R1.

• MAR  [R2]       R2out, MARin,
                   R1out, MDRin, Write
• MDR  [R1]
                   WMFC
                   MDRout, R2in
Executing a Complete Instruction
  Add (R3), R1 /* R1  [R1] + [[R3]]
  Adds the contents of a memory location pointed
     to by R3 to register R1.
    Sequence of control steps:               Steps 1 – 3:
      1. PCout, MARin, Read, Select4, Add, ZinInstruction
                                              fetch
      2. Zout, PCin, Yin, WMFC
      3. MDRout, IRin
      4. R3out, MARin, Read
      5. R1out, Yin, WMFC
      6. MDRout, SelectY, Add, Zin
      7. Z , R1 , End
Multiple-Bus Organization
 Single-bus structure: Control sequences are long as
    only one data item can be transferred over the bus
    in a clock cycle.
   Figure on next slide shows a three-bus structure.
   All registers are combined into a single block called
    register file with three ports: 2 outputs allowing 2
    registers to be accessed simultaneously and have
    their contents put on buses A and B, and 1 input
    allowing data on bus C to be loaded into a third
    register.
   Buses A and B are used to transfer source operands
    to the A and B inputs of ALU, and result transferred
    to destination over bus C.
Multiple-Bus Organization (2)
Bus A   Bus B                                    Bus C           Bus A     Bus B                       Bus C



                         Incrementer

                                                                                        Instruction
                                                                                        decoder
                         PC


                                                                                        IR

                         Register file

                                                                                        MDR
                Constant 4



                                                                                        MAR
                       MUX




                               A
                                   ALU
                                         R

                              B
                                                                                        Address line

                                                                               Memory bus
                                             Processor: Datapath and Control   data lines
Multiple-Bus Organization (3)
 For the ALU, R=A (or R=B) means that its A (or B)
    input is passed unmodified to bus C.
   Add R4, R5, R6 /* R6  [R4] + [R5]
      Adds the contents of R4 and R5 to R6.
   Sequence of control steps:
     1. PCout, R=B, MARin, Read, IncPC
     2. WMFC
     3. MDRoutB, R=B, IRin
     4. R4outA, R5outB, SelectA, Add, R6in, End

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

pipelining
pipeliningpipelining
pipelining
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
Basic ops concept of comp
Basic ops  concept of compBasic ops  concept of comp
Basic ops concept of comp
 
Pipelining slides
Pipelining slides Pipelining slides
Pipelining slides
 
Accessing I/O Devices
Accessing I/O DevicesAccessing I/O Devices
Accessing I/O Devices
 
CO by Rakesh Roshan
CO by Rakesh RoshanCO by Rakesh Roshan
CO by Rakesh Roshan
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
Computer organization basics
Computer organization  basicsComputer organization  basics
Computer organization basics
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
Pipelining
PipeliningPipelining
Pipelining
 
RTOS Basic Concepts
RTOS Basic ConceptsRTOS Basic Concepts
RTOS Basic Concepts
 
Computer instruction
Computer instructionComputer instruction
Computer instruction
 
06. thumb instructions
06. thumb instructions06. thumb instructions
06. thumb instructions
 
Computer arithmetic
Computer arithmeticComputer arithmetic
Computer arithmetic
 
8237 / 8257 DMA
8237 / 8257 DMA8237 / 8257 DMA
8237 / 8257 DMA
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
 
Memory Addressing
Memory AddressingMemory Addressing
Memory Addressing
 

Ähnlich wie Basic Processing Unit

Operasi dasar prosesor
Operasi dasar prosesorOperasi dasar prosesor
Operasi dasar prosesorAlam Yuda
 
Computer Organization for third semester Vtu SyllabusModule 4.ppt
Computer Organization  for third semester Vtu SyllabusModule 4.pptComputer Organization  for third semester Vtu SyllabusModule 4.ppt
Computer Organization for third semester Vtu SyllabusModule 4.pptShilpaKc3
 
basic-processing-unit computer organ.ppt
basic-processing-unit computer organ.pptbasic-processing-unit computer organ.ppt
basic-processing-unit computer organ.pptssuser702532
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtlMazin Alwaaly
 
Microprocessors and microcontrollers
Microprocessors and microcontrollers Microprocessors and microcontrollers
Microprocessors and microcontrollers durga_sekar
 
Chapter3 presentation2
Chapter3 presentation2Chapter3 presentation2
Chapter3 presentation2surendar88
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085Mani Afranzio
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and ArchitectureSubhasis Dash
 
8085 paper-presentation
8085 paper-presentation8085 paper-presentation
8085 paper-presentationJiMs ChAcko
 
Register transfer & microoperations moris mano ch 04
Register transfer & microoperations    moris mano ch 04Register transfer & microoperations    moris mano ch 04
Register transfer & microoperations moris mano ch 04thearticlenow
 
Unit 1 basic structure of computers
Unit 1   basic structure of computersUnit 1   basic structure of computers
Unit 1 basic structure of computerschidabdu
 

Ähnlich wie Basic Processing Unit (14)

Orakom
OrakomOrakom
Orakom
 
Operasi dasar prosesor
Operasi dasar prosesorOperasi dasar prosesor
Operasi dasar prosesor
 
Blackfin core architecture
Blackfin core architectureBlackfin core architecture
Blackfin core architecture
 
Computer Organization for third semester Vtu SyllabusModule 4.ppt
Computer Organization  for third semester Vtu SyllabusModule 4.pptComputer Organization  for third semester Vtu SyllabusModule 4.ppt
Computer Organization for third semester Vtu SyllabusModule 4.ppt
 
basic-processing-unit computer organ.ppt
basic-processing-unit computer organ.pptbasic-processing-unit computer organ.ppt
basic-processing-unit computer organ.ppt
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
 
Microprocessors and microcontrollers
Microprocessors and microcontrollers Microprocessors and microcontrollers
Microprocessors and microcontrollers
 
Chapter3 presentation2
Chapter3 presentation2Chapter3 presentation2
Chapter3 presentation2
 
5th unit Microprocessor 8085
5th unit Microprocessor 80855th unit Microprocessor 8085
5th unit Microprocessor 8085
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
 
8085 paper-presentation
8085 paper-presentation8085 paper-presentation
8085 paper-presentation
 
Introduction to ARM
Introduction to ARMIntroduction to ARM
Introduction to ARM
 
Register transfer & microoperations moris mano ch 04
Register transfer & microoperations    moris mano ch 04Register transfer & microoperations    moris mano ch 04
Register transfer & microoperations moris mano ch 04
 
Unit 1 basic structure of computers
Unit 1   basic structure of computersUnit 1   basic structure of computers
Unit 1 basic structure of computers
 

Mehr von Slideshare

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Slideshare
 
Report generation
Report generationReport generation
Report generationSlideshare
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational modelSlideshare
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship ModelSlideshare
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data miningSlideshare
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessingSlideshare
 
What is in you
What is in youWhat is in you
What is in youSlideshare
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inferenceSlideshare
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13Slideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)Slideshare
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313Slideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Instance based learning
Instance based learningInstance based learning
Instance based learningSlideshare
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Neural networks
Neural networksNeural networks
Neural networksSlideshare
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning Slideshare
 

Mehr von Slideshare (20)

Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
 
Report generation
Report generationReport generation
Report generation
 
Trigger
TriggerTrigger
Trigger
 
Security in Relational model
Security in Relational modelSecurity in Relational model
Security in Relational model
 
Entity Relationship Model
Entity Relationship ModelEntity Relationship Model
Entity Relationship Model
 
OLAP
OLAPOLAP
OLAP
 
Major issues in data mining
Major issues in data miningMajor issues in data mining
Major issues in data mining
 
Data preprocessing
Data preprocessingData preprocessing
Data preprocessing
 
What is in you
What is in youWhat is in you
What is in you
 
Propositional logic & inference
Propositional logic & inferencePropositional logic & inference
Propositional logic & inference
 
Logical reasoning 21.1.13
Logical reasoning 21.1.13Logical reasoning 21.1.13
Logical reasoning 21.1.13
 
Logic agent
Logic agentLogic agent
Logic agent
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Resolution(decision)
Resolution(decision)Resolution(decision)
Resolution(decision)
 
Reinforcement learning 7313
Reinforcement learning 7313Reinforcement learning 7313
Reinforcement learning 7313
 
Neural networks
Neural networksNeural networks
Neural networks
 
Instance based learning
Instance based learningInstance based learning
Instance based learning
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Neural networks
Neural networksNeural networks
Neural networks
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 

Kürzlich hochgeladen

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 

Kürzlich hochgeladen (20)

Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 

Basic Processing Unit

  • 1. Basic Processing Unit V.Saranya AP/CSE Sri Vidya College of Engineering and Technology, Virudhunagar
  • 2. Objective Execution of Instructions. Single Bus Organization of the Processor. Multiple Bus Organization of the Processors.
  • 3. Some Fundamental Concepts  Processor (CPU): the active part of the computer, which does all the work (data manipulation and decision-making).  Datapath: portion of the processor which contains hardware necessary to perform all operations required by the computer (the brawn).  Control: portion of the processor (also in hardware) which tells the data path what needs to be done (the brain).
  • 4. Instruction  Instruction execution Fetch cycle: Instruction fetch, decode, execute Decode .  Fetch: fetch next Operand Fetch instruction (using PC) from memory Execute into IR. Result  Decode: decode the Store instruction.  Execute: execute Next Instruction instruction.
  • 5. Fetch  Fetch: Fetch next instruction into IR (Instruction Register).  Assume each word is 4 bytes and each instruction is stored in a word, and that the memory is byte addressable.  PC (Program Counter) contains address of next instruction. IR  [[PC]] PC [PC] + 4
  • 6. Single Bus Organization Internal processor bus Control signals PC ... Instruction decoder Address line and control logic MAR Memory bus MDR Data line IR Y Constant 4 RO Select MUX : : Add A B R(n–1) ALU control Sub lines : ALU Carry-in XOR TEMP Z
  • 7. Instruction Execution  An instruction can be executed by performing one or more of the following operations in some specified sequence:  Transfer a word of data from one register to another or to the ALU (Arithmetic Logic Unit).  Perform an arithmetic or a logic operation and store the result in a register.  Fetch the contents of a given memory location and load them into a register.  Store a word of data from a register into a given memory location.
  • 8. Register Transfer  Register to register transfer:  For each register Ri, two control signals:  Riin used to load the data on the bus into the register.  Riout to place the register’s contents on the bus.  Example: To transfer contents of R1 to R4:  Set R1out to 1. This places contents of R1 on the bus.  Set R4in to 1. This loads data from the processor bus into R4.
  • 9. Register Transfer (2) Internal processor bus Riin Yin X X Ri Y Constant 4 X Select MUX Riout A B ALU Zin X Z X Zout
  • 10. Arithmetic/Logic Operation Internal processor bus  ALU: Performs Riin Yin arithmetic and logic X X operations on its A Ri Y and B inputs. Constant 4 X  To perform Riout Select MUX R3  [R1] + [R2]: 1. R1out, Yin A B ALU 2. R2out, SelectY, A dd, Zin Zin X 3. Zout, R3in Z X Zout
  • 11. Arithmetic/Logic Operation (2)  If there are n operations, do we need n ALU control lines?  We could use encoding, which requires log2 n control lines for n operations. However, this will increase complexity and hardware (additional decoder needed). Add A B Sub ALU control ALU lines : Carry-in XOR
  • 12. Reading a Word from Memory  Move R3, (R2) /* R2  [[R1]] 1. MAR  [R2] 2. Start a Read operation on the memory bus 3. Wait for the MFC response from the memory 4. Load MDR from the memory bus 5. R3  [MDR]  MDR has four control signals: MDRin, MDRout, MDRinE and MDRoutE Memory-bus data Internal processor lines bus MOVE R3, (R2) MDRinE MDRin Control Signals… X X R2out, MARin, Read. MDR WMFC MDRout, R3in X X MDRoutE MDRout
  • 13. Reading a Word from Memory (2)  Move (R1), R2 /* R2  [[R1]]  Sequence of control steps: 1. R1out, MARin, Read 2. R2out, MDRinE, WMFC 3. MDRout, R2in  WMFC: Wait for arrival of MFC (Memory-Function- Completed) signal.  MFC: To accommodate variability in response time, the processor waits until it receives an indication that the Read/Write operation has been completed. The addressed device sets MFC to 1 to indicate this.
  • 14. Storing a Word in Memory  Move R2, (R1) /* [R1]  [R2]  Sequence of control steps: 1.R1out, MARin 2.R2out, MDRin, Write 3.MDRoutE, WMFC 4.R1in.
  • 15. Example 2 • MOVE (R2), R1. • MAR  [R2] R2out, MARin, R1out, MDRin, Write • MDR  [R1] WMFC MDRout, R2in
  • 16. Executing a Complete Instruction  Add (R3), R1 /* R1  [R1] + [[R3]]  Adds the contents of a memory location pointed to by R3 to register R1.  Sequence of control steps: Steps 1 – 3: 1. PCout, MARin, Read, Select4, Add, ZinInstruction fetch 2. Zout, PCin, Yin, WMFC 3. MDRout, IRin 4. R3out, MARin, Read 5. R1out, Yin, WMFC 6. MDRout, SelectY, Add, Zin 7. Z , R1 , End
  • 17. Multiple-Bus Organization  Single-bus structure: Control sequences are long as only one data item can be transferred over the bus in a clock cycle.  Figure on next slide shows a three-bus structure.  All registers are combined into a single block called register file with three ports: 2 outputs allowing 2 registers to be accessed simultaneously and have their contents put on buses A and B, and 1 input allowing data on bus C to be loaded into a third register.  Buses A and B are used to transfer source operands to the A and B inputs of ALU, and result transferred to destination over bus C.
  • 18. Multiple-Bus Organization (2) Bus A Bus B Bus C Bus A Bus B Bus C Incrementer Instruction decoder PC IR Register file MDR Constant 4 MAR MUX A ALU R B Address line Memory bus Processor: Datapath and Control data lines
  • 19. Multiple-Bus Organization (3)  For the ALU, R=A (or R=B) means that its A (or B) input is passed unmodified to bus C.  Add R4, R5, R6 /* R6  [R4] + [R5]  Adds the contents of R4 and R5 to R6.  Sequence of control steps: 1. PCout, R=B, MARin, Read, IncPC 2. WMFC 3. MDRoutB, R=B, IRin 4. R4outA, R5outB, SelectA, Add, R6in, End