SlideShare ist ein Scribd-Unternehmen logo
1 von 20
•Instruction cycle has a number of smaller units
1.Fetch
2. Indirect
3. Execute
4.Interrupt

• Micro-operations
Each part of the cycle has a number of smaller
steps called micro-operations
• Micro-operations are Fundamental atomic
operations of the processor
It includes four Registers.
• Memory Address Register (MAR)
— Connected to address bus
— Specifies address for read or write op
• Memory Buffer Register (MBR)
— Connected to data bus
— Holds data to write or last data read
• Program Counter (PC)
— Holds address of next instruction to be fetched
• Instruction Register (IR)
— Holds last instruction fetched
Clock
• Repetitive sequence of pulses
• Useful for measuring duration of micro-ops
• Different control signals at different times within instruction
cycle
• Need a counter with different control signals for t1, t2 etc.
The notation represents successive time units.
• First time unit:
Move contents of PC to MAR.
• Second time unit:
Move contents of memory location from MAR to MBR.
Increment by I the contents of the PC.
• Third time unit:
Move contents of MBR to IR.
• The fetch cycle actually consists of
3 steps
&
4 micro ops
• Each micro-op consists of moving data in or out of a Register
AS
• Address of next instruction is in PC
t1: MAR <- (PC)
• Data from data bus copied into MBR
• PC incremented
t2: MBR <- (memory)
PC <- (PC) +I
• Data (instruction) moved from MBR to IR
t3: IR <- (MBR)
• Proper

sequence must be followed

i. MAR <- (PC) must precede MBR <-(memory)

cycle

ii. Conflicts must be avoided
iii. Must not read & write same register in same

iv. MBR <- (memory) & IR <- (MBR) must not be in
same cycle
v. Also PC <- (PC) +1 involves addition

• Might need to Use ALU
• May need additional micro operations.
• If an instruction specifies an indirect addressing
• Then indirect cycles precedes the execution cycle.
i-Instruction fetched
ii-Fetch source operands
• It includes the following micro-operations:
i. The address field of the instruction is transferred to the MAR
t1: MAR <- (IR address) - address field of IR
ii. This is then used to fetch the address of the operand.
t2: MBR <- (memory)
iii. The address field of the IR is updated from the MBR, so that it
now contains a direct rather than an indirect address.
t3: IR address <- (MBR address)
• Now MBR contains direct address of operand
IR is updated with direct address of operand
IR is now in same state as if direct addressing .
• Fetch, Indirect and Interrupt cycles are simple
and predictable
• Execute cycle is different for each instruction
• There are A number of different sequences of microoperations
•Example: ADD R1,X
IR contains the ADD instruction
i. The address portion of the IR is loaded into the MAR
t1: MAR <- (IR address)
ii. The referenced memory location is read
t2: MBR <- (memory)
iii. Finally, the contents of R1 and MBR are added by ALU.
t3: R1 <- R1 + (MBR)
• Additional micro-operations may be required
i. To extract the register reference from the IR
ii. To stage the ALU inputs or outputs in some intermediate registers.
• More complex example:
ISZ X (increment and skip if zero):
The content of location X is incremented by 1.If the result is 0,the next instruction
is skipped . A possible sequence of micro-operations is
t1: MAR ← (IR(address))
t2: MBR ← Memory
t3: MBR ← (MBR) + 1
t4: Memory ← (MBR)
• This test and action can be implemented as one micro-operation:
Conditional action is “the PC is incremented if MBR=0”
If ((MBR) = 0) then (PC ← (PC) + I)
• Also that this micro-operation can be performed during the same time unit during
which the updated value in MBR is stored back to memory
• At end of execute cycle, processor tests interrupt signal.
i. If set, an interrupt cycle occurs
ii. Varies greatly from one machine to another
• How It Performs:
i. The contents of the PC are transferred to the MBR , so that they can be saved
for return from the interrupt

t1: MBR <-(PC)
saved

ii. MAR is loaded with the address At which the contents of the PC are to be

t2: MAR <- save-address
PC is loaded with the address of the start of the interrupt-processing routine.

PC <- routine-address
iii. Store the MBR, which contains the old value of the PC into memory.

t3: memory <- (MBR)
• This is a minimum level of Complexity.
• Most processors may provide multiple types of address
i. So there may be additional micro-ops to get addresses
ii. Note that saving context is done by interrupt handler routine, not micro-ops.
• Each phase is decomposed into a sequence of micro
operations
i. Fetch, indirect, interrupt and Execute cycles
ii. • Tie these above sequences together into the
instruction cycle
• Assume new 2-bit register:
The instruction cycle code (ICC) designates which
part of cycle is in processor
• 00: Fetch
• 01: Indirect
• 10: Execute
• 11: Interrupt
• Decomposing Functioning :
It decomposes functioning of the processor into
elementary operations, called micro-operations.

• Exactly what it is that the control unit doing?
• Functional Requirements:
i. Define the basic elements of the processor
ii. Describe the micro-operations that the processor
performs
iii. Determine the functions control unit must
perform in order to execute the micro-ops
• Basic Elements of processor
i.Registers
ii.Internal data pahs
iii.External data paths
iv.ALU
v.Control Unit
• Types of Micro-operation
i. Transfer data between registers
ii. Transfer data from register to external interface
iii. Transfer data from external interface to register
iv. Perform arithmetic or logical operations using
registers
• Control Unit performs two basic tasks
i. Sequencing
Causing the CPU to step through a series of micro
operations

ii. Execution
Causing the performance of each micro operations.

• How it Performs?
Ans:
• Key to operation is the use of control signals
Signal:
A pulse or frequency
of electricity or light that
represents a control command

• External specifications of
the control unit:
i. Inputs : allow it to
determine the state of the
system
ii. Outputs : allow it to
control the behavior of the
system.
• Internally it requires logic
to perform its sequencing and
execution functions.
• Clock

i. This is how the control unit “keeps time.”
ii. The control unit causes one micro-operation or more to be performed
for each clock pulse.
iii. processor cycle time, or the clock cycle time.
• Instruction register:

i. The op code and addressing mode of the current instruction are used

to

determine which micro-operations to perform during the execute cycle.
• Flags:

i. To determine the status of the processor
ii. To see the outcome of previous ALU operations.
For example
The increment-and-skip-if-zero (ISZ) instruction, the control unit will increment
the PC if the zero flag is set.
• Control signals from control bus:
The control bus portion of the system bus provides signals to the control unit.
• Control signals within the processor: These are two
types:
i. That cause data to be moved from one register to
another
ii. To activate specific ALU functions.
• Control signals to control bus: These are also of two
types :
i. Control signals to memory,
ii. Control signals to the I/O modules.
• Three types of control signals are used:
i. those that activate an ALU function,
ii. those that activate a data path
iii. those that are signals on the external system bus
Micro operation control of processor

Weitere ähnliche Inhalte

Was ist angesagt?

Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)
Ashim Saha
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
Ruchi Maurya
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
Mahesh Kumar Attri
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
Bảo Hoang
 

Was ist angesagt? (20)

Addressing sequencing
Addressing sequencingAddressing sequencing
Addressing sequencing
 
486 or 80486 DX Architecture
486 or 80486 DX Architecture486 or 80486 DX Architecture
486 or 80486 DX Architecture
 
Lecture 3 instruction set
Lecture 3  instruction setLecture 3  instruction set
Lecture 3 instruction set
 
Floating point arithmetic operations (1)
Floating point arithmetic operations (1)Floating point arithmetic operations (1)
Floating point arithmetic operations (1)
 
Types of line coding
Types of line codingTypes of line coding
Types of line coding
 
Microprogrammed Control Unit
Microprogrammed Control UnitMicroprogrammed Control Unit
Microprogrammed Control Unit
 
Memory Organization
Memory OrganizationMemory Organization
Memory Organization
 
Multiplexing
MultiplexingMultiplexing
Multiplexing
 
Assembly language programming(unit 4)
Assembly language programming(unit 4)Assembly language programming(unit 4)
Assembly language programming(unit 4)
 
Types of Addressing modes- COA
Types of Addressing modes- COATypes of Addressing modes- COA
Types of Addressing modes- COA
 
Addressing modes (detailed data path)
Addressing modes (detailed data path)Addressing modes (detailed data path)
Addressing modes (detailed data path)
 
DMA and DMA controller
DMA and DMA controllerDMA and DMA controller
DMA and DMA controller
 
Addressing modes ppt
Addressing modes pptAddressing modes ppt
Addressing modes ppt
 
Chapter 03 arithmetic for computers
Chapter 03   arithmetic for computersChapter 03   arithmetic for computers
Chapter 03 arithmetic for computers
 
Computer architecture virtual memory
Computer architecture virtual memoryComputer architecture virtual memory
Computer architecture virtual memory
 
Subroutine
SubroutineSubroutine
Subroutine
 
Interrupts and types of interrupts
Interrupts and types of interruptsInterrupts and types of interrupts
Interrupts and types of interrupts
 
Arithmatic pipline
Arithmatic piplineArithmatic pipline
Arithmatic pipline
 
Interrupts
InterruptsInterrupts
Interrupts
 
Instruction formats-in-8086
Instruction formats-in-8086Instruction formats-in-8086
Instruction formats-in-8086
 

Andere mochten auch

Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
Nitesh Singh
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
neclinux
 
Presentation on C.P.U
Presentation on C.P.UPresentation on C.P.U
Presentation on C.P.U
fgdgxvbm98
 
Chapter 4 The Processor
Chapter 4 The ProcessorChapter 4 The Processor
Chapter 4 The Processor
guest4f73554
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
Kumar
 
Register Organization and Instruction cycle
Register Organization and Instruction cycleRegister Organization and Instruction cycle
Register Organization and Instruction cycle
Muhammad Ameer Mohavia
 

Andere mochten auch (20)

Arithmetic micro operations
Arithmetic micro operationsArithmetic micro operations
Arithmetic micro operations
 
Logic microoperations
Logic microoperationsLogic microoperations
Logic microoperations
 
Logical and shift micro operations
Logical and shift micro operationsLogical and shift micro operations
Logical and shift micro operations
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Library Resources for ECE 4416 Project
Library Resources for ECE 4416 ProjectLibrary Resources for ECE 4416 Project
Library Resources for ECE 4416 Project
 
Counit2 2
Counit2 2Counit2 2
Counit2 2
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Lecture 16
Lecture 16Lecture 16
Lecture 16
 
9.cs instrset
9.cs instrset9.cs instrset
9.cs instrset
 
1.sdlc
1.sdlc1.sdlc
1.sdlc
 
Computer architecture
Computer architectureComputer architecture
Computer architecture
 
Relational Algebra and MapReduce
Relational Algebra and MapReduceRelational Algebra and MapReduce
Relational Algebra and MapReduce
 
Presentation on C.P.U
Presentation on C.P.UPresentation on C.P.U
Presentation on C.P.U
 
Fetch execute cycle
Fetch execute cycleFetch execute cycle
Fetch execute cycle
 
Hardwired control
Hardwired controlHardwired control
Hardwired control
 
Chapter 4 The Processor
Chapter 4 The ProcessorChapter 4 The Processor
Chapter 4 The Processor
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Register Organization and Instruction cycle
Register Organization and Instruction cycleRegister Organization and Instruction cycle
Register Organization and Instruction cycle
 
Register transfer language
Register transfer languageRegister transfer language
Register transfer language
 

Ähnlich wie Micro operation control of processor

Ähnlich wie Micro operation control of processor (20)

Control unit
Control unitControl unit
Control unit
 
Control unit design
Control unit designControl unit design
Control unit design
 
Control unit
Control unit Control unit
Control unit
 
16 control unit
16 control unit16 control unit
16 control unit
 
Computer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptxComputer_Organization and architecture _unit 1.pptx
Computer_Organization and architecture _unit 1.pptx
 
Computer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organizationComputer Organization : CPU, Memory and I/O organization
Computer Organization : CPU, Memory and I/O organization
 
Digital-Unit-III.ppt
Digital-Unit-III.pptDigital-Unit-III.ppt
Digital-Unit-III.ppt
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Chapter01 (1).ppt
Chapter01 (1).pptChapter01 (1).ppt
Chapter01 (1).ppt
 
computer architecture
computer architecturecomputer architecture
computer architecture
 
CS304PC:Computer Organization and Architecture UNIT II .pdf
CS304PC:Computer Organization and Architecture UNIT II .pdfCS304PC:Computer Organization and Architecture UNIT II .pdf
CS304PC:Computer Organization and Architecture UNIT II .pdf
 
conrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptxconrol_Unit_part_of_computer_architecture.pptx
conrol_Unit_part_of_computer_architecture.pptx
 
Unit 3 CO.pptx
Unit 3 CO.pptxUnit 3 CO.pptx
Unit 3 CO.pptx
 
UNIT 3 - General Purpose Processors
UNIT 3 - General Purpose ProcessorsUNIT 3 - General Purpose Processors
UNIT 3 - General Purpose Processors
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
CMPN301-Pipelining_V2.pptx
CMPN301-Pipelining_V2.pptxCMPN301-Pipelining_V2.pptx
CMPN301-Pipelining_V2.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
 
introduction COA(M1).pptx
introduction COA(M1).pptxintroduction COA(M1).pptx
introduction COA(M1).pptx
 
CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)CO Unit 3.pdf (Important chapter of coa)
CO Unit 3.pdf (Important chapter of coa)
 

Mehr von Muhammad Ishaq (20)

Causality in special relativity
Causality in special relativityCausality in special relativity
Causality in special relativity
 
Business proposal
Business proposalBusiness proposal
Business proposal
 
Artificial neural network model & hidden layers in multilayer artificial neur...
Artificial neural network model & hidden layers in multilayer artificial neur...Artificial neural network model & hidden layers in multilayer artificial neur...
Artificial neural network model & hidden layers in multilayer artificial neur...
 
Artificial Neural Network
Artificial Neural NetworkArtificial Neural Network
Artificial Neural Network
 
Writting process
Writting processWritting process
Writting process
 
Business
Business Business
Business
 
Index
IndexIndex
Index
 
Brochures
BrochuresBrochures
Brochures
 
Dependencies
DependenciesDependencies
Dependencies
 
Input output
Input outputInput output
Input output
 
Multi core processor
Multi core processorMulti core processor
Multi core processor
 
Dram and its types
Dram and its typesDram and its types
Dram and its types
 
Computer architecture overview
Computer architecture overviewComputer architecture overview
Computer architecture overview
 
Raid 1 3
Raid 1 3Raid 1 3
Raid 1 3
 
Multi processing
Multi processingMulti processing
Multi processing
 
Cache memory
Cache memoryCache memory
Cache memory
 
Cache memory
Cache memoryCache memory
Cache memory
 
Addressing
AddressingAddressing
Addressing
 
Clusters
ClustersClusters
Clusters
 
Raid level 4
Raid level 4Raid level 4
Raid level 4
 

Micro operation control of processor

  • 1.
  • 2. •Instruction cycle has a number of smaller units 1.Fetch 2. Indirect 3. Execute 4.Interrupt • Micro-operations Each part of the cycle has a number of smaller steps called micro-operations • Micro-operations are Fundamental atomic operations of the processor
  • 3.
  • 4. It includes four Registers. • Memory Address Register (MAR) — Connected to address bus — Specifies address for read or write op • Memory Buffer Register (MBR) — Connected to data bus — Holds data to write or last data read • Program Counter (PC) — Holds address of next instruction to be fetched • Instruction Register (IR) — Holds last instruction fetched
  • 5. Clock • Repetitive sequence of pulses • Useful for measuring duration of micro-ops • Different control signals at different times within instruction cycle • Need a counter with different control signals for t1, t2 etc. The notation represents successive time units. • First time unit: Move contents of PC to MAR. • Second time unit: Move contents of memory location from MAR to MBR. Increment by I the contents of the PC. • Third time unit: Move contents of MBR to IR.
  • 6. • The fetch cycle actually consists of 3 steps & 4 micro ops • Each micro-op consists of moving data in or out of a Register AS • Address of next instruction is in PC t1: MAR <- (PC) • Data from data bus copied into MBR • PC incremented t2: MBR <- (memory) PC <- (PC) +I • Data (instruction) moved from MBR to IR t3: IR <- (MBR)
  • 7. • Proper sequence must be followed i. MAR <- (PC) must precede MBR <-(memory) cycle ii. Conflicts must be avoided iii. Must not read & write same register in same iv. MBR <- (memory) & IR <- (MBR) must not be in same cycle v. Also PC <- (PC) +1 involves addition • Might need to Use ALU • May need additional micro operations.
  • 8. • If an instruction specifies an indirect addressing • Then indirect cycles precedes the execution cycle. i-Instruction fetched ii-Fetch source operands • It includes the following micro-operations: i. The address field of the instruction is transferred to the MAR t1: MAR <- (IR address) - address field of IR ii. This is then used to fetch the address of the operand. t2: MBR <- (memory) iii. The address field of the IR is updated from the MBR, so that it now contains a direct rather than an indirect address. t3: IR address <- (MBR address) • Now MBR contains direct address of operand IR is updated with direct address of operand IR is now in same state as if direct addressing .
  • 9. • Fetch, Indirect and Interrupt cycles are simple and predictable • Execute cycle is different for each instruction • There are A number of different sequences of microoperations •Example: ADD R1,X IR contains the ADD instruction i. The address portion of the IR is loaded into the MAR t1: MAR <- (IR address) ii. The referenced memory location is read t2: MBR <- (memory) iii. Finally, the contents of R1 and MBR are added by ALU. t3: R1 <- R1 + (MBR)
  • 10. • Additional micro-operations may be required i. To extract the register reference from the IR ii. To stage the ALU inputs or outputs in some intermediate registers. • More complex example: ISZ X (increment and skip if zero): The content of location X is incremented by 1.If the result is 0,the next instruction is skipped . A possible sequence of micro-operations is t1: MAR ← (IR(address)) t2: MBR ← Memory t3: MBR ← (MBR) + 1 t4: Memory ← (MBR) • This test and action can be implemented as one micro-operation: Conditional action is “the PC is incremented if MBR=0” If ((MBR) = 0) then (PC ← (PC) + I) • Also that this micro-operation can be performed during the same time unit during which the updated value in MBR is stored back to memory
  • 11. • At end of execute cycle, processor tests interrupt signal. i. If set, an interrupt cycle occurs ii. Varies greatly from one machine to another • How It Performs: i. The contents of the PC are transferred to the MBR , so that they can be saved for return from the interrupt t1: MBR <-(PC) saved ii. MAR is loaded with the address At which the contents of the PC are to be t2: MAR <- save-address PC is loaded with the address of the start of the interrupt-processing routine. PC <- routine-address iii. Store the MBR, which contains the old value of the PC into memory. t3: memory <- (MBR) • This is a minimum level of Complexity. • Most processors may provide multiple types of address i. So there may be additional micro-ops to get addresses ii. Note that saving context is done by interrupt handler routine, not micro-ops.
  • 12. • Each phase is decomposed into a sequence of micro operations i. Fetch, indirect, interrupt and Execute cycles ii. • Tie these above sequences together into the instruction cycle • Assume new 2-bit register: The instruction cycle code (ICC) designates which part of cycle is in processor • 00: Fetch • 01: Indirect • 10: Execute • 11: Interrupt
  • 13.
  • 14. • Decomposing Functioning : It decomposes functioning of the processor into elementary operations, called micro-operations. • Exactly what it is that the control unit doing? • Functional Requirements: i. Define the basic elements of the processor ii. Describe the micro-operations that the processor performs iii. Determine the functions control unit must perform in order to execute the micro-ops
  • 15. • Basic Elements of processor i.Registers ii.Internal data pahs iii.External data paths iv.ALU v.Control Unit • Types of Micro-operation i. Transfer data between registers ii. Transfer data from register to external interface iii. Transfer data from external interface to register iv. Perform arithmetic or logical operations using registers
  • 16. • Control Unit performs two basic tasks i. Sequencing Causing the CPU to step through a series of micro operations ii. Execution Causing the performance of each micro operations. • How it Performs? Ans: • Key to operation is the use of control signals
  • 17. Signal: A pulse or frequency of electricity or light that represents a control command • External specifications of the control unit: i. Inputs : allow it to determine the state of the system ii. Outputs : allow it to control the behavior of the system. • Internally it requires logic to perform its sequencing and execution functions.
  • 18. • Clock i. This is how the control unit “keeps time.” ii. The control unit causes one micro-operation or more to be performed for each clock pulse. iii. processor cycle time, or the clock cycle time. • Instruction register: i. The op code and addressing mode of the current instruction are used to determine which micro-operations to perform during the execute cycle. • Flags: i. To determine the status of the processor ii. To see the outcome of previous ALU operations. For example The increment-and-skip-if-zero (ISZ) instruction, the control unit will increment the PC if the zero flag is set. • Control signals from control bus: The control bus portion of the system bus provides signals to the control unit.
  • 19. • Control signals within the processor: These are two types: i. That cause data to be moved from one register to another ii. To activate specific ALU functions. • Control signals to control bus: These are also of two types : i. Control signals to memory, ii. Control signals to the I/O modules. • Three types of control signals are used: i. those that activate an ALU function, ii. those that activate a data path iii. those that are signals on the external system bus