Inf2C - Computer Systems Lecture Processor Design Single Cycle

Similar documents
ECE232: Hardware Organization and Design

Processor (I) - datapath & control. Hwansoo Han

Systems Architecture

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

Chapter 4. The Processor

Chapter 4. The Processor

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

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

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. 5 th Edition. The Hardware/Software Interface. Chapter 4. The Processor

Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle

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

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

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

ECE260: Fundamentals of Computer Engineering

Introduction. Datapath Basics

The MIPS Processor Datapath

Single Cycle Datapath

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

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

Single Cycle Datapath

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

Chapter 4. The Processor

LECTURE 5. Single-Cycle Datapath and Control

Chapter 4. The Processor

Data paths for MIPS instructions

Chapter 5: The Processor: Datapath and Control

CPU Organization (Design)

Systems Architecture I

COMPUTER ORGANIZATION AND DESIGN

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

CS222: Processor Design

ECE369. Chapter 5 ECE369

Topic #6. Processor Design

Adding Support for jal to Single Cycle Datapath (For More Practice Exercise 5.20)

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

CSE140: Components and Design Techniques for Digital Systems

Laboratory 5 Processor Datapath

CC 311- Computer Architecture. The Processor - Control

CPE 335. Basic MIPS Architecture Part II

The Processor: Datapath & Control

The Processor: Datapath & Control

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

COMPUTER ORGANIZATION AND DESIGN

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

Review: Abstract Implementation View

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

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

Lecture 5 and 6. ICS 152 Computer Systems Architecture. Prof. Juan Luis Aragón

Block diagram view. Datapath = functional units + registers

CS3350B Computer Architecture Quiz 3 March 15, 2018

COMP303 Computer Architecture Lecture 9. Single Cycle Control

Lecture 4: Review of MIPS. Instruction formats, impl. of control and datapath, pipelined impl.

Full Datapath. CSCI 402: Computer Architectures. The Processor (2) 3/21/19. Fengguang Song Department of Computer & Information Science IUPUI

Design of the MIPS Processor

comp 180 Lecture 25 Outline of Lecture The ALU Control Operation & Design The Datapath Control Operation & Design HKUST 1 Computer Science

CENG 3420 Lecture 06: Datapath

RISC Processor Design

The overall datapath for RT, lw,sw beq instrucution

ﻪﺘﻓﺮﺸﻴﭘ ﺮﺗﻮﻴﭙﻣﺎﻛ يرﺎﻤﻌﻣ MIPS يرﺎﻤﻌﻣ data path and ontrol control

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

CSEN 601: Computer System Architecture Summer 2014

Midterm. Sticker winners: if you got >= 50 / 67

CSE 378 Midterm 2/12/10 Sample Solution

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath

Lecture 8: Control COS / ELE 375. Computer Architecture and Organization. Princeton University Fall Prof. David August

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

EECS 151/251A Fall 2017 Digital Design and Integrated Circuits. Instructor: John Wawrzynek and Nicholas Weaver. Lecture 13 EE141

CPU Design Steps. EECC550 - Shaaban

CPE 335 Computer Organization. Basic MIPS Architecture Part I

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

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization

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

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

Single Cycle CPU Design. Mehran Rezaei

ECE260: Fundamentals of Computer Engineering

Lecture 5: The Processor

Chapter 5 Solutions: For More Practice

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

CS Computer Architecture Spring Week 10: Chapter

Informatics 2C Computer Systems Practical 2 Deadline: 18th November 2009, 4:00 PM

Single Cycle Data Path

Computer Organization and Structure

LECTURE 6. Multi-Cycle Datapath and Control

CSE 2021 COMPUTER ORGANIZATION

ECE473 Computer Architecture and Organization. Processor: Combined Datapath

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

ENE 334 Microprocessors

CO Computer Architecture and Programming Languages CAPL. Lecture 18 & 19

Improving Performance: Pipelining

Major CPU Design Steps

CSCI 402: Computer Architectures. Fengguang Song Department of Computer & Information Science IUPUI. Today s Content


CSEE 3827: Fundamentals of Computer Systems

Design of Digital Circuits 2017 Srdjan Capkun Onur Mutlu (Guest starring: Frank K. Gürkaynak and Aanjhan Ranganathan)

The Big Picture: Where are We Now? EEM 486: Computer Architecture. Lecture 3. Designing a Single Cycle Datapath

Computer Organization. Structure of a Computer. Registers. Register Transfer. Register Files. Memories

Transcription:

Inf2C - Computer Systems Lecture 10-11 Processor Design Single Cycle Boris Grot School of Informatics University of Edinburgh

Previous lectures Combinational circuits Combinations of gates (INV, AND, OR, NOR..) Output: function of the input only (memory-less) Sequential circuits Output: function of the input and prev inputs Basic memory element: SR-latch (cross-coupled NORs) Clock: synchronizes the operation of the circuit Operation: current states + inputs go through combinational logic. Next states stored in a register on a rising clock edge. Hardware Finite State Machines (FSMs) Registers for states + comb l logic for transitions & outputs Inf2C Computer Systems - 2017-2018. Boris Grot 2

Lecture 9: Processor design single cycle Motivation: Learn how to design a simple processor Two main parts: Datapath: performs the data operations as commanded by the program instructions Control: controls the datapath, memory and I/O according to the program instructions Using: Combinational and sequential circuits described in previous lectures Inf2C Computer Systems - 2017-2018. Boris Grot 3

Design steps / Lecture outline Step 1: Determine the components required by understanding main processor functions Step 2: Build the datapath Step 3: Build the control Show the execution of a few instructions on the designed machine Inf2C Computer Systems - 2017-2018. Boris Grot 4

Main processor functions Fetch instruction from instruction memory Read the register operands Use the ALU for computation Arithmetic, memory address, branch target address Access data memory for load/store Store the result of computation or loaded data into the destination register Update the Program Counter (PC) Inf2C Computer Systems - 2017-2018. Boris Grot 5

Instruction Fetch: common to all insts 32-bit register Fetch the current instruction from instruction memory 32-bit word Inf2C Computer Systems - 2017-2018. Boris Grot 6

Instruction Fetch: common to all insts Concurrent actions! 32-bit register Increment PC by 4 for next instruction Inf2C Computer Systems - 2017-2018. Boris Grot 7

R-Format Instructions 1. Read two register operands 2. Perform arithmetic/logical operation 3. Write register result A bundle of N wires (N=5 here) Register File Inf2C Computer Systems - 2017-2018. Boris Grot 8

Load/Store Instructions 1. Read register operands 2. Calculate address using 16-bit offset Use ALU, but sign-extend offset 3. Read (for load) or write (for store) the memory 4. Load only: update destination register Inf2C Computer Systems - 2017-2018. Boris Grot 9

Branch Instructions (BEQ, BNE) 1. Read register operands 2. Compare operands Use ALU, subtract and check Zero output 3. Calculate target address Sign-extend the immediate (offset) Shift left 2 places (word align) Add to PC + 4 Already calculated by instruction fetch Inf2C Computer Systems - 2017-2018. Boris Grot 10

Branch Instructions Just re-routes wires Sign-bit wire replicated 16 times Inf2C Computer Systems - 2017-2018. Boris Grot 11

Putting It Together: Simplified Datapath Inf2C Computer Systems - 2017-2018. Boris Grot 12

Simplified Datapath Can t just join wires together à Use multiplexers Inf2C Computer Systems - 2017-2018. Boris Grot 13

Full Datapath Inf2C Computer Systems - 2017-2018. Boris Grot 14

Full Datapath Instruction Fetch Inf2C Computer Systems - 2017-2018. Boris Grot 15

Full Datapath R-type/Load/Store datapath Inf2C Computer Systems - 2017-2018. Boris Grot 16

Full Datapath Branch resolution Inf2C Computer Systems - 2017-2018. Boris Grot 17

How to design the control part For all control signals determine which value selects what operation, input, etc. Make truth table of control signal values for each instruction, or instruction group Convert table to combinational circuit Inf2C Computer Systems - 2017-2018. Boris Grot 18

Designing the Main Control Unit Control signals derived from instruction fields R-type Load/ Store Branch 0 rs rt rd shamt funct 31:26 25:21 20:16 15:11 10:6 5:0 35 or 43 rs rt address 31:26 25:21 20:16 15:0 4 rs rt address 31:26 25:21 20:16 15:0 opcode always read read, except for load write for R-type and load sign-extend and add Inf2C Computer Systems - 2017-2018. Boris Grot 19

Datapath with Control Inf2C Computer Systems - 2017-2018. Boris Grot 20

Datapath and control truth table Instruction RegDst ALUSrc Memto- Reg Reg Write Mem Read Mem Write Branch ALUOp1 ALUOp0 R-format 1 0 0 1 0 0 0 1 0 lw 0 1 1 1 1 0 0 0 0 sw X 1 X 0 0 1 0 0 0 beq X 0 X 0 0 0 1 0 1 Inf2C Computer Systems - 2017-2018. Boris Grot 21 Don t Care

ALU control ALU operation: Data transfers (ld/st) add Branches sub All other determined by funct field, I[5:0] derived from opcode R-type 0 rs rt rd shamt funct 31:26 25:21 20:16 15:11 10:6 5:0 Inf2C Computer Systems - 2017-2018. Boris Grot 22

ALU control ALU control is hierarchical: Main control specifies which of the 3 op types Add, Sub, or based on Funct bits Second level provides actual ALU control signal ALU operation 0000 AND 0001 OR 0010 add 0110 subtract 0111 set-on-less than actual ALU Control signals Inf2C Computer Systems - 2017-2018. Boris Grot 23

R-type instruction execution Inf2C Computer Systems - 2017-2018. Boris Grot 24

lw execution Inf2C Computer Systems - 2017-2018. Boris Grot 25

beq (taken) execution Inf2C Computer Systems - 2017-2018. Boris Grot 26

Don t fall behind! Read the textbook (Chapter 4 in 4/e & 5/e) Multi-cycle datapath (next lecture): on Learn Tutorials next week Inf2C Computer Systems - 2017-2018. Boris Grot 27