SlideShare ist ein Scribd-Unternehmen logo
1 von 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

Weitere ähnliche Inhalte

Was ist angesagt?

Microinstruction sequencing new
Microinstruction sequencing newMicroinstruction sequencing new
Microinstruction sequencing new
Mahesh Kumar Attri
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
abdosaidgkv
 
Embedded System Tools ppt
Embedded System Tools  pptEmbedded System Tools  ppt
Embedded System Tools ppt
Halai Hansika
 

Was ist angesagt? (20)

Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 
Memory organization (Computer architecture)
Memory organization (Computer architecture)Memory organization (Computer architecture)
Memory organization (Computer architecture)
 
Computer Organisation - Addressing Modes
Computer Organisation - Addressing ModesComputer Organisation - Addressing Modes
Computer Organisation - Addressing Modes
 
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSORARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
ARITHMETIC OPERATIONS IN 8085 MICROPROCESSOR
 
8255 programming
8255 programming8255 programming
8255 programming
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
Intel 8051 - pin description
Intel 8051  - pin descriptionIntel 8051  - pin description
Intel 8051 - pin description
 
Programming with 8085
Programming with 8085Programming with 8085
Programming with 8085
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
Arm programmer's model
Arm programmer's modelArm programmer's model
Arm programmer's model
 
Microinstruction sequencing new
Microinstruction sequencing newMicroinstruction sequencing new
Microinstruction sequencing new
 
Control Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unitControl Units : Microprogrammed and Hardwired:control unit
Control Units : Microprogrammed and Hardwired:control unit
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Memory Addressing
Memory AddressingMemory Addressing
Memory Addressing
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
IC 8253 - Microprocessor
IC 8253 - Microprocessor IC 8253 - Microprocessor
IC 8253 - Microprocessor
 
Embedded System Tools ppt
Embedded System Tools  pptEmbedded System Tools  ppt
Embedded System Tools ppt
 
I2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication ProtocolI2c protocol - Inter–Integrated Circuit Communication Protocol
I2c protocol - Inter–Integrated Circuit Communication Protocol
 
Control Unit Design
Control Unit DesignControl Unit Design
Control Unit Design
 
Interfacing 8255
Interfacing 8255Interfacing 8255
Interfacing 8255
 

Andere mochten auch

Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unit
chidabdu
 
Basic Processing Unit
Basic Processing UnitBasic Processing Unit
Basic Processing Unit
Slideshare
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
Anuj Modi
 
Instruction set-of-8085
Instruction set-of-8085Instruction set-of-8085
Instruction set-of-8085
saleForce
 
Chapter 5: Forms of Bus Organization
Chapter 5: Forms of Bus OrganizationChapter 5: Forms of Bus Organization
Chapter 5: Forms of Bus Organization
dmeyeravc
 
Dma transfer
Dma transferDma transfer
Dma transfer
gmnithya
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
9840596838
 

Andere mochten auch (20)

Unit 3 basic processing unit
Unit 3   basic processing unitUnit 3   basic processing unit
Unit 3 basic processing unit
 
Basic Processing Unit
Basic Processing UnitBasic Processing Unit
Basic Processing Unit
 
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
 
Micro programmed control
Micro programmed controlMicro programmed control
Micro programmed control
 
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
 
Micro programmed control
Micro programmed  controlMicro programmed  control
Micro programmed control
 
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
 

Ähnlich wie CO By Rakesh Roshan

basic-processing-unit computer organ.ppt
basic-processing-unit computer organ.pptbasic-processing-unit computer organ.ppt
basic-processing-unit computer organ.ppt
ssuser702532
 
Unit2 control unit
Unit2 control unitUnit2 control unit
Unit2 control unit
Ashim Saha
 
cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineering
VishnuVinay6
 

Ähnlich wie 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
 
COMPUTER ORGANIZATION NOTES Unit 7
COMPUTER ORGANIZATION NOTES Unit 7COMPUTER ORGANIZATION NOTES Unit 7
COMPUTER ORGANIZATION NOTES Unit 7
 
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
 
basic-processing-unit computer organ.ppt
basic-processing-unit computer organ.pptbasic-processing-unit computer organ.ppt
basic-processing-unit computer organ.ppt
 
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
 
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
 
cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineering
 
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
 

Kürzlich hochgeladen

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Kürzlich hochgeladen (20)

Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Buy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdfBuy Epson EcoTank L3210 Colour Printer Online.pdf
Buy Epson EcoTank L3210 Colour Printer Online.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptxBuy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 

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