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

Similar documents
CPE 335 Computer Organization. Basic MIPS Architecture Part I

EEC 483 Computer Organization

ECE473 Computer Architecture and Organization. Processor: Combined Datapath

Systems Architecture

Processor Design CSCE Instructor: Saraju P. Mohanty, Ph. D. NOTE: The figures, text etc included in slides are borrowed

Processor (I) - datapath & control. Hwansoo Han

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W9-W

ECE232: Hardware Organization and Design

Inf2C - Computer Systems Lecture Processor Design Single Cycle

CC 311- Computer Architecture. The Processor - Control

Lecture 5: The Processor

LECTURE 5. Single-Cycle Datapath and Control

Topic #6. Processor Design

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

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

Review: Abstract Implementation View

Systems Architecture I

CENG 3420 Lecture 06: Datapath

Multiple Cycle Data Path

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

ECE260: Fundamentals of Computer Engineering

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

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

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

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

COMP303 Computer Architecture Lecture 9. Single Cycle Control

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

CPE 335. Basic MIPS Architecture Part II

The MIPS Processor Datapath

Chapter 4. The Processor

ECE 313 Computer Organization EXAM 2 November 9, 2001

ECE 313 Computer Organization Name SOLUTION EXAM 2 November 3, Floating Point 20 Points

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

The Processor: Datapath & Control

The overall datapath for RT, lw,sw beq instrucution

Chapter 5: The Processor: Datapath and Control

LECTURE 6. Multi-Cycle Datapath and Control

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

CSE140: Components and Design Techniques for Digital Systems

Merging datapaths: (add,lw, sw)

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

The extra single-cycle adders

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

How to design a controller to produce signals to control the datapath

Chapter 4. The Processor

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

Review. A single-cycle MIPS processor

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

Single-Cycle Examples, Multi-Cycle Introduction

CS 251, Spring 2018, Assignment 3.0 3% of course mark

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

Computer Science 141 Computing Hardware

Processor: Multi- Cycle Datapath & Control

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

Introduction. Datapath Basics

CPU Organization (Design)

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

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

1048: Computer Organization

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13

Chapter 4. The Processor Designing the datapath

Computer Organization & Design The Hardware/Software Interface Chapter 5 The processor : Datapath and control

RISC Processor Design

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

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

Register Transfer Level (RTL) Design

Single Cycle CPU Design. Mehran Rezaei

CSE 2021 Computer Organization. Hugh Chesser, CSEB 1012U W12-M

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

CSE 378 Midterm 2/12/10 Sample Solution

The final datapath. M u x. Add. 4 Add. Shift left 2. PCSrc. RegWrite. MemToR. MemWrite. Read data 1 I [25-21] Instruction. Read. register 1 Read.

Laboratory 5 Processor Datapath

Design of the MIPS Processor

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

CISC 662 Graduate Computer Architecture. Lecture 4 - ISA

Pipelined Datapath. Reading. Sections Practice Problems: 1, 3, 8, 12

CSE 2021 COMPUTER ORGANIZATION

Pipelined Datapath. Reading. Sections Practice Problems: 1, 3, 8, 12 (2) Lecture notes from MKP, H. H. Lee and S.

Review. N-bit adder-subtractor done using N 1- bit adders with XOR gates on input. Lecture #19 Designing a Single-Cycle CPU

CSEE 3827: Fundamentals of Computer Systems

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

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller

CS152 Computer Architecture and Engineering Lecture 10: Designing a Single Cycle Control. Recap: The MIPS Instruction Formats

CS359: Computer Architecture. The Processor (A) Yanyan Shen Department of Computer Science and Engineering

EECE 417 Computer Systems Architecture

Fundamentals of Computer Systems

Major CPU Design Steps

Data paths for MIPS instructions

CpE242 Computer Architecture and Engineering Designing a Single Cycle Datapath

RISC Design: Multi-Cycle Implementation

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

CS3350B Computer Architecture Winter Lecture 5.7: Single-Cycle CPU: Datapath Control (Part 2)

Learning Outcomes. Spiral 3-3. Sorting: Software Implementation REVIEW

ENE 334 Microprocessors

Quiz #1 EEC 483, Spring 2019

Note- E~ S. \3 \S U\e. ~ ~s ~. 4. \\ o~ (fw' \i<.t. (~e., 3\0)

CSEN 601: Computer System Architecture Summer 2014

CS3350B Computer Architecture

CSE 2021 COMPUTER ORGANIZATION

Transcription:

Outline of Lecture The Control Operation & Design The Datapath Control Operation & Design HKST 1 Computer Science

Control After the design of partial single IPS datapath, we need to add the control unit that controls the whole operation of the datapath (generatse appropriate signals for the operation of the datapath). From the previous chapter - when we designed the - these are the control signals that we came up with: Control lines Function 0 00 AND 0 01 OR 0 10 ADD 1 10 SB 1 11 SLT For load and store, we need to calculate the memory address by addition. For R-type instructions, the needs to perform one of five operations (Subtract, add, AND, OR, SLT) - depending on the value of the 6-bit funct filed. HKST 2 Computer Science

Control For branch subtraction. equal, the must perform a By using the function field (6 bits for IPS), the table above can be expanded to cover a wider range of instructions. Instruction opcode Op Instruction operation Function code Desired action control input LW 00 load word add 010 SW 00 store word add 010 Branch equal 01 branch equal subtract 110 R-type 10 add 100000 add 010 R-type 10 subtract 100010 subtract 110 R-type 10 AND 100100 and 000 R-type 10 OR 100101 or 001 R-type 10 SLT 101010 slt 111 HKST 3 Computer Science

In order to design the logic for this control unit, we create a truth table. The input of the truth table is a 2-bit Op and a 6-bit Function code, and the output is a 3-bit control signals Op Function code Operation Op1 Op2 F5 F4 F3 F2 F1 F0 0 0 010 1 110 1 0 0 0 0 010 1 0 0 1 0 110 1 0 1 0 1 001 1 1 0 1 0 111 HKST 4 Computer Science

sing the above truth table, we can design the control unit: Op Control Block Op0 Op1 Operation2 F3 F2 Operation1 Operation F(5-0) F1 Operation0 F0 HKST 5 Computer Science

Adding the control unit to the Datapath 4 Add Add PC address Instruction [31-0] Shift left 2 PCSrc Instruction memory [15-11] [25-21] [20-16] RegDst register 1 register 2 register data Reg Registers data 1 data 2 Src Zero address address Data memory data em emtoreg data [15-0] 16 sign extend 32 [5-0] control Op em HKST 6 Computer Science

The function of each of the control signals in the datapath is given in the following table: Signal name Effect when deasserted Effect when asserted em None Data memory contents at the read address are put on read data output em None Data memory contents at address given by write address is replaced by value on write data input Src The second operand comes from the second register file output RegDst The register destination number for the write register comes from the rt field The second operand is the sign-extended lower 16-bits of the instruction The register destination number for the write register comes from the rd field Reg None The register on the write register input is written into with the value on the write data input PCSrc emtoreg The PC is replaced by the output of the adder that computes the value of PC+4 The Value fed to the register write data input comes from the The PC is replaced by the output of the adder that computes the branch target The value fed to the register write data input comes from the data memory The control signals can be set by the datapath control unit based only on the opcode field of the instruction. HKST 7 Computer Science

The only exception is the PCSrc control line. It should be set if the instruction is a branch on equal and the Zero output of the is true. To generate the PRSrc signal, we will AND toegther a signal from the control unit, called branch, with the Zero signal out of the. The Whole Datapath including all the control signals will be as follows: HKST 8 Computer Science

4 Add Add PC address Instruction [31-0] [31-26] Shift left 2 PCSrc Instruction memory Control [15-11] [25-21] [20-16] RegDst register 1 register 2 register data Reg Registers data 1 data 2 Src Zero address address Data memory data em data emtoreg [15-0] 16 sign extend 32 [5-0] control Op em HKST 9 Computer Science

The logic circuits for the datapath control unit. The setting of the control lines is completely determined by the opcode fields of the instruction. Instructio n Reg Dst Src emto Reg Reg em em Branch Op1 Op2 R-format 1 0 0 1 0 0 0 1 0 lw 0 1 1 1 1 0 0 0 0 sw 1 0 0 1 0 0 0 beq 0 0 0 0 1 0 1 The input to the datapath control unit: Name Opcode in decimal Opcode in binary Op5 Op4 Op3 Op2 Op1 Op0 R-format 0 0 0 0 0 0 0 lw 35 1 0 0 0 1 1 sw 43 1 0 1 0 1 1 beq 4 0 0 0 1 0 0 HKST 10 Computer Science

Truth Table of the Datapath Control nit R-format lw sw beq Op5 0 1 1 0 Op4 0 0 0 0 Inputs Op3 0 0 1 0 Op2 0 0 0 1 Op1 0 1 1 0 Op0 0 1 1 0 RegDst 1 0 Src 0 1 1 0 emtoreg 0 1 Outputs Reg 1 1 0 0 em 0 1 0 0 em 0 0 1 0 Branch 0 0 0 1 Op1 1 0 0 0 Op2 0 0 0 1 HKST 11 Computer Science

Implementation We can easily implement the above truth table using simple gates. If we used all possible instructions, then a PLA would be more appropriate. Inputs Op5 Op4 Op3 Op2 Op1 Op0 Outputs R-foramt lw sw beq RegDst Src emtoreg Reg em em Branch Op1 Op0 HKST 12 Computer Science

Further ing Chapter 5 & Appendix B. David A. Patterson and John L. Hennessy. Computer Organization & Design: The Hardware / Software Interface. organ Kaufman Publishers, 1998 (page 350-370). HKST 13 Computer Science