{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Prelim 2 Solutions

Prelim 2 Solutions - ECE/CS 314 Final Spring 2003 Victor...

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

View Full Document Right Arrow Icon
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
Image of page 1

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

View Full Document Right Arrow Icon
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]
Image of page 2
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)
Image of page 3

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

View Full Document Right Arrow Icon
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.
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern