ECE 313 Computer Organization FINAL EXAM December 11, Multicycle Processor Design 30 Points

Similar documents
ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.

ECE 313 Computer Organization FINAL EXAM December 13, 2000

ECE 313 Computer Organization FINAL EXAM December 14, This exam is open book and open notes. You have 2 hours.

Processor (multi-cycle)

ECE 313 Computer Organization EXAM 2 November 9, 2001

ALUOut. Registers A. I + D Memory IR. combinatorial block. combinatorial block. combinatorial block MDR

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

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

ENE 334 Microprocessors

Microprogramming. Microprogramming

THE HONG KONG UNIVERSITY OF SCIENCE & TECHNOLOGY Computer Organization (COMP 2611) Spring Semester, 2014 Final Examination

Computer Science 141 Computing Hardware

RISC Design: Multi-Cycle Implementation

RISC Processor Design

ECS 154B Computer Architecture II Spring 2009

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

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

CSE 2021 COMPUTER ORGANIZATION

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

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

Pipelined Processor Design

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

CPE 335. Basic MIPS Architecture Part II

ECE369. Chapter 5 ECE369

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

RISC Architecture: Multi-Cycle Implementation

Initial Representation Finite State Diagram Microprogram. Sequencing Control Explicit Next State Microprogram counter

Processor: Multi- Cycle Datapath & Control

RISC Architecture: Multi-Cycle Implementation

Systems Architecture I

Pipelined Processor Design

Initial Representation Finite State Diagram. Logic Representation Logic Equations

CC 311- Computer Architecture. The Processor - Control

COMP2611: Computer Organization. The Pipelined Processor

CPE 335 Computer Organization. Basic MIPS Architecture Part I

CS152 Computer Architecture and Engineering Lecture 13: Microprogramming and Exceptions. Review of a Multiple Cycle Implementation

Points available Your marks Total 100

CSE 2021 COMPUTER ORGANIZATION

Digital Design & Computer Architecture (E85) D. Money Harris Fall 2007

Lecture 10 Multi-Cycle Implementation

Processor (I) - datapath & control. Hwansoo Han

COMP303 Computer Architecture Lecture 9. Single Cycle Control

Multiple Cycle Data Path

CENG 3420 Lecture 06: Datapath

Major CPU Design Steps

Chapter 5 Solutions: For More Practice

ECE 3056: Architecture, Concurrency and Energy of Computation. Single and Multi-Cycle Datapaths: Practice Problems

CSE 2021: Computer Organization Fall 2010 Solution to Assignment # 3: Multicycle Implementation

Inf2C - Computer Systems Lecture 12 Processor Design Multi-Cycle

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

Multicycle conclusion

CS3350B Computer Architecture Quiz 3 March 15, 2018

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

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

CS/COE0447: Computer Organization

CS/COE0447: Computer Organization

Topic #6. Processor Design

CPE 335 Computer Organization. Basic MIPS Pipelining Part I

CS 351 Exam 2, Fall 2012

Lets Build a Processor

CS232 Final Exam May 5, 2001

Multicycle Approach. Designing MIPS Processor

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

4. What is the average CPI of a 1.4 GHz machine that executes 12.5 million instructions in 12 seconds?

Lecture 16: Pipeline Controls. Spring 2018 Jason Tang

Perfect Student CS 343 Final Exam May 19, 2011 Student ID: 9999 Exam ID: 9636 Instructions Use pencil, if you have one. For multiple choice

CS 351 Exam 2 Mon. 11/2/2015

Systems Architecture

The Processor: Datapath & Control

Chapter 5: The Processor: Datapath and Control

LECTURE 6. Multi-Cycle Datapath and Control

Lecture 10: Simple Data Path

Mapping Control to Hardware

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

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

ECE468 Computer Organization and Architecture. Designing a Multiple Cycle Controller

Computer and Information Sciences College / Computer Science Department Enhancing Performance with Pipelining

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

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

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

ECE Exam I - Solutions February 19 th, :00 pm 4:25pm

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

ECE232: Hardware Organization and Design

LECTURE 10. Pipelining: Advanced ILP

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

ECE 313 Computer Organization EXAM 2 November 11, 2000

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

CSEN 601: Computer System Architecture Summer 2014

Very short answer questions. You must use 10 or fewer words. "True" and "False" are considered very short answers.

Very short answer questions. "True" and "False" are considered short answers.

CS2214 COMPUTER ARCHITECTURE & ORGANIZATION SPRING 2014

Outline. A pipelined datapath Pipelined control Data hazards and forwarding Data hazards and stalls Branch (control) hazards Exception

Single-Cycle Examples, Multi-Cycle Introduction

Winter 2002 FINAL EXAMINATION

Design of the MIPS Processor

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

Computer Organization and Structure

EE 457 Unit 6a. Basic Pipelining Techniques

are Softw Instruction Set Architecture Microarchitecture are rdw

Winter 2006 FINAL EXAMINATION Auxiliary Gymnasium Tuesday, April 18 7:00pm to 10:00pm

Transcription:

This exam is open book and open notes. Credit for problems requiring calculation will be given only if you show your work. 1. Multicycle Processor Design 0 Points In our discussion of exceptions in the multicycle processor implementation, we showed how the Exception Program Counter (EPC) is written, but not how it is read. This is typically done using an instruction which moves the EPC to one of the 2 general-purpose registers. An exception handler can then use the EPC value to identify the instruction where the exception occurred, and (if the exception can be handled), where the program should resume after exception handling is completed. To transfer the EPC to a register, we propose a new MIPS instruction called mfepc (move from EPC), which stores the EPC into the register given by the rt field. The assembly language format, register transfer, and binary instruction format of the mfepc instruction are shown below: mfepc rt Reg[rt] <- EPC 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits 16 0 rt 14 0 0 (a) Modify the attached multicycle datapath schematic and controller state diagram to implement the mfepc instruction as described above. (b) If an exception handler can successfully deal with an exception (e.g., by emulating an unimplemented instruction), it can continue execution of the interrupted program starting with the instruction after the instruction that caused the exception. Assuming that the mfepc is used to move the EPC to register $t0, write a sequence of MIPS assembly language instructions that will do this. Page 1 of 6

Start 0 Instruction Fetch MemRead ALSrcA = 0 IorD = 0 IRWrite ALSrcB = 01 ALOp = 00 PCSource = 00 Instruction decode / register fetch 1 ALSrcA = 0 ALSrcB = 11 ALOp = 00 Memory address computation 2 ALSrcA = 1 ALSrcB = 10 ALOp = 00 Branch Execution Completion 6 8 9 ALSrcA = 1 ALSrcB = 00 ALOp = 10 ALSrcA = 1 ALSrcB = 00 ALOp = 01 Cond PCSource = 01 (OP = JMP ) Jump Completion PCSource = 10 (OP = other) 4 (OP = LW ) MemRead IorD = 1 Memory access RegWrite MemToReg=1 RegDst = 0 (OP = ( SW ) Writeback step Memory access 5 7 MemWrite IorD = 1 RegDst = 1 RegWrite MemtoReg = 0 No Overflow Overflow 11 IntCause = 1 CauseWrite ALSrcA = 0 ALSrcB = 01 ALOp = 01 E PCSouce = 11 10 IntCause = 0 CauseWrite ALSrcA = 0 ALSrcB = 01 ALOp = 01 E PCSource = 11 0xC0000000 PCWr* PC IorD 0 M 1 X MemWrite ADDR Memory RD WD MemRead I R M D R Instruction I 2 1 M 0 X MemtoReg immediate rs rt 5 5 RN1 RN2 WN Registers RD1 WD RegWrite 16 E X T N D 2 5 rd 0 1 MX 5 RD2 <<2 jmpaddr I[25:0] RegDst A B 4 28 2 <<2 CONCAT ALSrcA Operation 0 M 1 X 0 1 M 2 X ALSrcB AL 0 1 Zero Overflow 0 M 1 X AL OT C A S E IntCause. CauseWrite 2 M 1 X 0 PCSource E P C E Page 2 of 6

2. Pipelined Processor Design 25 Points The pipelined processor implementation that was described in Chapter 6 does implement the j (jump) instruction. (a) (b) Modify the pipelined processor datapath and control to implement the j (jump) instruction. Show any changes to the datapath on the diagram on the next page, and show all control signals (including any that you add) in the table below. You may find it helpful to review the control table in Fig. 6.28 on p. 469 of the text. HINT: most of the instruction can be implemented in the ID stage. Will the jump instruction in your design be susceptible to any hazards? Why or whey not? Instr. jmp Reg Dst EX Stage Control Lines AL Op0 AL Op1 AL Src Branch MEM Stage Control Lines Mem Mem Read Write WB Stage Control Lines Reg Memto Write Reg Page of 6

Page 4 of 6

. Pipelined Design Forwarding, Data Hazards, and Stalls 25 Points Consider the following sequence of MIPS instructions and assume that we are using the pipelined design with forwarding shown in Fig. 6.40 of the book (p. 484). add $1, $2, $ sw $, 100($1) lw $4, 200($) sub $5, $5, $4 (a) Circle any data dependencies which exist in these instructions for the given pipeline in the code listed above. (b) Fill in the multi-cycle pipeline diagram below to show how the given instructions flow through the pipeline. You should label each instruction, shade stages to show which parts of each stage are active during each cycle, show any forwarding connections that are needed, and clearly mark stalled instructions. (c) Assuming that the pipeline is initially empty, how many clock cycles does it take for this sequence of instructions to execute? CC 1 CC 2 CC CC 4 CC 5 CC 6 CC 7 CC 8 CC 9 CC 10 CC 11 Page 5 of 6

4. Short Answers 20 Points Please answer the following questions concisely and briefly. (a) What are the advantages of a fixed-length instruction format compared to a variablelength instruction format? (b) What is the purpose of denormalized numbers in the IEEE floating-point representation? (c) Why is microcode still used in the Pentium 4 and other x86 processor designs? (d) What is the key advantage of performing out-of-order execution in a processor implementation? (e) What happens on a cache miss? Page 6 of 6