PART I: Adding Instructions to the Datapath. (2 nd Edition):

Similar documents
The extra single-cycle adders

Review Multicycle: What is Happening. Controlling The Multicycle Design

The single-cycle design from last time

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

CS 251, Winter 2019, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark

CS 251, Winter 2018, Assignment % of course mark

Instruction fetch. MemRead. IRWrite ALUSrcB = 01. ALUOp = 00. PCWrite. PCSource = 00. ALUSrcB = 00. R-type completion

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.

The multicycle datapath. Lecture 10 (Wed 10/15/2008) Finite-state machine for the control unit. Implementing the FSM

Review: Computer Organization

Computer Architecture Chapter 5. Fall 2005 Department of Computer Science Kent State University

EEC 483 Computer Organization

Prof. Kozyrakis. 1. (10 points) Consider the following fragment of Java code:

Quiz #1 EEC 483, Spring 2019

Exceptions and interrupts

EEC 483 Computer Organization

1048: Computer Organization

Review. A single-cycle MIPS processor

1048: Computer Organization

Lab 8 (All Sections) Prelab: ALU and ALU Control

Chapter 6 Enhancing Performance with. Pipelining. Pipelining. Pipelined vs. Single-Cycle Instruction Execution: the Plan. Pipelining: Keep in Mind

Pipelining. Chapter 4

Chapter 6: Pipelining

EXAMINATIONS 2003 END-YEAR COMP 203. Computer Organisation

4.13 Advanced Topic: An Introduction to Digital Design Using a Hardware Design Language 345.e1

1048: Computer Organization

Winter 2013 MIDTERM TEST #2 Wednesday, March 20 7:00pm to 8:15pm. Please do not write your U of C ID number on this cover page.

CSE Introduction to Computer Architecture Chapter 5 The Processor: Datapath & Control

TDT4255 Friday the 21st of October. Real world examples of pipelining? How does pipelining influence instruction

Comp 303 Computer Architecture A Pipelined Datapath Control. Lecture 13

Solutions for Chapter 6 Exercises

PS Midterm 2. Pipelining

Lecture 7. Building A Simple Processor

Hardware Design Tips. Outline

EXAMINATIONS 2010 END OF YEAR NWEN 242 COMPUTER ORGANIZATION

Review. How to represent real numbers

Enhanced Performance with Pipelining

What do we have so far? Multi-Cycle Datapath

Computer Architecture. Lecture 6: Pipelining

Lecture 9: Microcontrolled Multi-Cycle Implementations

Chapter 6: Pipelining

ECE 313 Computer Organization EXAM 2 November 9, 2001

Computer Architecture

Computer Architecture

4.13. An Introduction to Digital Design Using a Hardware Design Language to Describe and Model a Pipeline and More Pipelining Illustrations

Animating the Datapath. Animating the Datapath: R-type Instruction. Animating the Datapath: Load Instruction. MIPS Datapath I: Single-Cycle

Overview of Pipelining

Chapter 3 & Appendix C Pipelining Part A: Basic and Intermediate Concepts

Lecture 6: Microprogrammed Multi Cycle Implementation. James C. Hoe Department of ECE Carnegie Mellon University

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

MIPS Architecture. Fibonacci (C) Fibonacci (Assembly) Another Example: MIPS. Example: subset of MIPS processor architecture

Processor (multi-cycle)

For More Practice FMP

Multi-cycle Approach. Single cycle CPU. Multi-cycle CPU. Requires state elements to hold intermediate values. one clock cycle or instruction

Lecture 13: Exceptions and Interrupts

Lecture 10: Pipelined Implementations

EEC 483 Computer Organization. Branch (Control) Hazards

ECE232: Hardware Organization and Design

POWER-OF-2 BOUNDARIES

PIPELINING. Pipelining: Natural Phenomenon. Pipelining. Pipelining Lessons

MIPS Architecture. An Example: MIPS. From the Harris/Weste book Based on the MIPS-like processor from the Hennessy/Patterson book

Computer Architecture Lecture 6: Multi-cycle Microarchitectures. Prof. Onur Mutlu Carnegie Mellon University Spring 2012, 2/6/2012

Multiple Cycle Data Path

CSSE232 Computer Architecture I. Mul5cycle Datapath

Instruction Pipelining is the use of pipelining to allow more than one instruction to be in some stage of execution at the same time.

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

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

CSE 141 Computer Architecture Summer Session I, Lectures 10 Advanced Topics, Memory Hierarchy and Cache. Pramod V. Argade

Computer Science 141 Computing Hardware

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

Chapter 5 Solutions: For More Practice

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

COMP303 - Computer Architecture Lecture 10. Multi-Cycle Design & Exceptions

EE457. Note: Parts of the solutions are extracted from the solutions manual accompanying the text book.

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

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

CSE 141 Computer Architecture Spring Lectures 11 Exceptions and Introduction to Pipelining. Announcements

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

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

Pipelined Datapath. One register file is enough

CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014

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

RISC Design: Multi-Cycle Implementation

USER S GUIDE: SPRINT RELAY CUSTOMER PROFILE

Multicycle conclusion

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

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

10.2 Solving Quadratic Equations by Completing the Square

Fundamentals of Computer Systems

Computer Science and Engineering 331. Midterm Examination #1. Fall Name: Solutions S.S.#:

Laboratory 5 Processor Datapath

SI232 Set #20: Laundry, Co-dependency, and other Hazards of Modern (Architecture) Life. Chapter 6 ADMIN. Reading for Chapter 6: 6.1,

CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014

CC 311- Computer Architecture. The Processor - Control

ECE232: Hardware Organization and Design

Inf2C - Computer Systems Lecture Processor Design Single Cycle

Design of the MIPS Processor

Lecture 5: The Processor

Processor: Multi- Cycle Datapath & Control

Transcription:

EE57 Instrctor: G. Pvvada ===================================================================== Homework #5b De: check on the blackboard ===================================================================== All stdents need to have to (a) sec. 5. from the st edition as well as either (b.) sec. 5.5 of the rd edition or (b.) sec. 5. of the nd edition. We cover mlticycle implementation from the first edition as well as the third edition. The second and the third editions are essentially the same. Lab # and qestions at the end of lab # are based on the st edition. However this homework (HW#5b) is based on the nd / rd edition. In the nd / rd edition, the athors have introdced new temporary s A, B, ot, DR ( Data Register). They have removed the TAR- GET temporary of the st edition as the new ot served the prpose of the TARGET. Becase of the presence of the new temporary s, nlike in st edition design, we do NOT have to KEEP PERFORING the same operation over several clocks. For eample, the comptes the memory address in state and drops it off in the ot. In states and 5 (dring memory ), the does NOT need to keep compting the memory address as it was "safely" held in the ot. Yo notice that the control signals of state are NOT repeated in states and 5 of fig. 5.8 in rd edition (of fig. 5. in nd edition). ===================================================================== Eercises for this homework are provided from both nd edition and rd edition of tetbook. The qestions are reprodced below. Please do eercise 5.5 from the nd edition and eercises 5., 5., 5., 5.5, 5.7 and 5.8 from rd edition. Please se photocopies of the tetbook figres to answer design qestions by modifying the figres as necessary. Yo can either photocopy the necessary figres or download the figres of second edition from the web-site http://www-classes.sc.ed/engr/ee-s/57/cod/. The two figres needed from the nd edition (figres 5. and 5.) are posted at the above location as (lti_cycle_dp.pdf and lti_cycle_sd.pdf ). They are password protected and the password is given on the BB). The figres are also given at the end of this homework. The corresponding figres in the rd edition are figres 5.8 and 5.7 (COD_rd_Figre_5.8.jpg and COD_rd_Figre_5.7.jpg posted above). PART I: Adding s to the Datapath ( nd Edition): 5.5 [5] <ß5.> We wish to add the instrction addi (add immediate) to the mlticycle path described in this chapter. Add any necessary paths and control signals to the mlticycle path of Figre 5. on page 8 in nd edition (fig. 5.8 in rd edition) and show the necessary modifications to the finite state machine of Figre 5. on page 96 in nd edition (fig. 5.8 on page 9 in rd edition). Yo may find it helpfl to eamine the eection steps shown on pages 85 throgh 88 in nd edition (pages 5 throgh 9 in rd edition) and consider the steps that ee57_hw5b.fm /8/

will need to be performed to eecte the new instrction. Yo can photocopy eisting figres to make it easier to show yor modifications. Try to find a soltion that minimizes the nmber of clock cycles reqired for the new instrction. Please eplicitly state how many cycles it takes to eecte the new instrction on yor modified path and finite state machine. ( rd Edition): 5. [5] <ß5.5> This qestion is similar to previos eercise (Eercise 5.5 of the nd edition) ecept that we wish to add the instrction jal (jmp and link), which is described in Chapter. 5. [5] <ß5.5> This qestion is similar to Eercise 5. ecept that we wish to add a new instrction, wai (where am I), which pts the instrction s location (the vale of the PC when the instrction was fetched) into a specified by the rt field of the machine langage instrction. Assme that the path has not changed and that, as sal, the clock cycle is too short to allow an operation and a file in a single clock cycle if one of them is dependent on the reslts of the other. 5. [5] <ß5.5> This qestion is similar to Eercise 5. ecept that we wish to add a new instrction, jm (jmp memory). Its instrction format is similar to that of load word ecept that the rt field is not sed becase the loaded from memory is pt in the PC instead of the target. 5.5 [] <ß5.5> This qestion is similar to Eercise 5. ecept that we wish to add spport for for-operand arithmetic instrctions sch as add, which adds three nmbers together instead of two: add $t5, $t6, $t7, $t8 # $t5 = $t6 + $t7 + $t8 Assme that the instrction set is modified by introdcing a new instrction format similar to the R-format ecept that bits [-] are sed to specify the additional (we still se rs, rt, and rd) and of corse a new opcode is sed. Yor soltion shold not rely on adding additional read ports to the file, nor shold a new be sed. PART II: (rd Edition): PART II CANCELLED 5.7 [5] <ß5.5> Describe the effect that a single stck-at- falt (i.e., regardless of what it shold be, the signal is always ) wold have on the mltipleors in the mltiple-cycle path in Figre 5.8 on page. Which instrctions, if any, wold still work? Consider each of the following falts separately: RegDst =, emtoreg =, IorD =, SrcA =. 5.8 [5] <ß5.5> This eercise is similar to Eercise 5.7, bt this time consider stck-at- falts (the signal is always ). ee57_hw5b.fm /8/

address comptation SrcA = SrcB = Op = Start fetch em SrcA = IorD = IR SrcB = Op = PCSorce = 6 (Op = 'LW') or (Op = 'SW') Eection SrcA = SrcB = Op= 8 (Op = R-type) Branch SrcA = SrcB = Op = Cond PCSorce = decode/ fetch (Op = 'BEQ') 9 SrcA = SrcB = Op = (Op = 'J') Jmp PCSorce = (Op = 'LW') (Op = 'SW') 5 7 R-type em IorD = em IorD = RegDst = emtoreg = -back step RegDst= emtoreg=

PC Address emdata Cond IorD Otpts em em Control emtoreg IR Op [5 ] [5 ] [-6] [5 ] [ 6] [5 ] [5 ] [5 ] PCSorce Op SrcB SrcA RegDst Registers 6 Sign etend [5 ] A B 6 8 PC [-8] Zero reslt control Jmp address [-] Ot

address comptation SrcA = SrcB = Op = Start fetch em SrcA = IorD = IR SrcB = Op = PCSorce = 6 (Op = 'LW') or (Op = 'SW') Eection SrcA = SrcB = Op= 8 (Op = R-type) Branch SrcA = SrcB = Op = Cond PCSorce = decode/ fetch (Op = 'BEQ') 9 SrcA = SrcB = Op = (Op = 'J') Jmp PCSorce = (Op = 'LW') (Op = 'SW') 5 7 R-type em IorD = em IorD = RegDst = emtoreg = -back step RegDst= emtoreg=

address comptation SrcA = SrcB = Op = Start fetch em SrcA = IorD = IR SrcB = Op = PCSorce = 6 (Op = 'LW') or (Op = 'SW') Eection SrcA = SrcB = Op= 8 (Op = R-type) Branch SrcA = SrcB = Op = Cond PCSorce = decode/ fetch (Op = 'BEQ') 9 SrcA = SrcB = Op = (Op = 'J') Jmp PCSorce = (Op = 'LW') (Op = 'SW') 5 7 R-type em IorD = em IorD = RegDst = emtoreg = -back step RegDst= emtoreg=

PC Address emdata Cond IorD Otpts em em Control emtoreg IR Op [5 ] [5 ] [-6] [5 ] [ 6] [5 ] [5 ] [5 ] PCSorce Op SrcB SrcA RegDst Registers 6 Sign etend [5 ] A B 6 8 PC [-8] Zero reslt control Jmp address [-] Ot

address comptation SrcA = SrcB = Op = Start fetch em SrcA = IorD = IR SrcB = Op = PCSorce = 6 (Op = 'LW') or (Op = 'SW') Eection SrcA = SrcB = Op= 8 (Op = R-type) Branch SrcA = SrcB = Op = Cond PCSorce = decode/ fetch (Op = 'BEQ') 9 SrcA = SrcB = Op = (Op = 'J') Jmp PCSorce = (Op = 'LW') (Op = 'SW') 5 7 R-type em IorD = em IorD = RegDst = emtoreg = -back step RegDst= emtoreg=

PC Address emdata Cond IorD Otpts em em Control emtoreg IR Op [5 ] [5 ] [-6] [5 ] [ 6] [5 ] [5 ] [5 ] PCSorce Op SrcB SrcA RegDst Registers 6 Sign etend [5 ] A B 6 8 PC [-8] Zero reslt control Jmp address [-] Ot

address comptation SrcA = SrcB = Op = Start fetch em SrcA = IorD = IR SrcB = Op = PCSorce = 6 (Op = 'LW') or (Op = 'SW') Eection SrcA = SrcB = Op= 8 (Op = R-type) Branch SrcA = SrcB = Op = Cond PCSorce = decode/ fetch (Op = 'BEQ') 9 SrcA = SrcB = Op = (Op = 'J') Jmp PCSorce = (Op = 'LW') (Op = 'SW') 5 7 R-type em IorD = em IorD = RegDst = emtoreg = -back step RegDst= emtoreg=