Fundamental Concepts Processor fetches one instruction at a time and perform the operation specified. Instructions are fetched from successive memory locations.

Slides:



Advertisements
Similar presentations
The CPU The Central Presentation Unit What is the CPU?
Advertisements

The Fetch – Execute Cycle
Control path Recall that the control path is the physical entity in a processor which: fetches instructions, fetches operands, decodes instructions, schedules.
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
Execution of an instruction
Topics covered: CPU Architecture CSE 243: Introduction to Computer Architecture and Hardware/Software Interface.
Chapter 7. Basic Processing Unit
The Computer Processor
Basic Processing Unit (Week 6)
Lecture 13 - Introduction to the Central Processing Unit (CPU)
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Basic Operational Concepts of a Computer
Micro-operations Are the functional, or atomic, operations of a processor. A single micro-operation generally involves a transfer between registers, transfer.
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
EXECUTION OF COMPLETE INSTRUCTION
Chapter 4 The Von Neumann Model
Computer Architecture Lecture 09 Fasih ur Rehman.
Model Computer CPU Arithmetic Logic Unit Control Unit Memory Unit
General Concepts of Computer Organization Overview of Microcomputer.
1 Purpose of This Chapter In this chapter we introduce a basic computer and show how its operation can be specified with register transfer statements.
Computer Systems - Registers. Starter… Discuss in pairs the definition of the following Control Unit Arithmetic and Logic Unit Registers Internal clock.
COMPILERS CLASS 22/7,23/7. Introduction Compiler: A Compiler is a program that can read a program in one language (Source) and translate it into an equivalent.
The von Neumann Model – Chapter 4 COMP 2620 Dr. James Money COMP
Von Neumann Model Computer Organization I 1 September 2009 © McQuain, Feng & Ribbens The Stored Program Computer 1945: John von Neumann –
Chapter 3 Basic Processing Unit.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Elements of Datapath for the fetch and increment The first element we need: a memory unit to store the instructions of a program and supply instructions.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
MIPS Processor.
Lec 4-2 Five operations of the machine cycle Fetch- fetch the next program instruction from memory. (PC+1); instruction to IR Decode- decode the instruction.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
3.1.4 Hardware a. describe the function and purpose of the control unit, memory unit and ALU (arithmetic logic unit) as individual parts of a computer;
Control Unit Lecture 6.
Chapter 4 The Von Neumann Model
Computer Organization
Chapter 4 The Von Neumann Model
Introduction to Computer Engineering
Chapter 4 The Von Neumann Model
The Processor and Machine Language
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Chapter 4 The Von Neumann Model
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.
Computer Organization “Central” Processing Unit (CPU)
COMS 161 Introduction to Computing
Some Fundamental Concepts
Chapter 7. Basic Processing Unit
Chapter 7. Basic Processing Unit
Chapter 4 The Von Neumann Model
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
Information Representation: Machine Instructions
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
Computer Architecture
Introduction to Computer Engineering
Computer Architecture
Introduction to Computer Engineering
Introduction to Computer Engineering
Introduction to Computer Engineering
MIPS Processor.
Chapter 4 The Von Neumann Model
Presentation transcript:

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)

Executing an Instruction 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).

Processor Organization Datapath

Executing an Instruction 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.

Input and output gating for one register bit. Register Transfers All operations and data transfers are controlled by the processor clock. 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

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

Fetching a Word from Memory 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]

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

Execution of a Complete Instruction Add (R3), R1 Add R2, R1 ?

Execution of a Complete Instruction Add R2, R1 R2out

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 Control sequence for an unconditional branch instruction.

Multiple-Bus Organization Allow the contents of two different registers to be accessed simultaneously and have their contents placed on buses A and B. Allow the data on bus C to be loaded into a third register during the same clock cycle. Incrementer unit. ALU simply passes one of ts two input operands unmodified to bus C  control signal: R=A or R=B

Multiple-Bus Organization Add R4, R5, R6 Step Action 1 PC , R=B, MAR , Read, IncPC out in 2 WMF C 3 MDR , R=B, IR outB in 4 R4 , R5 , SelectA, Add, R6 , End outA outB in Control sequence for the instruction. Add R4,R5,R6, for the three-bus organization

Exercise What is the control sequence for execution of the instruction Add R1, R2 including the instruction fetch phase? (Assume single bus architecture)