CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000.

Slides:



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

Machine cycle.
Microprocessors.
CS1104: Computer Organisation School of Computing National University of Singapore.
ELEN 468 Advanced Logic Design
CMPT 334 Computer Organization
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
CS61C L24 Introduction to CPU Design (1) Garcia, Spring 2007 © UCB Cell pic to web site  A new MS app lets people search the web based on a digital cell.
CHAPTER 4 COMPUTER SYSTEM – Von Neumann Model
CS61C L18 Introduction to CPU Design (1) Beamer, Summer 2007 © UCB Scott Beamer, Instructor inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
ENEE350 Ankur Srivastava University of Maryland, College Park Based on Slides from Mary Jane Irwin ( )
Computer Structure - Datapath and Control Goal: Design a Datapath  We will design the datapath of a processor that includes a subset of the MIPS instruction.
CS61C L25 CPU Design : Designing a Single-Cycle CPU (1) Garcia, Fall 2006 © UCB T-Mobile’s Wi-Fi / Cell phone  T-mobile just announced a new phone that.
CS61C L24 Introduction to CPU Design (1) Garcia, Fall 2006 © UCB Fedora Core 6 (FC6) just out  The latest version of the distro has been released; they.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 24 Introduction to CPU design Stanford researchers developing 3D camera.
Elements of the Computer (How a processor works)
CS61C L20 Datapath © UC Regents 1 CS61C - Machine Structures Lecture 20 - Datapath November 8, 2000 David Patterson
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 27: Single-Cycle CPU Datapath Design Instructor: Sr Lecturer SOE Dan Garcia
The Computer Processor
CPU Registers PC Arith Logic Unit Bus Interface I/O Bridge System bus Memory bus Main Memory USB Controller Graphics Adapter Disk Controller I/O Bus Mouse.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4: IT Students.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 4:
CPU Fetch/Execute Cycle
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
Chapter 1 Basic Structure of Computers. Chapter Outline computer types, structure, and operation instructions and programs numbers, arithmetic operations,
Introduction to Computing Systems from bits & gates to C & beyond Chapter 4 The Von Neumann Model Basic components Instruction processing.
Stack Stack Pointer A stack is a means of storing data that works on a ‘Last in first out’ (LIFO) basis. It reverses the order that data arrives and is.
Week 2.  Understand what the processor is and what it does.  Execute basic LMC programs.  Understand how CPU characteristics affect performance.
Introduction to Computer Engineering CS/ECE 252, Fall 2009 Prof. Mark D. Hill Computer Sciences Department University of Wisconsin – Madison.
Princess Sumaya Univ. Computer Engineering Dept. Chapter 5:
Computer Architecture Memory, Math and Logic. Basic Building Blocks Seen: – Memory – Logic & Math.
Lecture 2 Microprocessor Architecture Image from:
Fetch-execute cycle.
Electronic Analog Computer Dr. Amin Danial Asham by.
Computer Organization 1 Instruction Fetch and Execute.
Dale & Lewis Chapter 5 Computing components
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
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.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
1 Basic Processor Architecture. 2 Building Blocks of Processor Systems CPU.
Digital Computer Concept and Practice Copyright ©2012 by Jaejin Lee Control Unit.
MIPS Processor.
New-School Machine Structures Parallel Requests Assigned to computer e.g., Search “Katz” Parallel Threads Assigned to core e.g., Lookup, Ads Parallel Instructions.
CS 61C: Great Ideas in Computer Architecture MIPS Datapath 1 Instructors: Nicholas Weaver & Vladimir Stojanovic
Electrical and Computer Engineering University of Cyprus
Control Unit Lecture 6.
Lecture 13 - Introduction to the Central Processing Unit (CPU)
ELEN 468 Advanced Logic Design
Chapter 4 The Von Neumann Model
Computer Architecture
Chapter 4 The Von Neumann Model
Processor (I).
CS/COE0447 Computer Organization & Assembly Language
Single-Cycle DataPath
Number Representations and Basic Processor Architecture
CSCE 212 Chapter 5 The Processor: Datapath and Control
Single-Cycle CPU DataPath.
MIPS Processor.
Rocky K. C. Chang 6 November 2017
Guest Lecturer TA: Shreyas Chand
COMS 361 Computer Organization
Instructor Paul Pearce
The Stored Program Computer
Basic components Instruction processing
Objectives Describe common CPU components and their function: ALU Arithmetic Logic Unit), CU (Control Unit), Cache Explain the function of the CPU as.
The Processor: Datapath & Control.
MIPS Processor.
Presentation transcript:

CS61C L20 Datapath © UC Regents 1 Microprocessor James Tan Adapted from D. Patterson’s CS61C Copyright 2000 UCB

CS61C L20 Datapath © UC Regents 2 Five Components of a Computer Processor (active) Computer Control Datapath Memory (passive) (where programs, data live when running) Devices Input Output Keyboard, Mouse Display, Printer Disk (where programs, data live when not running)

CS61C L20 Datapath © UC Regents 3 The CPU °Processor (CPU & ALU): does data manipulation and decision-making °Control: part of the processor which tells the datapath what needs to be done

CS61C L20 Datapath © UC Regents 4 Stages of the Machine Cycle °Problem: a single, atomic block which “executes an instruction” (performs all necessary operations beginning with fetching the instruction) would be too bulky and inefficient °Solution: break up the process of “executing an instruction” into stages, and then connect the stages to create the whole datapath smaller stages are easier to design easy to optimize (change) one stage without touching the others

CS61C L20 Datapath © UC Regents 5 Stages of the Machine Cycle °What general steps do they have in common? °Stage 1: Instruction Fetch no matter what the instruction, the instruction word must first be fetched from memory also, this is where we Increment PC (that is, PC = PC + 1, to point to the next instruction)

CS61C L20 Datapath © UC Regents 6 Stages of the Machine Cycle °Stage 2: Instruction Decode upon fetching the instruction, we next gather data from the fields (decode all necessary instruction data) first, read the Opcode to determine instruction type and field lengths etc (Page tells you how the instruction format may look like.)

CS61C L20 Datapath © UC Regents 7 Stages of the Machine Cycle °Stage 3: ALU Execute Take place at Arithmetic-Logic Unit the real work of most instructions is done here: arithmetic (+, -, *, /), shifting, logic (&, |), comparisons

CS61C L20 Datapath © UC Regents 8 Stages of the Machine Cycle °Stage 4: Store result in Memory the load and store instructions are done during this stage most instructions write the result of some computation into a register examples: arithmetic, logical, shifts, loads, slt what about stores, branches, jumps? -don’t write anything into a register at the end -these remain idle during this fifth stage

CS61C L20 Datapath © UC Regents 9 Generic Steps=> Machine Cycle PC instruction memory +4 rt rs rd registers ALU Data memory imm 1. Instruction Fetch 2. Decode/ Register Read 3. Execute4. Memory 5. Reg. Write

CS61C L20 Datapath © UC Regents 10 Machine Cycle (Page ) °ADD A $15, X Stage 1: Fetch this instruction from Memory and load it to Instruction Register, inc. PC Details: (PC = 0127)  Address Register: -(Address Register) = 0127 (PC) + 1  PC(new PC = 0128) -Address Register = 0127  Address Bus (Data Bus)  Data Register (Data Register)  Instruction

CS61C L20 Datapath © UC Regents 11 Machine Cycle (Page ) Compute the indexed address of the operand Fetch the Operand -(PC = 0128)  Address Register: -(PC) + 1  PC(new PC = 0129) -Address Register = 0127  Address Bus -(Address Register)  Address Bus Memory Read -(Data Bus)  Data Register -(Data Register)  one ALU Input -(Index Register)  the other ALU Input ALU ADD[ Index Register + Offset] -(Output of ALU)  Address Register Address of Operand = (Index Reg + 15) = 242A

CS61C L20 Datapath © UC Regents 12 Machine Cycle (Page ) (Address Register)=242A  Address Bus Memory Read -(Data Bus) = 1D  Data Register -(Data Register) = 1D  One ALU Input -(Accumulator A) = A1  The other ALU Input ALU ADD [1D + A1]  A = BE 16

CS61C L20 Datapath © UC Regents 13 Machine Cycle (Page 20) ADD A $15, X The time taken to execute this cycle is five MPU cycles. -1 St MPU cycle [Fetch Phase] –Fetch & Decode the first byte of the instruction. -2 nd MPU cycle [Execute Phase…] –Obtain the ‘Operand Address Field’. 2 nd byte of the instruction, and put it in it in Data Register -3 rd MPU cycle –Calculate the address of the Operand. –i.e. ADD it to Index Register

CS61C L20 Datapath © UC Regents 14 Machine Cycle (Page 20) °ADD A $15, X 4 th MPU Cycle -Get the Operand and place it in the Data Register 5 th MPU Cycle -Perform the required addition

CS61C L20 Datapath © UC Regents Programming Model of CPU (Pg 10.21) Accumulator A Accumulator B Program Counter Stack Pointer Index Register Condition Code Register -Carry Flag -Overflow Flag -Zero Flag -Negative Flag