SlideShare una empresa de Scribd logo
1 de 22
Computer Organization UNIT 2 Prepared By Prof. Rakesh Roshan [email_address] n By RAKESH ROSHAN 09971640291
Hardwired and Micro Programmed  (Control unit) By RAKESH ROSHAN 09971640291
Fundamental Concepts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],By RAKESH ROSHAN 09971640291
An organization in which the arithmetic and logic unit (ALU) and all the registers  are interconnected via a single common bus. This bus is internal to the processor and should not be confused with the external bus that connects the processor to the memory and I/O devices. Single Bus Organization of the datapath inside the Processor Instruction Decoder and Control logic IR R0 R(n-1) TEMP PC MAR MDR Y Z Internal Processor Bus MUX ALU Address Line Data Lines Constant 4 Select Add Sub XOR Control Signals Carry in ALU Control Lines Figure 1 By RAKESH ROSHAN 09971640291
Register Transfer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Performing an arithmetic or logic Operation  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],By RAKESH ROSHAN 09971640291
In step 3, the contents of register Z are transferred to the destination register, R3 . This last transfer cannot  be  carried out during step 2, because only one register output can be connected to the bus during  any clock cycle. Fetching a Word  From Memory To fetch a word of information from memory, the processor has to specify the address of the memory location where this information is stored and request a Read operation. This applies whether the information to be fetched represents an instruction in  a  program or an operand specifies by an instruction. The processor transfers the required address to the MAR, whose output is connected to the address  lines of the memory bus. At the same time, the processor uses the control lines  of the memory bus to indicate that a Read operation is needed. When the requested data are received from the memory they are stored in register MDR , from where they can be transferred to other registers in the processor. The connections for register MDR are shown in figure. It has four control signals: MDR in  and MDR out  control the connection to the internal bus, and MDR inE  and MDR outE  control the connection to the external bus.  Memory-bus Data lines Internal Processor bus MDR X X X X MDR outE MDR out MDR inE MDR in Figure 2 By RAKESH ROSHAN 09971640291
Storing a word in Memory ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Execution of a Complete Instruction ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],By RAKESH ROSHAN 09971640291
Steps 1 through 3 constitute the instruction fetch phase, which is the same for all instructions. The instructions decoding circuit interprets the contents of the IR  at the beginning of step 4. This enables the control circuitry to activate the control signals for steps 4 through 7, which constitutes the execution phase. The contents of register R3 are transferred to the MAR in step 4, and a memory read operation is initiated. Then the contents of R1 are transferred to register Y in step 5, to prepare for the addition operation. When the Read operation is completed, the memory operand is available in register MDR and the addition operation is performed in step 6. The contents of MDR are gated to the bus, and thus also to the B input of the ALU, and register Y is selected as the second input to the ALU by choosing SelectY. The sum is stored in register Z, then transferred to R1 in step 7 . The End signal causes a new instruction fetch cycle to begin by returning to step 1. Figure 3 By RAKESH ROSHAN 09971640291 Step Action 1 PC out , MAR in  ,Read, Select4, Add, Z in 2 Z out , PC in , Y in , WMFC(Wait for memory function completed) 3 MDR out , IR in 4 R3 out , MAR in , Read 5 R1 out , Y in , WMFC 6 MDR out , SelectY, Add, Z in 7 Z out , R1 in , End
Multiple Bus Organization To reduce the number of steps needed, most commercial processors provide multiple internal paths that enable several transfers to take place in parallel . The figure depicts a three –bus structure used to connect the registers and the ALU of a processor. All general purpose registers are combined into a single block is called the register file. Buses A and B are used to transfer the source operands to the A and B inputs of the ALU, where an arithmetic or logic operation may be performed. The result is transferred to the destination over bus C. If needed the ALU may simply pass one of its two input operands unmodified to bus C. We will call the ALU control signals for such an operation R=A or R=B. A second feature is the introduction  of the Incrementer unit , which is used to increment the PC by  constant value. Using the incrementer eliminates the need to add constant value to the PC using the main ALU.  The source for the constant at the ALU input multiplexer  is still useful.  Constant A B R Figure 4 By RAKESH ROSHAN 09971640291 Incrementer PC MAR MDR IR Instruction Decoder Register File MUX ALU Bus A Bus B Bus C Address  Lines Memory bus Data lines
HARDWIRED CONTROL To execute instructions, the processor must have some means of generating the control signals needed in the proper  sequence . Computer designers use a wide variety of techniques to solve this problem. The approaches used fall into one of two categories : hardwired control and micro programmed control. Control step counter Decoder/ encoder External inputs Condition codes Clock IR Control Signal CLK The control hardware shown can be viewed as a state machine that changes from one state to another in every clock cycle , depending on the contents of the instruction register, the condition codes and the external inputs. The outputs of the state machine are the control signals. The sequence of operations carried out by this machine is determined by the wiring of the logic elements, hence the name “hardwired”. A controller that uses this approach can operate at high speed. However, it has little flexibility and the complexity of the instruction set it can implement is limited. Control unit organization Figure 5 By RAKESH ROSHAN 09971640291
A Complete Processor This structure has an instruction unit  that fetches instructions from an instruction cache or from the main  memory when the desired instructions are not already in the cache . It has separate processing units to deal with integer data and floating-point data . A data cache is inserted between these units and the main memory. Using separate caches for instructions and data is common practices today. Other processors use a single cache that stores both data and instructions. The processor is connected to the system bus and hence, to the rest of the computer , by means of a bus interface. Although we have shown just one integer and one floating-point unit, a processor may include several units of each type to increase the potential for concurrent operations. The way in which multiple units can be organized to increase the rate of instruction execution. Figure 6 By RAKESH ROSHAN 09971640291 Instruction unit Integer  unit Floating-Point unit Instruction Cache Data Cache Bus interface Main Memory Input/ Output Processor System Bus
Micro programmed Control ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],By RAKESH ROSHAN 09971640291
Basic Organization of Micro programmed control unit Starting address generator IR Clock Micro PC Control store CW ,[object Object],[object Object],[object Object],[object Object],[object Object],Figure 7 By RAKESH ROSHAN 09971640291
Micro programmed Control: Advantages & Disadvantages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],By RAKESH ROSHAN 09971640291
An Example of microinstructions Microinstructions The individual control words in this microroutine are referred to as microinstructions. A straight forward way to structure microinstructions is to assign one bit position to each control signal , as in table.  However, this scheme has one serious drawback- assigning individual bits to each control signal result in long microinstructions because the number of required signals is usually large. Moreover, only a few bits are set to 1 in any given microinstruction, which means the available bit space is poorly used.  Figure 8 By RAKESH ROSHAN 09971640291
Partial format for field-encoded microinstructions F1(4) F2(3) F3(3) F4(4) F5(2) F6(1) F7(1) F8(1) Grouping  control signals into fields requires a little more hardware because decoder circuits must be used to decode the bit  patterns of each field into individual control signals. The cost of this additional hardware is more than offset by the reduced number of bits in each microinstruction, which result in a smaller control store. Only 20 bits are needed to store the patterns for the 42 signals.  Vertical and Horizontal Organization  Highly  encoded schemes that use compact codes to specify only a small number of control functions in each microinstruction are referred to as a vertical organization. On the other hand, the minimally encoded scheme , in which many resources can be controlled with a single microinstruction, is called a horizontal organization.  The horizontal approach is useful when a higher operating speed is desired and when the machine instruction allows parallel use of resources. The vertical approach results is considerably slower operating speeds because more microinstructions are needed to perform the desired control functions'. Although fewer bits are required for each microinstruction, this does not imply that the total number of bits in the control store is smaller.  Figure 9 By RAKESH ROSHAN 09971640291 0000:No transfer 0001:Pcout 0010:MDRout 0011:Zout 0100:R0out 0101:R1out 0110:R2out 0111:R3out 1010:TEMPout 1011:Offsetout 000:No transfer 001:Pcin 010:IRin 011:Zin 100:R0in 101:R1in 110:R2in 111:R3in 000:No transfer 001:MARin 010:MDRin 011:TEMPin 100:Yin 0000:Add 0001:Sub . . . . . . . . 1111:XOR 00:No transfer 01:Read 10:Write 0:SelectY 1:Select4 0:No action 1:WMFC 0:Continue 1:End
Microprogram Sequencing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],By RAKESH ROSHAN 09971640291
- Bit-ORing - Wide-Branch Addressing - WMFC By RAKESH ROSHAN 09971640291
Microinstructions with Next-Address Field ,[object Object],[object Object],[object Object],[object Object],By RAKESH ROSHAN 09971640291
Microinstructions with Next-Address Field By RAKESH ROSHAN 09971640291
Prefetching Microinstructions One drawback of microprogrammed control is that it leads to a slower operating speed because of the time it takes to fetch microinstructions from the control store. Faster operation is achieved if the next microinstruction is prefetched while the current one is being executed. In this way , the execution time can be  overlapped with the fetch time. Prefetching microinstructions presents some organizational difficulties . Sometimes the status flags and the result of the currently executed microinstruction are needed to determine the address of the next microinstruction. In these cases , the fetch must be repeated with the correct address, which requires more complex hardware. However , the disadvantages are minor, and the prefetching technique is often used.  By RAKESH ROSHAN 09971640291
Emulation The main function of microprogrammed control is to provide a means for simple, flexible and relatively inexpensive execution of machine instructions. However , it also offers other interesting possibilities. Its flexibility in using a machine’s resources allows diverse classes of instructions to be implemented . Given a computer with a certain instruction set, it is possible to define additional machine instructions and implement them with  extra microroutines. An extension of the preceding idea leads to another interesting possibility. Suppose we add to the instruction repertoire of a given computer, M1, an entirely new set of instructions that is in fact the instruction set of a computer , M2. Programs written in the machine language of M2 can then be run on computer M1, that is M1 emulates M2.  By RAKESH ROSHAN 09971640291

Más contenido relacionado

La actualidad más candente

Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)cs19club
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessorVikas Gupta
 
Unit 3-pipelining & vector processing
Unit 3-pipelining & vector processingUnit 3-pipelining & vector processing
Unit 3-pipelining & vector processingvishal choudhary
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperationsNitesh Singh
 
Timing and control
Timing and controlTiming and control
Timing and controlchauhankapil
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationDr. Balaji Ganesh Rajagopal
 
Basic Processing Unit
Basic Processing UnitBasic Processing Unit
Basic Processing UnitSlideshare
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operationsSanjeev Patel
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit DesignVinit Raut
 
Synchronous counters
Synchronous countersSynchronous counters
Synchronous countersLee Diaz
 
Timing and-control-unit
Timing and-control-unitTiming and-control-unit
Timing and-control-unitAnuj Modi
 
Pipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorSmit Shah
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed controlShashank Singh
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transferlavanya marichamy
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086Vijay Kumar
 
Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unitchidabdu
 

La actualidad más candente (20)

Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
 
Acc logic
Acc logicAcc logic
Acc logic
 
Unit 3-pipelining & vector processing
Unit 3-pipelining & vector processingUnit 3-pipelining & vector processing
Unit 3-pipelining & vector processing
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
 
Timing and control
Timing and controlTiming and control
Timing and control
 
Introduction to Computer Architecture and Organization
Introduction to Computer Architecture and OrganizationIntroduction to Computer Architecture and Organization
Introduction to Computer Architecture and Organization
 
Basic Processing Unit
Basic Processing UnitBasic Processing Unit
Basic Processing Unit
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Basic Computer Organization and Design
Basic  Computer  Organization  and  DesignBasic  Computer  Organization  and  Design
Basic Computer Organization and Design
 
Synchronous counters
Synchronous countersSynchronous counters
Synchronous counters
 
Timing and-control-unit
Timing and-control-unitTiming and-control-unit
Timing and-control-unit
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
 
Pipeline & Nonpipeline Processor
Pipeline & Nonpipeline ProcessorPipeline & Nonpipeline Processor
Pipeline & Nonpipeline Processor
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed control
 
Register Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory TransferRegister Transfer Language,Bus and Memory Transfer
Register Transfer Language,Bus and Memory Transfer
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Pipelining slides
Pipelining slides Pipelining slides
Pipelining slides
 
Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unit
 

Destacado

Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control UnitKamal Acharya
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control Anuj Modi
 
Basic processing unit by aniket bhute
Basic processing unit by aniket bhuteBasic processing unit by aniket bhute
Basic processing unit by aniket bhuteAniket Bhute
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085saleForce
 
Chapter 5: Forms of Bus Organization
Chapter 5: Forms of Bus OrganizationChapter 5: Forms of Bus Organization
Chapter 5: Forms of Bus Organizationdmeyeravc
 
Direct Memory Access (DMA)-Working and Implementation
Direct Memory Access (DMA)-Working and ImplementationDirect Memory Access (DMA)-Working and Implementation
Direct Memory Access (DMA)-Working and ImplementationShubham Kumar
 
Dma transfer
Dma transferDma transfer
Dma transfergmnithya
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed controlRai University
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and DesignKamal Acharya
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 80869840596838
 
Minimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorMinimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorNikhil Kumar
 

Destacado (20)

Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control Unit
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Ch7 official
Ch7 officialCh7 official
Ch7 official
 
Instruction set
Instruction setInstruction set
Instruction set
 
Micro program
Micro programMicro program
Micro program
 
Basic processing unit by aniket bhute
Basic processing unit by aniket bhuteBasic processing unit by aniket bhute
Basic processing unit by aniket bhute
 
CO by Rakesh Roshan
CO by Rakesh RoshanCO by Rakesh Roshan
CO by Rakesh Roshan
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
 
Chapter 5: Forms of Bus Organization
Chapter 5: Forms of Bus OrganizationChapter 5: Forms of Bus Organization
Chapter 5: Forms of Bus Organization
 
Direct Memory Access (DMA)-Working and Implementation
Direct Memory Access (DMA)-Working and ImplementationDirect Memory Access (DMA)-Working and Implementation
Direct Memory Access (DMA)-Working and Implementation
 
Dma transfer
Dma transferDma transfer
Dma transfer
 
basic computer programming and micro programmed control
basic computer programming and micro programmed controlbasic computer programming and micro programmed control
basic computer programming and micro programmed control
 
Basic Computer Organization and Design
Basic Computer Organization and DesignBasic Computer Organization and Design
Basic Computer Organization and Design
 
Data transferschemes
Data transferschemesData transferschemes
Data transferschemes
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
Control unit
Control  unitControl  unit
Control unit
 
DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]DMA presentation [By- Digvijay]
DMA presentation [By- Digvijay]
 
Minimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorMinimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 Microprocessor
 
Hardwired control
Hardwired controlHardwired control
Hardwired control
 
8086 microprocessor
8086 microprocessor8086 microprocessor
8086 microprocessor
 

Similar a CO By Rakesh Roshan

Coa module2
Coa module2Coa module2
Coa module2cs19club
 
4th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-74th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-7Sujay pai
 
310471266 chapter-7-notes-computer-organization
310471266 chapter-7-notes-computer-organization310471266 chapter-7-notes-computer-organization
310471266 chapter-7-notes-computer-organizationsrinoni
 
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdfBCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdfciyamala kushbu
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and ArchitectureSubhasis Dash
 
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
 
Unit2 control unit
Unit2 control unitUnit2 control unit
Unit2 control unitAshim Saha
 
Precessor organization
Precessor organizationPrecessor organization
Precessor organizationAsif Iqbal
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csaAnjaan Gajendra
 
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdfSAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdfDrKalaavathiBuvanesh
 
Presentation 4.pptx
Presentation 4.pptxPresentation 4.pptx
Presentation 4.pptxIRAH34
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtlMazin Alwaaly
 
chapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptchapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptPoliceNiranjanReddy
 

Similar a CO By Rakesh Roshan (20)

Coa module2
Coa module2Coa module2
Coa module2
 
4th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-74th sem,(cs is),computer org unit-7
4th sem,(cs is),computer org unit-7
 
COA-UNIT-III-FINAL (1).pptx
COA-UNIT-III-FINAL (1).pptxCOA-UNIT-III-FINAL (1).pptx
COA-UNIT-III-FINAL (1).pptx
 
310471266 chapter-7-notes-computer-organization
310471266 chapter-7-notes-computer-organization310471266 chapter-7-notes-computer-organization
310471266 chapter-7-notes-computer-organization
 
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdfBCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
BCS302-DDCO-basic processing unit-Module 5- VTU 2022 scheme-DDCO-pdf
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and 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
 
Unit2 control unit
Unit2 control unitUnit2 control unit
Unit2 control unit
 
Precessor organization
Precessor organizationPrecessor organization
Precessor organization
 
Bca examination 2016 csa
Bca examination 2016 csaBca examination 2016 csa
Bca examination 2016 csa
 
module 4.pptx
module 4.pptxmodule 4.pptx
module 4.pptx
 
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdfSAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
SAMPLE FOR MICRO PROGRAMMING CO_-_7th_UNIT.pdf
 
Digital-Unit-III.ppt
Digital-Unit-III.pptDigital-Unit-III.ppt
Digital-Unit-III.ppt
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Presentation 4.pptx
Presentation 4.pptxPresentation 4.pptx
Presentation 4.pptx
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
 
2.computer org.
2.computer org.2.computer org.
2.computer org.
 
chapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptchapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.ppt
 

Último

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Último (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

CO By Rakesh Roshan

  • 1. Computer Organization UNIT 2 Prepared By Prof. Rakesh Roshan [email_address] n By RAKESH ROSHAN 09971640291
  • 2. Hardwired and Micro Programmed (Control unit) By RAKESH ROSHAN 09971640291
  • 3.
  • 4. An organization in which the arithmetic and logic unit (ALU) and all the registers are interconnected via a single common bus. This bus is internal to the processor and should not be confused with the external bus that connects the processor to the memory and I/O devices. Single Bus Organization of the datapath inside the Processor Instruction Decoder and Control logic IR R0 R(n-1) TEMP PC MAR MDR Y Z Internal Processor Bus MUX ALU Address Line Data Lines Constant 4 Select Add Sub XOR Control Signals Carry in ALU Control Lines Figure 1 By RAKESH ROSHAN 09971640291
  • 5.
  • 6. In step 3, the contents of register Z are transferred to the destination register, R3 . This last transfer cannot be carried out during step 2, because only one register output can be connected to the bus during any clock cycle. Fetching a Word From Memory To fetch a word of information from memory, the processor has to specify the address of the memory location where this information is stored and request a Read operation. This applies whether the information to be fetched represents an instruction in a program or an operand specifies by an instruction. The processor transfers the required address to the MAR, whose output is connected to the address lines of the memory bus. At the same time, the processor uses the control lines of the memory bus to indicate that a Read operation is needed. When the requested data are received from the memory they are stored in register MDR , from where they can be transferred to other registers in the processor. The connections for register MDR are shown in figure. It has four control signals: MDR in and MDR out control the connection to the internal bus, and MDR inE and MDR outE control the connection to the external bus. Memory-bus Data lines Internal Processor bus MDR X X X X MDR outE MDR out MDR inE MDR in Figure 2 By RAKESH ROSHAN 09971640291
  • 7.
  • 8. Steps 1 through 3 constitute the instruction fetch phase, which is the same for all instructions. The instructions decoding circuit interprets the contents of the IR at the beginning of step 4. This enables the control circuitry to activate the control signals for steps 4 through 7, which constitutes the execution phase. The contents of register R3 are transferred to the MAR in step 4, and a memory read operation is initiated. Then the contents of R1 are transferred to register Y in step 5, to prepare for the addition operation. When the Read operation is completed, the memory operand is available in register MDR and the addition operation is performed in step 6. The contents of MDR are gated to the bus, and thus also to the B input of the ALU, and register Y is selected as the second input to the ALU by choosing SelectY. The sum is stored in register Z, then transferred to R1 in step 7 . The End signal causes a new instruction fetch cycle to begin by returning to step 1. Figure 3 By RAKESH ROSHAN 09971640291 Step Action 1 PC out , MAR in ,Read, Select4, Add, Z in 2 Z out , PC in , Y in , WMFC(Wait for memory function completed) 3 MDR out , IR in 4 R3 out , MAR in , Read 5 R1 out , Y in , WMFC 6 MDR out , SelectY, Add, Z in 7 Z out , R1 in , End
  • 9. Multiple Bus Organization To reduce the number of steps needed, most commercial processors provide multiple internal paths that enable several transfers to take place in parallel . The figure depicts a three –bus structure used to connect the registers and the ALU of a processor. All general purpose registers are combined into a single block is called the register file. Buses A and B are used to transfer the source operands to the A and B inputs of the ALU, where an arithmetic or logic operation may be performed. The result is transferred to the destination over bus C. If needed the ALU may simply pass one of its two input operands unmodified to bus C. We will call the ALU control signals for such an operation R=A or R=B. A second feature is the introduction of the Incrementer unit , which is used to increment the PC by constant value. Using the incrementer eliminates the need to add constant value to the PC using the main ALU. The source for the constant at the ALU input multiplexer is still useful. Constant A B R Figure 4 By RAKESH ROSHAN 09971640291 Incrementer PC MAR MDR IR Instruction Decoder Register File MUX ALU Bus A Bus B Bus C Address Lines Memory bus Data lines
  • 10. HARDWIRED CONTROL To execute instructions, the processor must have some means of generating the control signals needed in the proper sequence . Computer designers use a wide variety of techniques to solve this problem. The approaches used fall into one of two categories : hardwired control and micro programmed control. Control step counter Decoder/ encoder External inputs Condition codes Clock IR Control Signal CLK The control hardware shown can be viewed as a state machine that changes from one state to another in every clock cycle , depending on the contents of the instruction register, the condition codes and the external inputs. The outputs of the state machine are the control signals. The sequence of operations carried out by this machine is determined by the wiring of the logic elements, hence the name “hardwired”. A controller that uses this approach can operate at high speed. However, it has little flexibility and the complexity of the instruction set it can implement is limited. Control unit organization Figure 5 By RAKESH ROSHAN 09971640291
  • 11. A Complete Processor This structure has an instruction unit that fetches instructions from an instruction cache or from the main memory when the desired instructions are not already in the cache . It has separate processing units to deal with integer data and floating-point data . A data cache is inserted between these units and the main memory. Using separate caches for instructions and data is common practices today. Other processors use a single cache that stores both data and instructions. The processor is connected to the system bus and hence, to the rest of the computer , by means of a bus interface. Although we have shown just one integer and one floating-point unit, a processor may include several units of each type to increase the potential for concurrent operations. The way in which multiple units can be organized to increase the rate of instruction execution. Figure 6 By RAKESH ROSHAN 09971640291 Instruction unit Integer unit Floating-Point unit Instruction Cache Data Cache Bus interface Main Memory Input/ Output Processor System Bus
  • 12.
  • 13.
  • 14.
  • 15. An Example of microinstructions Microinstructions The individual control words in this microroutine are referred to as microinstructions. A straight forward way to structure microinstructions is to assign one bit position to each control signal , as in table. However, this scheme has one serious drawback- assigning individual bits to each control signal result in long microinstructions because the number of required signals is usually large. Moreover, only a few bits are set to 1 in any given microinstruction, which means the available bit space is poorly used. Figure 8 By RAKESH ROSHAN 09971640291
  • 16. Partial format for field-encoded microinstructions F1(4) F2(3) F3(3) F4(4) F5(2) F6(1) F7(1) F8(1) Grouping control signals into fields requires a little more hardware because decoder circuits must be used to decode the bit patterns of each field into individual control signals. The cost of this additional hardware is more than offset by the reduced number of bits in each microinstruction, which result in a smaller control store. Only 20 bits are needed to store the patterns for the 42 signals. Vertical and Horizontal Organization Highly encoded schemes that use compact codes to specify only a small number of control functions in each microinstruction are referred to as a vertical organization. On the other hand, the minimally encoded scheme , in which many resources can be controlled with a single microinstruction, is called a horizontal organization. The horizontal approach is useful when a higher operating speed is desired and when the machine instruction allows parallel use of resources. The vertical approach results is considerably slower operating speeds because more microinstructions are needed to perform the desired control functions'. Although fewer bits are required for each microinstruction, this does not imply that the total number of bits in the control store is smaller. Figure 9 By RAKESH ROSHAN 09971640291 0000:No transfer 0001:Pcout 0010:MDRout 0011:Zout 0100:R0out 0101:R1out 0110:R2out 0111:R3out 1010:TEMPout 1011:Offsetout 000:No transfer 001:Pcin 010:IRin 011:Zin 100:R0in 101:R1in 110:R2in 111:R3in 000:No transfer 001:MARin 010:MDRin 011:TEMPin 100:Yin 0000:Add 0001:Sub . . . . . . . . 1111:XOR 00:No transfer 01:Read 10:Write 0:SelectY 1:Select4 0:No action 1:WMFC 0:Continue 1:End
  • 17.
  • 18. - Bit-ORing - Wide-Branch Addressing - WMFC By RAKESH ROSHAN 09971640291
  • 19.
  • 20. Microinstructions with Next-Address Field By RAKESH ROSHAN 09971640291
  • 21. Prefetching Microinstructions One drawback of microprogrammed control is that it leads to a slower operating speed because of the time it takes to fetch microinstructions from the control store. Faster operation is achieved if the next microinstruction is prefetched while the current one is being executed. In this way , the execution time can be overlapped with the fetch time. Prefetching microinstructions presents some organizational difficulties . Sometimes the status flags and the result of the currently executed microinstruction are needed to determine the address of the next microinstruction. In these cases , the fetch must be repeated with the correct address, which requires more complex hardware. However , the disadvantages are minor, and the prefetching technique is often used. By RAKESH ROSHAN 09971640291
  • 22. Emulation The main function of microprogrammed control is to provide a means for simple, flexible and relatively inexpensive execution of machine instructions. However , it also offers other interesting possibilities. Its flexibility in using a machine’s resources allows diverse classes of instructions to be implemented . Given a computer with a certain instruction set, it is possible to define additional machine instructions and implement them with extra microroutines. An extension of the preceding idea leads to another interesting possibility. Suppose we add to the instruction repertoire of a given computer, M1, an entirely new set of instructions that is in fact the instruction set of a computer , M2. Programs written in the machine language of M2 can then be run on computer M1, that is M1 emulates M2. By RAKESH ROSHAN 09971640291