SlideShare a Scribd company logo
1 of 13
COMPUTER ORGANIZATION 10CS46
UNIT-7: “BASIC PROCESSING UNIT”
In this chapter we focus on the processing unit, which executes the machine
instructions and coordinates the activities of the other units. This unit is often called
instruction set processor (ISP) or simply a processor.
Some fundamental concepts
 Processor fetches one instruction at a time, and perform the operation specified.
 Instructions are fetched from successive memory locations until a branch or a
jump instruction is encountered.
 Processor keeps track of the address of the memory location containing the next
instruction to be fetched using Program Counter (PC).
 Instruction Register (IR) is the another key register in the processor
Executing an Instruction: To execute an instruction the processor has to perform the
following operations
 Fetch the contents of the memory location pointed to by the PC. The contents of
this location are loaded into the IR (fetch phase).
IR [[PC]]
 Assuming that the memory is byte addressable, increment the contents of the
PC by 4 (fetch phase).
PC [PC] + 4
 Carry out the actions specified by the instruction in the IR (execution phase).
Figureexplanation:
 ALU and all the registers are interconnected via a single common bus.
 The data and address lines of the external memory bus connected to the internal
processor bus via the memory data register, MDR, and the memory address
register, MAR respectively.
 Register MDR has two inputs and two outputs.
 Data may be loaded into MDR either from the memory bus or from the internal
processor bus.
 The data stored in MDR may be placed on either bus.
 The input of MAR is connected to the internal bus, and its output is connected to
the external bus.
 The control lines of the memory bus are connected to the instruction decoder
and control logic.
 This unit is responsible for issuing the signals that control the operation of all the
units inside the processor and for increasing with the memory bus.
 The MUX selects either the output of register Y or a constant value 4 to be
provided as input A of the ALU.
 The constant 4 is used to increment the contents of the program counter.
Figure:
2 | P a g e
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Register Transfers
 Instruction execution involves a sequence of steps in which data are transferred
from one register to another.
 For each register two control signals are used to place the contents of that
register on the bus or to load the data on the bus into register.(in figure)
 The input and output of register Riin and Riout is set to 1, the data on the bus are
loaded into Ri.
 Similarly, when Ri out is set to 1, the contents of register Ri are placed on the
bus.
 While Riout is equal to 0, the bus can be used for transferring data from other
registers.
3 | P a g e
Example
Suppose we wish to transfer the contents of register R1 to register R4. This can be
accomplished as follows.
 Enable the output of registers R1 by setting R1out to 1. This places the contents
of R1 on the processor bus.
 Enable the input of register R4 by setting R4out to 1. This loads data from the
processor bus into register R4.
 All operations and data transfers within the take place within time periods
defined by the processor clock.
 The control signals that govern a particular transfer are asserted at the start of
the clock
4 | P a g e
Fig: input and output gating for one register bit.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Performing an Arithmetic or Logic Operation
The ALU is a combinational circuit that has no internal storage.
 ALU gets the two operands from MUX and bus. The result is temporarily
stored in register Z.
 What is the sequence of operations to add the contents of register R1 to those
of R2 and store the result in R3?
R1out, Yin
R2out, SelectY, Add, Zin
Zout, R3in
 All other signals are inactive.
 In step 1, the output of register R1 and the input of register Y are enabled,
causing the contents of R1 to be transferred over the bus to Y.
 Step 2, the multiplexer’s select signal is set to Select Y, causing the multiplexer to
gate the contents of register Y to input A of the ALU.
 At the same time, the contents of register R2 are gated onto the bus and, hence,
to input B.
 The function performed by the ALU depends on the signals applied to its control
lines.
 In this case, the ADD line is set to 1, causing the output of the ALU to be the sum
of the two numbers at inputs A and B.
 This sum is loaded into register Z because its input control signal is activated.
 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
The processor has to specify the address of the memory location where this information
is stored and request a Read operation.
5 | P a g e
 This applies whether the information to be fetched represents an instruction
in a program or an operand specified by an instruction.
 The processor transfers the required addressto the MAR, whose output is
connected to the address lines of the memory bus.
Figure:
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 response time of each memory access varies (cache miss, memory-mapped
I/O,…).
 To accommodate this, the processor waits until it receives an indication that
the requested operation has been completed (Memory-Function-Completed,
MFC).
Move (R1), R2
MAR [R1]
Start a Read operation on the memory bus .
Wait for the MFC response from the memory
Load MDR from the memory bus
R2 [MDR]
 The output of MAR is enabled all the time.
 Thus the contents of MAR are always available on the address lines of the
memory bus.
 When a new address is loaded into MAR, it will appear on the memory bus at the
beginning of the next clock cycle.(in fig)
6 | P a g e
 A read control signal is activated at the same time MAR is loaded. This means
memory read operations requires three steps, which can be described by the
signals being activated as follows
R1out,MARin,Read
MDRinE,WMFC
MDRout,R2in
Execution of Branch Instructions
 A branch instruction replaces the contents of PC with the branch target address,
which is usually obtained by adding an offset X given in the branch instruction.
 The offset X is usually the difference between the branch target address and the
address immediately following the branch instruction.
Conditional branch
7 | P a g e
.......................................................................................................................................
Multiple bus organization
In a single bus only one data word can be transferred over the bus in a clock cycle .this
increases the steps required to complete the execution of the instruction. To reduce the
steps needed to complete the execution of the instruction, most commercial processor
provide multiple internal paths that enable several transfer to take place in parallel.
Hence, 3 buses are used to connect registers and the ALU of the processor.
The register file has 3ports; 1 input port & 2 output ports
8 | P a g e
So it is possible to access data of 3 reg on 1 clock cycle;
9 | P a g e
The value can be loaded in one register from bus C and data from 2 register can be
accessed to bus A and bus B. Buses A and B are used to transfer the source operands to
A and B i/ps of the ALU .After ALU operation the result is transferred to the destination
operand over the bus C.
To increment the value of PC after execution of each instruction to fetch the next
instruction , separate unit is provided this unit is called INCREMENTER . this
increments the contents of PC accordingly to the length of the instruction so that can
point to the next instruction in the sequence.
The incrementer eliminates the need of multiplexer connected at A input of ALU.
The control sequence is as shown as above. Note that the example shown here is ADD
R4 , R5 , R6. The examiner may also ask for ADD R1 , R2, R3. .
IMPORTANT TOPICS FROM EXAM POINT OF VIEW
1. ADD (R3) , R1. FOR THIS SEQUENCE OF INSTRUCTIONS THE PROCESSOR IS
DRIVEN BY CONTINUOUSLY RUNNING CLOCK SUCH THAT EACH CONTROL
STEP IS 2ns IN DURATION. HOW LONG WILL THE PROCESSOR HAVE TO WAIT
IN STEPS 2 & 5, ASSUMONG THAT A MEMORY READ OPERATION TAKES 16ns
TO COMPLETE? ALSO COMPUTE THE % OF TIME FOR WHICH THE PROCESSOR
IS IDLE DURING THE EXECUTION OF THE INSTRUCTION . (10 MARKS) (DEC-
2011 , JAN-10)
2. THREE (MULTIPLE) BUS ORGANIZATION (V.VIMP) (DEC-11,JUNE 11,12..)
3. EXPLANATION WITH NEAT DIAGRAM OF COMPLETE PROCESSOR (DEC-11)
(6 MARKS)
4. FETCHING A WORD FROM MEMORY (10 MARKS)
5. ADD R1 , (R3 ) (JULY-2011) (10 MARKS)
6. HARDWIRED CONTROL UNIT (DEC-2010) (10 MARKS)
7. HARDWIRED CONTROL UNIT & SHOW THE GENERATION OF Zin AND END
CONTROL SIGNALS. (JUNE-12) (10 MARKS)
8. CONTROL SEQUENCE FOR EXECUTION OF AN UNCONDITIONAL BRANCH
INSTRUCTION. (DEC-12) (10 MARKS)
10 | P a g e
11 | P a g e
12 | P a g e
The block diagram consists of a instruction unit , integer unit , floating-point unit,
instruction cache , data cache, bus interface unit, main memory module and i/p o/p
module.
 The instruction unit -> fetches instructions from an instruction cache or from
the main memory when the desired instructions are not available in the cache
 The complete processor provides two processing units
Integer unit &
Floating-point unit
Integer unit is used to process integer data & floating for floating point data.
These two units gets data from data cache.
Questions: (Dec 2011)
Write and explain the control sequences for the execution of the following
instruction. ADD (R3), R1. (10 marks)
13 | P a g e
Soltn: This instruction adds the contents of the memory locations specified by
register R1 and store the result in register R1 . to execute bus instruction it is
necessary to perform following action.
1. Fetch the instruction.
2. Fetch the operand from memory pointed by R3.
3. Store the result in R3.
4. Perform the addition.
Fig: control sequence for execution of the instruction ADD (R3) , R1.
Questions (exercise)
1. ADD R1 , (R3 )

More Related Content

What's hot

Ch8 (1) morris mano
Ch8 (1) morris manoCh8 (1) morris mano
Ch8 (1) morris manoKIRTI89
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and ArchitectureSubhasis Dash
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtlMazin Alwaaly
 
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Rai University
 
Addressing mode Computer Architecture
Addressing mode  Computer ArchitectureAddressing mode  Computer Architecture
Addressing mode Computer ArchitectureHaris456
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction setStefan Oprea
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4Umang Gupta
 
Data manipulation instructions
Data manipulation instructionsData manipulation instructions
Data manipulation instructionsMahesh Kumar Attri
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2Dr.MAYA NAYAK
 
central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipelineRai University
 
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
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructionsihsanjamil
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registersmahesh kumar prajapat
 
Central processing unit
Central processing unitCentral processing unit
Central processing unitjyoti_lakhani
 

What's hot (20)

Ch8 (1) morris mano
Ch8 (1) morris manoCh8 (1) morris mano
Ch8 (1) morris mano
 
Computer Organisation and Architecture
Computer Organisation and ArchitectureComputer Organisation and Architecture
Computer Organisation and Architecture
 
Computer architecture register transfer languages rtl
Computer architecture register transfer languages rtlComputer architecture register transfer languages rtl
Computer architecture register transfer languages rtl
 
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
Bca 2nd sem-u-2.1-overview of register transfer, micro operations and basic c...
 
Addressing mode Computer Architecture
Addressing mode  Computer ArchitectureAddressing mode  Computer Architecture
Addressing mode Computer Architecture
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
CO By Rakesh Roshan
CO By Rakesh RoshanCO By Rakesh Roshan
CO By Rakesh Roshan
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
Computer organiztion4
Computer organiztion4Computer organiztion4
Computer organiztion4
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Data manipulation instructions
Data manipulation instructionsData manipulation instructions
Data manipulation instructions
 
COMPUTER ORGANIZATION NOTES Unit 2
COMPUTER ORGANIZATION NOTES  Unit 2COMPUTER ORGANIZATION NOTES  Unit 2
COMPUTER ORGANIZATION NOTES Unit 2
 
central processing unit and pipeline
central processing unit and pipelinecentral processing unit and pipeline
central processing unit and pipeline
 
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
 
Types of instructions
Types of instructionsTypes of instructions
Types of instructions
 
Instruction codes and computer registers
Instruction codes and computer registersInstruction codes and computer registers
Instruction codes and computer registers
 
Parallel processing and pipelining
Parallel processing and pipeliningParallel processing and pipelining
Parallel processing and pipelining
 
Central processing unit
Central processing unitCentral processing unit
Central processing unit
 
RTL
RTLRTL
RTL
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 

Similar to 4th sem,(cs is),computer org unit-7

Coa module2
Coa module2Coa module2
Coa module2cs19club
 
310471266 chapter-7-notes-computer-organization
310471266 chapter-7-notes-computer-organization310471266 chapter-7-notes-computer-organization
310471266 chapter-7-notes-computer-organizationsrinoni
 
COMPUTER ORGANIZATION NOTES Unit 7
COMPUTER ORGANIZATION NOTES Unit 7COMPUTER ORGANIZATION NOTES Unit 7
COMPUTER ORGANIZATION NOTES Unit 7Dr.MAYA NAYAK
 
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
 
basic-processing-unit computer organ.ppt
basic-processing-unit computer organ.pptbasic-processing-unit computer organ.ppt
basic-processing-unit computer organ.pptssuser702532
 
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
 
Precessor organization
Precessor organizationPrecessor organization
Precessor organizationAsif Iqbal
 
Basic processing unit by aniket bhute
Basic processing unit by aniket bhuteBasic processing unit by aniket bhute
Basic processing unit by aniket bhuteAniket Bhute
 
Unit2 control unit
Unit2 control unitUnit2 control unit
Unit2 control unitAshim Saha
 
Presentation 4.pptx
Presentation 4.pptxPresentation 4.pptx
Presentation 4.pptxIRAH34
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processors9007912
 
cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineeringVishnuVinay6
 
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
 
multi cycle in microprocessor 8086 sy B-tech
multi cycle  in microprocessor 8086 sy B-techmulti cycle  in microprocessor 8086 sy B-tech
multi cycle in microprocessor 8086 sy B-techRushikeshThorat24
 
chapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptchapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptPoliceNiranjanReddy
 

Similar to 4th sem,(cs is),computer org unit-7 (20)

CO By Rakesh Roshan
CO By Rakesh RoshanCO By Rakesh Roshan
CO By Rakesh Roshan
 
Coa module2
Coa module2Coa module2
Coa module2
 
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
 
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
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
COA-UNIT-III-FINAL (1).pptx
COA-UNIT-III-FINAL (1).pptxCOA-UNIT-III-FINAL (1).pptx
COA-UNIT-III-FINAL (1).pptx
 
Precessor organization
Precessor organizationPrecessor organization
Precessor organization
 
Basic processing unit by aniket bhute
Basic processing unit by aniket bhuteBasic processing unit by aniket bhute
Basic processing unit by aniket bhute
 
Unit2 control unit
Unit2 control unitUnit2 control unit
Unit2 control unit
 
Bc0040
Bc0040Bc0040
Bc0040
 
Presentation 4.pptx
Presentation 4.pptxPresentation 4.pptx
Presentation 4.pptx
 
Chapter 4 the processor
Chapter 4 the processorChapter 4 the processor
Chapter 4 the processor
 
cse211 power point presentation for engineering
cse211 power point presentation for engineeringcse211 power point presentation for engineering
cse211 power point presentation for engineering
 
Digital-Unit-III.ppt
Digital-Unit-III.pptDigital-Unit-III.ppt
Digital-Unit-III.ppt
 
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
 
multi cycle in microprocessor 8086 sy B-tech
multi cycle  in microprocessor 8086 sy B-techmulti cycle  in microprocessor 8086 sy B-tech
multi cycle in microprocessor 8086 sy B-tech
 
chapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.pptchapter3 - Basic Processing Unit.ppt
chapter3 - Basic Processing Unit.ppt
 

Recently uploaded

Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoordharasingh5698
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 

Recently uploaded (20)

Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoorTop Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
Top Rated Call Girls In chittoor 📱 {7001035870} VIP Escorts chittoor
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 

4th sem,(cs is),computer org unit-7

  • 1. COMPUTER ORGANIZATION 10CS46 UNIT-7: “BASIC PROCESSING UNIT” In this chapter we focus on the processing unit, which executes the machine instructions and coordinates the activities of the other units. This unit is often called instruction set processor (ISP) or simply a processor. Some fundamental concepts  Processor fetches one instruction at a time, and perform the operation specified.  Instructions are fetched from successive memory locations until a branch or a jump instruction is encountered.  Processor keeps track of the address of the memory location containing the next instruction to be fetched using Program Counter (PC).  Instruction Register (IR) is the another key register in the processor Executing an Instruction: To execute an instruction the processor has to perform the following operations  Fetch the contents of the memory location pointed to by the PC. The contents of this location are loaded into the IR (fetch phase). IR [[PC]]  Assuming that the memory is byte addressable, increment the contents of the PC by 4 (fetch phase). PC [PC] + 4  Carry out the actions specified by the instruction in the IR (execution phase). Figureexplanation:  ALU and all the registers are interconnected via a single common bus.  The data and address lines of the external memory bus connected to the internal processor bus via the memory data register, MDR, and the memory address register, MAR respectively.  Register MDR has two inputs and two outputs.  Data may be loaded into MDR either from the memory bus or from the internal processor bus.  The data stored in MDR may be placed on either bus.  The input of MAR is connected to the internal bus, and its output is connected to the external bus.  The control lines of the memory bus are connected to the instruction decoder and control logic.  This unit is responsible for issuing the signals that control the operation of all the units inside the processor and for increasing with the memory bus.  The MUX selects either the output of register Y or a constant value 4 to be provided as input A of the ALU.  The constant 4 is used to increment the contents of the program counter. Figure:
  • 2. 2 | P a g e >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Register Transfers  Instruction execution involves a sequence of steps in which data are transferred from one register to another.  For each register two control signals are used to place the contents of that register on the bus or to load the data on the bus into register.(in figure)  The input and output of register Riin and Riout is set to 1, the data on the bus are loaded into Ri.  Similarly, when Ri out is set to 1, the contents of register Ri are placed on the bus.  While Riout is equal to 0, the bus can be used for transferring data from other registers.
  • 3. 3 | P a g e Example Suppose we wish to transfer the contents of register R1 to register R4. This can be accomplished as follows.  Enable the output of registers R1 by setting R1out to 1. This places the contents of R1 on the processor bus.  Enable the input of register R4 by setting R4out to 1. This loads data from the processor bus into register R4.  All operations and data transfers within the take place within time periods defined by the processor clock.  The control signals that govern a particular transfer are asserted at the start of the clock
  • 4. 4 | P a g e Fig: input and output gating for one register bit. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Performing an Arithmetic or Logic Operation The ALU is a combinational circuit that has no internal storage.  ALU gets the two operands from MUX and bus. The result is temporarily stored in register Z.  What is the sequence of operations to add the contents of register R1 to those of R2 and store the result in R3? R1out, Yin R2out, SelectY, Add, Zin Zout, R3in  All other signals are inactive.  In step 1, the output of register R1 and the input of register Y are enabled, causing the contents of R1 to be transferred over the bus to Y.  Step 2, the multiplexer’s select signal is set to Select Y, causing the multiplexer to gate the contents of register Y to input A of the ALU.  At the same time, the contents of register R2 are gated onto the bus and, hence, to input B.  The function performed by the ALU depends on the signals applied to its control lines.  In this case, the ADD line is set to 1, causing the output of the ALU to be the sum of the two numbers at inputs A and B.  This sum is loaded into register Z because its input control signal is activated.  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 The processor has to specify the address of the memory location where this information is stored and request a Read operation.
  • 5. 5 | P a g e  This applies whether the information to be fetched represents an instruction in a program or an operand specified by an instruction.  The processor transfers the required addressto the MAR, whose output is connected to the address lines of the memory bus. Figure: 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 response time of each memory access varies (cache miss, memory-mapped I/O,…).  To accommodate this, the processor waits until it receives an indication that the requested operation has been completed (Memory-Function-Completed, MFC). Move (R1), R2 MAR [R1] Start a Read operation on the memory bus . Wait for the MFC response from the memory Load MDR from the memory bus R2 [MDR]  The output of MAR is enabled all the time.  Thus the contents of MAR are always available on the address lines of the memory bus.  When a new address is loaded into MAR, it will appear on the memory bus at the beginning of the next clock cycle.(in fig)
  • 6. 6 | P a g e  A read control signal is activated at the same time MAR is loaded. This means memory read operations requires three steps, which can be described by the signals being activated as follows R1out,MARin,Read MDRinE,WMFC MDRout,R2in Execution of Branch Instructions  A branch instruction replaces the contents of PC with the branch target address, which is usually obtained by adding an offset X given in the branch instruction.  The offset X is usually the difference between the branch target address and the address immediately following the branch instruction. Conditional branch
  • 7. 7 | P a g e ....................................................................................................................................... Multiple bus organization In a single bus only one data word can be transferred over the bus in a clock cycle .this increases the steps required to complete the execution of the instruction. To reduce the steps needed to complete the execution of the instruction, most commercial processor provide multiple internal paths that enable several transfer to take place in parallel. Hence, 3 buses are used to connect registers and the ALU of the processor. The register file has 3ports; 1 input port & 2 output ports
  • 8. 8 | P a g e So it is possible to access data of 3 reg on 1 clock cycle;
  • 9. 9 | P a g e The value can be loaded in one register from bus C and data from 2 register can be accessed to bus A and bus B. Buses A and B are used to transfer the source operands to A and B i/ps of the ALU .After ALU operation the result is transferred to the destination operand over the bus C. To increment the value of PC after execution of each instruction to fetch the next instruction , separate unit is provided this unit is called INCREMENTER . this increments the contents of PC accordingly to the length of the instruction so that can point to the next instruction in the sequence. The incrementer eliminates the need of multiplexer connected at A input of ALU. The control sequence is as shown as above. Note that the example shown here is ADD R4 , R5 , R6. The examiner may also ask for ADD R1 , R2, R3. . IMPORTANT TOPICS FROM EXAM POINT OF VIEW 1. ADD (R3) , R1. FOR THIS SEQUENCE OF INSTRUCTIONS THE PROCESSOR IS DRIVEN BY CONTINUOUSLY RUNNING CLOCK SUCH THAT EACH CONTROL STEP IS 2ns IN DURATION. HOW LONG WILL THE PROCESSOR HAVE TO WAIT IN STEPS 2 & 5, ASSUMONG THAT A MEMORY READ OPERATION TAKES 16ns TO COMPLETE? ALSO COMPUTE THE % OF TIME FOR WHICH THE PROCESSOR IS IDLE DURING THE EXECUTION OF THE INSTRUCTION . (10 MARKS) (DEC- 2011 , JAN-10) 2. THREE (MULTIPLE) BUS ORGANIZATION (V.VIMP) (DEC-11,JUNE 11,12..) 3. EXPLANATION WITH NEAT DIAGRAM OF COMPLETE PROCESSOR (DEC-11) (6 MARKS) 4. FETCHING A WORD FROM MEMORY (10 MARKS) 5. ADD R1 , (R3 ) (JULY-2011) (10 MARKS) 6. HARDWIRED CONTROL UNIT (DEC-2010) (10 MARKS) 7. HARDWIRED CONTROL UNIT & SHOW THE GENERATION OF Zin AND END CONTROL SIGNALS. (JUNE-12) (10 MARKS) 8. CONTROL SEQUENCE FOR EXECUTION OF AN UNCONDITIONAL BRANCH INSTRUCTION. (DEC-12) (10 MARKS)
  • 10. 10 | P a g e
  • 11. 11 | P a g e
  • 12. 12 | P a g e The block diagram consists of a instruction unit , integer unit , floating-point unit, instruction cache , data cache, bus interface unit, main memory module and i/p o/p module.  The instruction unit -> fetches instructions from an instruction cache or from the main memory when the desired instructions are not available in the cache  The complete processor provides two processing units Integer unit & Floating-point unit Integer unit is used to process integer data & floating for floating point data. These two units gets data from data cache. Questions: (Dec 2011) Write and explain the control sequences for the execution of the following instruction. ADD (R3), R1. (10 marks)
  • 13. 13 | P a g e Soltn: This instruction adds the contents of the memory locations specified by register R1 and store the result in register R1 . to execute bus instruction it is necessary to perform following action. 1. Fetch the instruction. 2. Fetch the operand from memory pointed by R3. 3. Store the result in R3. 4. Perform the addition. Fig: control sequence for execution of the instruction ADD (R3) , R1. Questions (exercise) 1. ADD R1 , (R3 )