EXECUTION OF COMPLETE INSTRUCTION

Slides:



Advertisements
Similar presentations
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
Advertisements

Arithmetic Logic Unit (ALU)
CS1104: Computer Organisation School of Computing National University of Singapore.
ARITHMETIC LOGIC SHIFT UNIT
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
Chapter 16 Control Unit Operation No HW problems on this chapter. It is important to understand this material on the architecture of computer control units,
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
Chapter 15 IA 64 Architecture Review Predication Predication Registers Speculation Control Data Software Pipelining Prolog, Kernel, & Epilog phases Automatic.
Chapter 7. Basic Processing Unit
The Processor Andreas Klappenecker CPSC321 Computer Architecture.
Computer Organization and Architecture
Basic Processing Unit (Week 6)
Computer Architecture Lecture 12 Fasih ur Rehman.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
Chapter 7 Processing Unit
Chapter 5 Basic Processing Unit
Lec 5 Introduction to CPU Design. Introduction to CPU Design Computer Organization & Assembly Language Programming slide 2 Outline  Introduction  Data.
Multiple-bus organization
Chapter 4 The Von Neumann Model
Computer Architecture Lecture 09 Fasih ur Rehman.
Introduction to Computer Engineering CS/ECE 252, Fall 2009 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin – Madison.
General Concepts of Computer Organization Overview of Microcomputer.
In1210/01-PDS 1 TU-Delft The Processing Unit. in1210/01-PDS 2 TU-Delft Problem f y ALU y Decoder a instruction Reg ?
UNIT-III CONTROL UNIT DESIGN
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Lecture 15 Microarchitecture Level: Level 1. Microarchitecture Level The level above digital logic level. Job: to implement the ISA level above it. The.
Chapter 3 Basic Processing Unit.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
GROUP 2 CHAPTER 16 CONTROL UNIT Group Members ๏ Evelio L. Hernandez ๏ Ashwin Soerdien ๏ Andrew Keiper ๏ Hermes Andino.
Please see “portrait orientation” PowerPoint file for Chapter 7 Figure 7.1. Single-bus organization of the datapath inside a processor.
Fundamental of Computer Architecture By Panyayot Chaikan ac.th Ocbober 25, 2004.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Control Unit Design.
Computer Organization and Architecture + Networks
Chapter 4 The Von Neumann Model
Computer Organization
Chapter 4 The Von Neumann Model
William Stallings Computer Organization and Architecture
William Stallings Computer Organization and Architecture 7th Edition
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
The Processor and Machine Language
UNIT 4 Control Unit. UNIT 4 Control Unit Single CPU Bus CPU Bus MUX Temp PC R0 R(n-1) Instruction Decoder IR MAR MDR Z Y ALU Carry In Address Lines.
Basic Processing Unit Unit- 7 Engineered for Tomorrow CSE, MVJCE.
Functional Units.
Introduction to Computer Engineering
Some Fundamental Concepts
Control Unit Introduction Types Comparison Control Memory
William Stallings Computer Organization and Architecture 7th Edition
Chapter 7. Basic Processing Unit
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Chapter 7. Basic Processing Unit
Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.
Chapter 4 The Von Neumann Model
ECE 352 Digital System Fundamentals
Basic Processing Unit UNIT-5.
The Stored Program Computer
GCSE OCR 1 The CPU Computer Science J276 Unit 1
A Top-Level View Of Computer Function And Interconnection
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
Presentation transcript:

EXECUTION OF COMPLETE INSTRUCTION

Overview Instruction Set Processor (ISP):processing unit executes machine instruction and coordinate the activities of other units Central Processing Unit (CPU):examine internal structure and how it performs the task of fetching,decoding, and executing instructions of a program A typical computing task consists of a series of steps specified by a sequence of machine instructions that constitute a program. An instruction is executed by carrying out a sequence of more operations.

Some Fundamental Concepts

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)

Fundamental Concepts- To Execute an Instruction,processor involve 3 steps 1.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]] 2.Assuming that the memory is byte addressable, increment the contents of the PC by 4 (fetch phase). PC ← [PC] + 4

3.Carry out the actions specified by the instruction in the IR

Processor Organization MDR HAS TWO INPUTS AND TWO OUTPUTS Datapath Textbook Page 413

Fundamental Concepts MDR-2 I/P & 2 O/P MAR- I/P from internal bus and o/p is connected to external bus Data bus & address bus line are connected to internal processor bus via MDR &MAR Control line of memory bus are connected to instruction decoder and control logic block and it is responsible for issuing signal that control all the units

Fundamental Concepts Three register Y,Z,TEMP are temporary register used by processor for temporary storage during execution These 3 registers are never used for storing data for future reference MUX(multiplexer) selects either o/p of register Y or a constant value 4 to provide as i/p to ALU

Fundamental Concepts Data are transferred from one register to another register via ALU Instruction decoder and control logic unit is responsible for implementing action specified by instruction loaded in IR Decoder generate ctrl signal to select register involved & direct the transfer of data Register,ALU & interconnectcng bus are collectively referred as Datapath

Fundamental Concepts Instruction execution Operation:- Transfer a word of data from one processor register to another or to the ALU. Perform an arithmetic or a logic operation and store the result in a processor register. Fetch the contents of a given memory location and load them into a processor register. Store a word of data from a processor register into a given memory location.

Register Transfers

Register Transfers B A Z ALU Y in out R i b us Internal processor Constant 4 MUX Figure 7.2. Input and output gating for the registers in Figure 7.1. Select

Register Transfers I/p & o/p of register Ri are connected to bus via switches controlled by signals Ri in & Ri out When Ri in is set to 1,the data on the bus are loaded to Ri When Ri out is set to 1,content of register Ri are placed on the bus

Register Transfers Transfer the content of register R1 to R4 (2 bulletin points in pg-415) refer from book All operations and data transfer within the processor takes place within time periods is defined by processor clock Data transfer may use both rising & falling edges of the clock When edge triggered flip flop are not used, 2

Register Transfers or more clock signal may be needed to guarantee proper transfer of data,known as multiphase clocking Figure 7.3. Input and output gating for one register bit(explaination refer book pg -415 ( 4th & 5th para))

Figure 7.3. Input and output gating for one register bit. Register Transfers All operations and data transfers are controlled by the processor clock. Figure 7.3. Input and output gating for one register bit.

Performing an Arithmetic or Logic Operation

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 explaination refer book pg -417 ( 2nd para))

Fetching a Word from Memory

Fetching a Word from Memory Address into MAR; issue Read operation; data into MDR. Figure 7.4. Connection and control signals for register MDR.

MDR in and MDR out control connection to the internal bus MDR inE and MDR outE control connection to the external bus MDR inE = 1,i/p is selected from memory bus A second tri- state gate controlled by MDR out E used to connect output of the flip flop to memory bus

Processor completes one internal data transfer in one clock cycle Cache will respond to memory read request in one clock cycle When cache miss occur request is forwarded to main memory the processor waits until it receives an indication that the requested operation has been completed (Memory-Function-Completed, MFC).

Fetching a Word from Memory WMFC is the control signal that cause the processor’s control circuit to wait for the arrival of MFC signal Example of READ opeartion: How to Move (R1), R2? MAR ← [R1] Start a Read operation on the memory bus Wait for the MFC response from the memory Load into MDR from the memory bus R2 ← [MDR]

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] R1 out , MAR in ,Read MDR inE, WMFC MDR out, R2 in

STORING A WAORD IN MEMORY MOVE R2,(R1) R1 out , MAR in R2 out , MDR in ,Write MDR outE, WMFC Desired address(R1) is loaded into MAR Data to be written are loaded into MDR & Write command is issued explaination refer book pg -420( last para))

Execution of a Complete Instruction Add (R3), R1 Fetch the instruction Fetch the first operand (the contents of the memory location pointed to by R3) Perform the addition Load the result into R1

Architecture B A Z ALU Y in out R i b us Internal processor Constant 4 MUX Figure 7.2. Input and output gating for the registers in Figure 7.1. Select

Execution of a Complete Instruction Add (R3), R1

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

Execution of Branch Instructions Step Action 1 PC , MAR , Read, Select4, Add, Z out in in 2 Z , PC , Y , WMF C out in in 3 MDR , IR out in 4 Offset-field-of-IR , Add, Z out in 5 Z , PC , End out in Figure 7.7. Control sequence for an unconditional branch instruction.

Hardwired Control

Overview To execute instructions, the processor must have some means of generating the control signals needed in the proper sequence. Two categories: hardwired control and microprogrammed control Hardwired system can operate at high speed; but with little flexibility.

Control Unit Organization CLK Control step Clock counter External inputs Decoder/ IR encoder Condition codes Control signals Figure 7.10. Control unit organization.

Detailed Block Description

Generating Zin Zin = T1 + T6 • ADD + T4 • BR + … Branch Add T T 4 6 T 1 Figure 7.12. Generation of the Zin control signal for the processor in Figure 7.1.

A Complete Processor