Introduction. Datapath Basics

Similar documents
Chapter 4. The Processor

The Processor: Datapath and Control. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Chapter 4. The Processor

Processor (I) - datapath & control. Hwansoo Han

Chapter 4. The Processor. Instruction count Determined by ISA and compiler. We will examine two MIPS implementations

Chapter 4. The Processor Designing the datapath

The Processor (1) Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

COMPUTER ORGANIZATION AND DESIGN. The Hardware/Software Interface. Chapter 4. The Processor: A Based on P&H

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

COMPUTER ORGANIZATION AND DESIGN. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Chapter 4. Instruction Execution. Introduction. CPU Overview. Multiplexers. Chapter 4 The Processor 1. The Processor.

Introduction. Chapter 4. Instruction Execution. CPU Overview. University of the District of Columbia 30 September, Chapter 4 The Processor 1

The Processor. Z. Jerry Shi Department of Computer Science and Engineering University of Connecticut. CSE3666: Introduction to Computer Architecture

Systems Architecture

ECE260: Fundamentals of Computer Engineering

Chapter 4. The Processor

Chapter 4. The Processor. Computer Architecture and IC Design Lab

The MIPS Processor Datapath

ECE232: Hardware Organization and Design

Chapter 4. The Processor

TDT4255 Computer Design. Lecture 4. Magnus Jahre. TDT4255 Computer Design

Chapter 4 The Processor 1. Chapter 4A. The Processor

COMPUTER ORGANIZATION AND DESIGN

Lecture Topics. Announcements. Today: Single-Cycle Processors (P&H ) Next: continued. Milestone #3 (due 2/9) Milestone #4 (due 2/23)

Inf2C - Computer Systems Lecture Processor Design Single Cycle

Of course, the hardware doesn t really execute MIPS assembly language code.

COMPUTER ORGANIZATION AND DESIGN The Hardware/Software Interface. 5 th. Edition. Chapter 4. The Processor

LECTURE 5. Single-Cycle Datapath and Control

CSSE232 Computer Architecture I. Datapath

Data paths for MIPS instructions

Single Cycle Datapath

Review: Abstract Implementation View

Single Cycle Datapath

ECE 486/586. Computer Architecture. Lecture # 7

Unsigned Binary Integers

Unsigned Binary Integers

Chapter 2: Instructions:

CS/COE1541: Introduction to Computer Architecture

EECS150 - Digital Design Lecture 10- CPU Microarchitecture. Processor Microarchitecture Introduction

COMPUTER ORGANIZATION AND DESIGN

ELEC 5200/6200 Computer Architecture and Design Spring 2017 Lecture 4: Datapath and Control

Lecture 10: Simple Data Path

CSEE 3827: Fundamentals of Computer Systems

ENGN1640: Design of Computing Systems Topic 04: Single-Cycle Processor Design

Mark Redekopp and Gandhi Puvvada, All rights reserved. EE 357 Unit 15. Single-Cycle CPU Datapath and Control

Computer and Information Sciences College / Computer Science Department The Processor: Datapath and Control

CS222: Processor Design

CPE 335 Computer Organization. Basic MIPS Architecture Part I

ECE 15B Computer Organization Spring 2011

EECS150 - Digital Design Lecture 9- CPU Microarchitecture. Watson: Jeopardy-playing Computer

COMPUTER ORGANIZATION AND DESIGN

LECTURE 3: THE PROCESSOR

Laboratory 5 Processor Datapath

RISC Processor Design

Block diagram view. Datapath = functional units + registers

The Processor: Datapath & Control

CENG 3420 Lecture 06: Datapath

CPU Organization (Design)

Determined by ISA and compiler. We will examine two MIPS implementations. A simplified version A more realistic pipelined version

The overall datapath for RT, lw,sw beq instrucution

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: MIPS Instruction Set Architecture

Instructions: MIPS ISA. Chapter 2 Instructions: Language of the Computer 1

ECE232: Hardware Organization and Design. Computer Organization - Previously covered

Outline. EEL-4713 Computer Architecture Designing a Single Cycle Datapath

Computer Hardware Engineering

Lecture 3: The Processor (Chapter 4 of textbook) Chapter 4.1

Computer Architecture Computer Science & Engineering. Chapter 4. The Processor BK TP.HCM

Chapter 1. Computer Abstractions and Technology. Lesson 3: Understanding Performance

Instruction Set Architecture

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

CS3350B Computer Architecture Quiz 3 March 15, 2018

Chapter 5: The Processor: Datapath and Control

4. The Processor Computer Architecture COMP SCI 2GA3 / SFWR ENG 2GA3. Emil Sekerinski, McMaster University, Fall Term 2015/16

CS222: MIPS Instruction Set

COMP303 - Computer Architecture Lecture 8. Designing a Single Cycle Datapath

ECE369. Chapter 5 ECE369

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath

Chapter 4. The Processor

Computer Hardware Engineering


COMPSCI 313 S Computer Organization. 7 MIPS Instruction Set

Chapter 4. The Processor

CC 311- Computer Architecture. The Processor - Control

361 datapath.1. Computer Architecture EECS 361 Lecture 8: Designing a Single Cycle Datapath

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA MIPS ISA. In a CPU. (vonneumann) Processor Organization

Chapter 4. The Processor

Pipelining Analogy. Pipelined laundry: overlapping execution. Parallelism improves performance. Four loads: Non-stop: Speedup = 8/3.5 = 2.3.

CENG 3420 Computer Organization and Design. Lecture 06: MIPS Processor - I. Bei Yu

Computer Organization and Structure

CS 61C: Great Ideas in Computer Architecture. MIPS CPU Datapath, Control Introduction

CS3350B Computer Architecture MIPS Instruction Representation

Ch 5: Designing a Single Cycle Datapath

Computer Architecture

Computer Architecture

Processor. Han Wang CS3410, Spring 2012 Computer Science Cornell University. See P&H Chapter , 4.1 4

Topic Notes: MIPS Instruction Set Architecture

CSE 378 Midterm 2/12/10 Sample Solution

ECE260: Fundamentals of Computer Engineering

CS 4200/5200 Computer Architecture I

EIE/ENE 334 Microprocessors

Transcription:

Introduction CPU performance factors - Instruction count; determined by ISA and compiler - CPI and Cycle time; determined by CPU hardware 1 We will examine a simplified MIPS implementation in this course and a more realistic pipelined version in the next. Simple subset of machine instructions, shows most aspects - Memory reference: lw, sw - Arithmetic/logical: add, sub, and, or, slt - Control transfer: beq, j

Review of MIPS Machine Language Simple instructions, all 32 bits wide 2 Very structured, no unnecessary baggage Only three instruction formats: R op rs rt rd shamt funct I op rs rt 16-bit immediate J op 26-bit immediate Basic arithmetical-logical instructions are R-format. Load/store/conditional branch instructions are I-format. Jump/unconditional branch instructions are J-format. 2006-09 2009 McQuain, McQuain Feng & Ribbens

Instruction Execution PC instruction memory, fetch instruction 3 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

CPU Overview 4

Need for Selection Mechanisms 5 Must choose which one goes back to PC. BUT, you cannot just join wires together to achieve this Compute address for sequential execution. Compute address for conditional branch.

Multiplexors 6 Input 0 Input 1 Input 2... Input K-1 Output Select signal 0 K-1

Applying Control Logic The 2x1 multiplexor must have a 1-bit control line to select between the two inputs. There must be a combinational circuit that determines which input should be selected and passed through to the PC. 7 So, under what condition(s) should the branch address be used? if we're executing a conditional branch instruction and the branch condition has evaluated to true.

Control Questions 8 What's the logic for controlling the other MUXes? What goes here? What control settings will the ALU need?

Logic Design Basics Information encoded in binary - Low voltage = 0, High voltage = 1 - One wire per bit - Multi-bit data encoded on multi-wire buses 9 Combinational elements - Operate on data - Output is purely a function of input State (sequential) elements - Store information - Output/state depends on input and on previous state

Building a Datapath 10 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

Instruction Fetch 11 32-bit register Increment by 4 for next instruction just what we want unless current instruction is beq

R-Format Instructions 12 Read two register operands Perform arithmetic/logical operation Write register result op rs rt rd shamt funct We need to specify which ALU operation we need.

Load/Store Instructions 13 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 op rs rt 16-bit immediate

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 14 This will be the address of an instruction. So, it must be a multiple of 4. So, the two low-order bits (2^0 and 2^1) must both be zeros. So we won't store those bits in the instruction. So, we effectively get an 18-bit offset, which means we can jump further op rs rt 16-bit immediate

Branch Instructions 15 Just re-route wires Sign-bit wire replicated

Putting It All Together 16