Prelim 2 Solutions

# Prelim 2 Solutions - ECE/CS 314 Final Spring 2003 Victor Aprea Anthony P Reeves Name Net ID All answers must demonstrate an understanding of the

This preview shows pages 1–5. Sign up to view the full content.

ECE/CS 314 Final Spring 2003 Victor Aprea Anthony P. Reeves Name: ______________________________________________ Net ID: _______ All answers must demonstrate an understanding of the problem and solution. Please show your work if you would like to receive partial credit. DO NOT TURN OVER THIS PAGE UNLESS INSTRUCTED TO DO SO. WRITE YOUR NAME AND NETID ON EVERY PAGE

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
NAME: ______________________________________ NETID: ______________ 2 of 2 Q1 Floating Point . ........ __________ /[15 pts] (a) __________ /[5 pts] (b) __________ /[6 pts] (c) __________ /[4 pts] Q2 Datapath Design . ....... __________ /[15 pts] (a) __________ /[5 pts] (b) __________ /[10 pts] Q3 Pipelining . ............ __________ /[25 pts] (a) __________ /[4 pts] (b) __________ /[4 pts] (c) __________ /[6 pts] (d) __________ /[6 pts] Q4 Caches . ................ __________ /[20 pts] (a) __________ /[4 pts] (b) __________ /[4 pts] (c) __________ /[9 pts] (d) __________ /[3 pts] Q5 Virtual Memory . ........ __________ /[15 pts] (a) __________ /[5 pts] (b) __________ /[5 pts] (c) __________ /[5 pts] Q6 CAST . .................. __________ /[10 pts] (a) __________ /[10 pts] TOTAL: __________ /[100 pts]
NAME: ______________________________________ NETID: ______________ 3 of 3 Q1: Floating Point [15 pts] A and B are two IEEE 754 standard, single precision floating-point numbers. A = (1 01111110 01000000 10000000 0001010) 2 B = (0 10000001 01000000 00000000 0000000) 2 (a) [5 pts] Show the values of A and B in decimal. You may leave the results in terms of powers of two. A = (-1)*(2 0 + 2 -2 + 2 -9 + 2 &20 + 2 -22 )*(2 -1 ) B = (1)*(2 0 + 2 -2 )*(2 2 ) b) [6 pts] Calculate C = A+B. Perform all the necessary steps, and show intermediate results after each step, including the values of guard, round, and sticky bits. Rounding should be done using round to nearest even mode. -0.00101000000 10000000 0001|010 *2 2 1.01000000000 00000000 0000|000 *2 2 ==================================== 1.00010111111 01111111 1111|010 *2 2 Final Answer: 0 10000001 00010111111 01111111 1111 C = 0x408bf7ff,guard bit = 0,round bit = 1,sticky bit = 0 c) [4 pts] Given the following IEEE 754 standard, single precision floating point number along with its guards bit, round bit, and sticky bit & show the result of rounding it (i) to + , (ii) to - , (iii) toward zero, and (iv) to the nearest even. G R S (1 10000001 01000000 00000000 0000011) 2 1 0 0 (i) 1 10000001 01000000 00000000 0000011 (it±s negative - adding 1 ulp would make it more negative, not more positive) (ii) 1 10000001 01000000 00000000 0000100 (it±s negative adding & adding 1 ulp is appropriate) (iii) 1 10000001 01000000 00000000 0000011 (round to zero has the effect of truncation) (iv) 1 10000001 01000000 00000000 0000100 (GRS indicates ‰ ulp & round up if lsb = 1)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
NAME: ______________________________________ NETID: ______________ 4 of 4 Q2: Datapath and Control Design [15 pts] a) [5 pts] Construct a minimal datapath, using the parts shown below, to implement the pseudo-code specification given below, where &x± and &y± are 4-bit values. You need not use all the parts and you may duplicate parts as necessary. Y=0; while Y < X do Y := Y + X; end output Y b) [10 pts] Using the reference datapath (attached) implement the bypassing control logic as a block of code in C. You may reference the wires and buses as C variables. Portions of a bus may be referenced as rs = IR2[rs]. You may assume that WB_reg_sel is set by control logic in the RD stage. Your code should set the value of Asel and Bsel as a function of the values in the pipe and handle all bypassing cases corresponding to the MIPS processor for the final project.
This is the end of the preview. Sign up to access the rest of the document.

## This homework help was uploaded on 02/19/2008 for the course ECE 3140 taught by Professor Mckee/long during the Spring '07 term at Cornell University (Engineering School).

### Page1 / 13

Prelim 2 Solutions - ECE/CS 314 Final Spring 2003 Victor Aprea Anthony P Reeves Name Net ID All answers must demonstrate an understanding of the

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online