CPS3340 COMPUTER ARCHITECTURE Fall Semester, 2013 11/19/2013 Lecture 17: The Processor - Overview Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER.

Slides:



Advertisements
Similar presentations
331 W08.1Spring :332:331 Computer Architecture and Assembly Language Spring 2006 Week 8: Datapath Design [Adapted from Dave Patterson’s UCB CS152.
Advertisements

The Processor: Datapath & Control
1  1998 Morgan Kaufmann Publishers Chapter Five The Processor: Datapath and Control.
Lec 17 Nov 2 Chapter 4 – CPU design data path design control logic design single-cycle CPU performance limitations of single cycle CPU multi-cycle CPU.
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.
The Processor 2 Andreas Klappenecker CPSC321 Computer Architecture.
Chapter Five The Processor: Datapath and Control.
Shift Instructions (1/4)
1 The Processor: Datapath and Control We will design a microprocessor that includes a subset of the MIPS instruction set: –Memory access: load/store word.
Processor I CPSC 321 Andreas Klappenecker. Midterm 1 Thursday, October 7, during the regular class time Covers all material up to that point History MIPS.
S. Barua – CPSC 440 CHAPTER 5 THE PROCESSOR: DATAPATH AND CONTROL Goals – Understand how the various.
The Processor Data Path & Control Chapter 5 Part 1 - Introduction and Single Clock Cycle Design N. Guydosh 2/29/04.
The Processor: Datapath & Control. Implementing Instructions Simplified instruction set memory-reference instructions: lw, sw arithmetic-logical instructions:
Designing a Simple Datapath Lecture for CPSC 5155 Edward Bosworth, Ph.D. Computer Science Department Columbus State University Revised 9/12/2013.
COSC 3430 L08 Basic MIPS Architecture.1 COSC 3430 Computer Architecture Lecture 08 Processors Single cycle Datapath PH 3: Sections
Computer Organization CS224 Fall 2012 Lesson 26. Summary of Control Signals addsuborilwswbeqj RegDst ALUSrc MemtoReg RegWrite MemWrite Branch Jump ExtOp.
Lecture 9. MIPS Processor Design – Instruction Fetch Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education &
Chapter 4 CSF 2009 The processor: Building the datapath.
Chapter 4 The Processor CprE 381 Computer Organization and Assembly Level Programming, Fall 2013 Zhao Zhang Iowa State University Revised from original.
Lecture 8: Processors, Introduction EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2014,
Lecture 14: Processors CS 2011 Fall 2014, Dr. Rozier.
Single Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
Lec 15Systems Architecture1 Systems Architecture Lecture 15: A Simple Implementation of MIPS Jeremy R. Johnson Anatole D. Ruslanov William M. Mongan Some.
Gary MarsdenSlide 1University of Cape Town Chapter 5 - The Processor  Machine Performance factors –Instruction Count, Clock cycle time, Clock cycles per.
Computer Organization CS224 Fall 2012 Lesson 22. The Big Picture  The Five Classic Components of a Computer  Chapter 4 Topic: Processor Design Control.
ECE 445 – Computer Organization
CDA 3101 Fall 2013 Introduction to Computer Organization
Datapath Design Computer Organization I 1 August 2009 © McQuain, Feng & Ribbens Composing the Elements First-cut data path does an instruction.
1 A single-cycle MIPS processor  An instruction set architecture is an interface that defines the hardware operations which are available to software.
Designing a Single- Cycle Processor 國立清華大學資訊工程學系 黃婷婷教授.
Single Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
CPU Overview Computer Organization II 1 February 2009 © McQuain & Ribbens Introduction CPU performance factors – Instruction count n Determined.
C OMPUTER O RGANIZATION AND D ESIGN The Hardware/Software Interface 5 th Edition Chapter 4 The Processor.
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.
CS4100: 計算機結構 Designing a Single-Cycle Processor 國立清華大學資訊工程學系 一零零學年度第二學期.
CSCI-365 Computer Organization Lecture Note: Some slides and/or pictures in the following are adapted from: Computer Organization and Design, Patterson.
COM181 Computer Hardware Lecture 6: The MIPs CPU.
Gary MarsdenSlide 1University of Cape Town Computer Architecture – Introduction Andrew Hutchinson & Gary Marsden (me) ( ) September 2003.
MIPS Processor.
Morgan Kaufmann Publishers The Processor
May 22, 2000Systems Architecture I1 Systems Architecture I (CS ) Lecture 14: A Simple Implementation of MIPS * Jeremy R. Johnson Mon. May 17, 2000.
Appendix C Basics of Logic Design. Appendix C — Logic Basic — 2 Logic Design Basics §4.2 Logic Design Conventions Objective: To understand how to build.
Computer Architecture Lecture 6.  Our implementation of the MIPS is simplified memory-reference instructions: lw, sw arithmetic-logical instructions:
CS161 – Design and Architecture of Computer Systems
Single-Cycle Datapath and Control
Morgan Kaufmann Publishers
Introduction CPU performance factors
Morgan Kaufmann Publishers The Processor
Morgan Kaufmann Publishers
Processor Architecture: Introduction to RISC Datapath (MIPS and Nios II) CSCE 230.
Morgan Kaufmann Publishers The Processor
Processor (I).
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Morgan Kaufmann Publishers The Processor
CSCI206 - Computer Organization & Programming
MIPS Processor.
Morgan Kaufmann Publishers The Processor
Topic 5: Processor Architecture Implementation Methodology
Rocky K. C. Chang 6 November 2017
Composing the Elements
Composing the Elements
The Processor Lecture 3.2: Building a Datapath with Control
The Processor Lecture 3.1: Introduction & Logic Design Conventions
Topic 5: Processor Architecture
Systems Architecture I
COSC 2021: Computer Organization Instructor: Dr. Amir Asif
Single Cycle Datapath Lecture notes from MKP, H. H. Lee and S. Yalamanchili.
The Processor: Datapath & Control.
MIPS Processor.
Processor: Datapath and Control
Presentation transcript:

CPS3340 COMPUTER ARCHITECTURE Fall Semester, /19/2013 Lecture 17: The Processor - Overview Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE CENTRAL STATE UNIVERSITY, WILBERFORCE, OH 1

Introduction  CPU performance factors  Instruction count Determined by ISA and compiler  CPI and Cycle time Determined by CPU hardware  We will examine two MIPS implementations  A simplified version  A more realistic pipelined version  Simple subset, shows most aspects  Memory reference: lw, sw  Arithmetic/logical: add, sub, and, or, slt  Control transfer: beq, j §4.1 Introduction 2

Instruction Execution  PC  instruction memory, fetch instruction  Register numbers  register file, read registers  Depending on instruction class  Use ALU to calculate Arithmetic result Memory address for load/store Branch target address  Access data memory for load/store  PC  target address or PC + 4 3

CPU Overview 4

Multiplexers Can’t just join wires together Use multiplexers 5

Control 6

Logic Design Basics §4.2 Logic Design Conventions  Information encoded in binary  Low voltage = 0, High voltage = 1  One wire per bit  Multi-bit data encoded on multi-wire buses  Combinational element  Operate on data  Output is a function of input  State (sequential) elements  Store information 7

Combinational Elements  AND-gate  Y = A & B A B Y I0 I1 Y MuxMux S Multiplexer Y = S ? I1 : I0 A B Y + A B Y ALU F Adder Y = A + B Arithmetic/Logic Unit Y = F(A, B) 8

Sequential Elements  Register: stores data in a circuit  Uses a clock signal to determine when to update the stored value  Edge-triggered: update when Clk changes from 0 to 1 D Clk Q D Q 9

Sequential Elements  Register with write control  Only updates on clock edge when write control input is 1  Used when stored value is required later D Clk Q Write D Q Clk 10

Clocking Methodology  Combinational logic transforms data during clock cycles  Between clock edges  Input from state elements, output to state element  Longest delay determines clock period 11

Building a Datapath  Datapath  Elements that process data and addresses in the CPU Registers, ALUs, mux’s, memories, …  We will build a MIPS datapath incrementally  Refining the overview design §4.3 Building a Datapath 12

Instruction Fetch 32-bit register Increment by 4 for next instruction 13

R-Format Instructions  Read two register operands  Perform arithmetic/logical operation  Write register result 14

Load/Store Instructions  Read register operands  Calculate address using 16-bit offset  Use ALU, but sign-extend offset  Load: Read memory and update register  Store: Write register value to memory 15

Branch Instructions  Read register operands  Compare operands  Use ALU, subtract and check Zero output  Calculate target address  Sign-extend displacement  Shift left 2 places (word displacement)  Add to PC + 4 Already calculated by instruction fetch 16

Branch Instructions Sign-bit wire replicated 17

Composing the Elements  First-cut data path does an instruction in one clock cycle  Each datapath element can only do one function at a time  Hence, we need separate instruction and data memories  Use multiplexers where alternate data sources are used for different instructions 18

R-Type/Load/Store Datapath 19

Full Datapath 20

ALU Control  ALU used for  Load/Store: F = add  Branch: F = subtract  R-type: F depends on funct field §4.4 A Simple Implementation Scheme ALU controlFunction 0000AND 0001OR 0010add 0110subtract 0111set-on-less-than 1100NOR 21

ALU Control  Assume 2-bit ALUOp derived from opcode  Combinational logic derives ALU control opcodeALUOpOperationfunctALU functionALU control lw00load wordXXXXXXadd0010 sw00store wordXXXXXXadd0010 beq01branch equalXXXXXXsubtract0110 R-type10add100000add0010 subtract100010subtract0110 AND100100AND0000 OR100101OR0001 set-on-less-than101010set-on-less-than inputoutputinput

The Main Control Unit  Control signals derived from instruction 0rsrtrdshamtfunct 31:265:025:2120:1615:1110:6 35 or 43rsrtaddress 31:2625:2120:1615:0 4rsrtaddress 31:2625:2120:1615:0 R-type Load/ Store Branch opcodealways read read, except for load write for R-type and load sign-extend and add 23

Datapath With Control 24

R-Type Instruction 25

Load Instruction 26

Branch-on-Equal Instruction 27

Implementing Jumps  Jump uses word address  Update PC with concatenation of  Top 4 bits of old PC  26-bit jump address  00  Need an extra control signal decoded from opcode 2address 31:2625:0 Jump 28

Datapath With Jumps Added 29

Performance Issues  Longest delay determines clock period  Critical path: load instruction  Instruction memory  register file  ALU  data memory  register file  Not feasible to vary period for different instructions  Violates design principle  Making the common case fast  We will improve performance by pipelining 30

What I want you to do  Review Chapter 4 and Class Slides 31