Comprehensive Exams COMPUTER ARCHITECTURE. Spring April 3, 2006

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

The University of Michigan - Department of EECS EECS 370 Introduction to Computer Architecture Midterm Exam 2 solutions April 5, 2011

CS 230 Practice Final Exam & Actual Take-home Question. Part I: Assembly and Machine Languages (22 pts)

ENGN 2910A Homework 03 (140 points) Due Date: Oct 3rd 2013

Final Exam Fall 2007

CENG 3531 Computer Architecture Spring a. T / F A processor can have different CPIs for different programs.

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

Structure of Computer Systems

ECE 2300 Digital Logic & Computer Organization. Caches

EXAM #1. CS 2410 Graduate Computer Architecture. Spring 2016, MW 11:00 AM 12:15 PM

Computer Architecture CS372 Exam 3

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

CS150 Fall 2012 Solutions to Homework 6

CS2100 Computer Organisation Tutorial #10: Pipelining Answers to Selected Questions

c. What are the machine cycle times (in nanoseconds) of the non-pipelined and the pipelined implementations?

LECTURE 10. Pipelining: Advanced ILP

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.

These actions may use different parts of the CPU. Pipelining is when the parts run simultaneously on different instructions.

CS232 Final Exam May 5, 2001

CMSC411 Fall 2013 Midterm 1

Machine Organization & Assembly Language

Computer System Architecture Midterm Examination Spring 2002

The University of Alabama in Huntsville Electrical & Computer Engineering Department CPE Test II November 14, 2000

2. [3 marks] Show your work in the computation for the following questions involving CPI and performance.

Final Exam Fall 2008

SOLUTION. Midterm #1 February 26th, 2018 Professor Krste Asanovic Name:

Pipelining. CSC Friday, November 6, 2015

Chapter 4. The Processor

ECE 313 Computer Organization FINAL EXAM December 13, 2000

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

3/12/2014. Single Cycle (Review) CSE 2021: Computer Organization. Single Cycle with Jump. Multi-Cycle Implementation. Why Multi-Cycle?

Chapter 4. The Processor

data block 0, word 0 block 0, word 1 block 1, word 0 block 1, word 1 block 2, word 0 block 2, word 1 block 3, word 0 block 3, word 1 Word index cache

CS 251, Winter 2019, Assignment % of course mark

Please state clearly any assumptions you make in solving the following problems.

Machine Organization & Assembly Language

CS 251, Winter 2018, Assignment % of course mark

CS3350B Computer Architecture Winter 2015

CS/CoE 1541 Mid Term Exam (Fall 2018).

CS433 Midterm. Prof Josep Torrellas. October 16, Time: 1 hour + 15 minutes

CS252 Graduate Computer Architecture Midterm 1 Solutions

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

Memory Hierarchies &

The Pipelined MIPS Processor

ELE 375 / COS 471 Final Exam Fall, 2001 Prof. Martonosi

EE 457 Midterm Summer 14 Redekopp Name: Closed Book / 105 minutes No CALCULATORS Score: / 100

Computer System Architecture Final Examination Spring 2002

Computer Organization and Structure

Hardware Design I Chap. 10 Design of microprocessor

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

COMPUTER ORGANIZATION AND DESIGN

Computer Architecture V Fall Practice Exam Questions

LECTURE 3: THE PROCESSOR

ECE 154A Introduction to. Fall 2012

Instruction Pipelining

CS/CoE 1541 Exam 1 (Spring 2019).

Instruction Pipelining

CS161 Design and Architecture of Computer Systems. Cache $$$$$

EE 457 Midterm Summer 14 Redekopp Name: Closed Book / 105 minutes No CALCULATORS Score: / 100

Instruction Level Parallelism. Appendix C and Chapter 3, HP5e

Prerequisite Quiz January 23, 2007 CS252 Computer Architecture and Engineering

Final Exam Spring 2017

Chapter 4. The Processor

Basic Instruction Timings. Pipelining 1. How long would it take to execute the following sequence of instructions?

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

CSEE W3827 Fundamentals of Computer Systems Homework Assignment 5 Solutions

ICS 51: Introduction to Computer Organization

The Processor Pipeline. Chapter 4, Patterson and Hennessy, 4ed. Section 5.3, 5.4: J P Hayes.

Good luck and have fun!

Computer Architecture. Lecture 6.1: Fundamentals of

MIPS Pipelining. Computer Organization Architectures for Embedded Computing. Wednesday 8 October 14

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

CS232 Final Exam May 5, 2001

ECE260: Fundamentals of Computer Engineering

Caches and Memory. Anne Bracy CS 3410 Computer Science Cornell University. See P&H Chapter: , 5.8, 5.10, 5.13, 5.15, 5.17

cs470 - Computer Architecture 1 Spring 2002 Final Exam open books, open notes

CSCE 212: FINAL EXAM Spring 2009

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

CS252 Prerequisite Quiz. Solutions Fall 2007

Computer Architecture EE 4720 Final Examination

ECE 341 Final Exam Solution

6.004 Tutorial Problems L14 Cache Implementation

Computer Architecture EE 4720 Practice Final Examination

Pipelining: Overview. CPSC 252 Computer Organization Ellen Walker, Hiram College

Question 1: (20 points) For this question, refer to the following pipeline architecture.

This Set. Scheduling and Dynamic Execution Definitions From various parts of Chapter 4. Description of Three Dynamic Scheduling Methods

COMPUTER ORGANIZATION AND DESIGN

EECS 470 Midterm Exam Winter 2008 answers

LSU EE 4720 Homework 5 Solution Due: 20 March 2017

Computer Architecture EE 4720 Final Examination

1. Truthiness /8. 2. Branch prediction /5. 3. Choices, choices /6. 5. Pipeline diagrams / Multi-cycle datapath performance /11

CS3350B Computer Architecture Quiz 3 March 15, 2018

Static, multiple-issue (superscaler) pipelines

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

Department of Computer and IT Engineering University of Kurdistan. Computer Architecture Pipelining. By: Dr. Alireza Abdollahpouri

CS 61C Summer 2016 Guerrilla Section 4: MIPS CPU (Datapath & Control)

The Evolution of Microprocessors. Per Stenström

CS 3330 Exam 2 Fall 2017 Computing ID:

CSE 378 Midterm 2/12/10 Sample Solution

Transcription:

Comprehensive Exams COMPUTER ARCHITECTURE Spring 2006 April 3, 2006 ID Number 1 /15 2 /20 3 /20 4 /20 Total /75

Problem 1. ( 15 points) Logic Design: A three-input switching function is expressed as f(a, b, c) =(a + bc)(a b + c). a) Write function f(a, b, c) in the minimum sum of products format. b) Write function f(a, b, c) in the minimum product of sums format. c) Suppose we connect the output of the function f to the input of one D Flip-Flop, and connect the output of the D Flip-Flop, g, to signal a, we have a sequential machine with inputs (b, c) and output g. Write the state table of the sequential machine.

2. (20 points) Processor Design Comparisons Read this problem carefully. It asks you to add a new instruction to a processor design. The functionality that this new instruction will implement currently has to be done by a series of other instructions (as detailed below). You propose a new instruction SETC that will be used to set a background color for a cell phone screen (NOTE: Screen colors are stored as a big two-dimensional array in memory). Our screen is of size 32 x 32 and each pixel color is stored as an int (a word of data). So the array that stores the screen color is 1024 words long (32x32). The SETC instruction takes two source registers: The rs register holds a value which is the background color we should assign The rt register holds the start memory address (location (0,0)) on the screen the first element in the array) where we want to start writing the background color for the screen. So, if we had SETC $3, $4 and $4 has the number 4096 in it, we will overwrite all memory locations from 4096 to 8192 (that s 1024 words) with the value in $3. In the current processor design (where SETC doesn t exist as an instruction) they currently implement this functionality in software, by doing something like: # $3 has the background color value # $4 is already set to 4096 # $5 is already set to 8192 loop: SW $3, 0($4) ADDI $4, $4, 4 //increase address 1 word (4 bytes) each cycle BNE $4, $5, loop //this loop runs 1024 times Assume all processors below can store one 32-bit word at a time, and only one store can happen at a time. Assume that it takes 50ns to write a word to memory.

I) This question asks about the prospect of adding the SETC instruction to a single cycle processor. A) If you were to add this instruction to a single cycle processor design, what would the required cycle time be? Assume that a single cycle design for the current set of instructions supported takes 200ns and the time to access memory is 50ns. Cycle Time: B) If you were asked to advise a company considering a single cycle design including the SETC instruction, would you recommend that they go forward with the project? Answer yes or no and provide a few sentences of explanation.

II) This question asks about the prospect of adding the SETC instruction to a multicycle processor. Here is some extra information: Cycle time is 50ns Assume that a STORE instruction takes 3 cycles STORE Cycle 1: Fetch and Decode STORE Cycle 2: Compute address and read register STORE Cycle 3: Write to memory BNE and ADDI take 2 cycles each Assume that the SETC instruction takes o 1 cycle to be fetched and decoded o 1 cycle to get ready to store the first word o 1 cycle to store each word (this includes time to keep track of how many words were written, and to increment the address to store to). A) How long would it take to accomplish the setc functionality in the original design (without the SETC instruction)? Give an answer in cycles. B) Consider a multicycle implementation of the SETC instruction. How many cycles would it require? C) If you were asked to advise a company considering a multicycle design including the SETC instruction, would you recommend that they go forward with the project? Answer yes or no and provide a few sentences of English explanation.

III) This question asks about the prospect of adding the SETC instruction to a pipelined processor. Here is some extra information: Assume that the cycle time is 50ns Assume the pipeline has these 5 stages (just like the DLX pipeline developed in Patterson and Hennessey): fetch, decode, execute, memory, writeback A) Some further assumptions for Part A Assume that you cannot change the number of pipeline stages Assume that you cannot change the design of the memory module (it can store only one value per cycle) Is it possible to implement the SETC instruction in a pipelined design? Answer yes or no and give a few English sentences of explanation. B) If the assumptions from Part A are removed (that is you can modify the pipeline design), would you recommend doing so? Answer yes or no and provide a few sentences of English explanation.

if id reg ex1 ex2 mem wb 3. (20 points) Pipelining A certain processor has a pipeline as shown above. Registers are read in stage reg and written in wb. There are two execution stages, ex1 and ex2. Arithmetic operations (add, sub, etc.) complete the computation at the end of ex2, but logical operations (e.g., and, or, shift) produce the result by the end of ex1. Memory (cache) is accessed in stage mem, while the address calculation for memory operations is done in ex1 and ex2. Assume all reasonable forwarding (if you need to make other assumptions, make sure they are reasonable ones, and clearly stated). Show all forwarding and bubbles for the following code on this pipeline. add $5, $4, $1 lw $6, 1000($5) and $6, $6, $4 add $8, $5, $6 lw $7, 1020($5) and $9, $8, 46 add $10, $7, $9 IF ID R X1 X2 M WB B) Could this code be reordered to improve performance? If so, how many fewer stalls would result?

Problem 4 (20 points) Caches Assume you have a 128 byte cache, with 32 bytes per block. The memory is byte addressable. All cache blocks start out as invalid. Answer the following question filling in the table below using the following address stream. The addresses in the order they are accessed are: 90, 160, 280, 50, 190, 90, 250, 120, 200, 60, 300, 30, 192, 96, 30, 220, 280... Fill in the table below assuming that the cache is 2-way associative, and use LRU for replacement. Fill in for each address (a) the set each address indexes into (the sets start at number 0), (b) the full block address range stored there after performing the access, (c) indicate if the address access is a hit or miss in the cache, (d) if it is a hit, specify if it is a temporal (T) or spatial (S) hit, and (d) if miss, what block (its address range) was evicted from the cache using LRU? Address Set Index Block Addresses Hit or Miss If Hit, T or S If Miss, Block Evicted 90 160 280 50 190 90 250 120 200 60 300 30 192 96 30 220 280