CSE 820 F'00 Midterm 100 points (25% of course grade) You are allowed to have one page of notes (8.5x11). The exam covers Chapters 1-5 of H&P Instructions: Read the whole question before beginning to answer the question so you do not answer the wrong part of the question in the wrong place. Suggestion: This is a long test so you should read all the questions first and decide on the optimal order and optimal time to devote to each question. Point values are included to help you plan your time. You have 100 points and only 80 minutes so that is less than one minute per point. 1. Data Hazards (21 points) a. Define the three types of data hazards -- RAW, WAR, WAW -- and indicate why each is a problem. (6 points) b. Give a DLX-like code example of each hazard. (6 points) c. For each data hazard describe how the PowerPC 620 removes the data hazard. (9 points) 2. FP (7 points) a. Floating Point loads and stores are handled in the integer pipeline of the DLX machine. Explain why. (4 points) b. Why does a floating-point ADD execution unit have a 4-stage pipeline, i.e. what happens in each stage? (3 points) 3. Branch Prediction (29 points) a. BTB 1. Explain what a BTB is and how it works. (7 points) 2. What problem is the BTB addressing? Describe how the BTB addresses that problem. (5 points) b. (1,2) branch-prediction buffer 1. Diagram a (1,2) branch predictor and describe how it works. Include in your description how it is indexed and how the prediction is updated. (9 points) 2. What problem does this predictor address? (5 points) Describe how it addresses that problem. 3. Why would one expect a (1,2) predictor be better than a (0,2) predictor? (3 points) 4. PowerPC 620 (20 points) a. I. Define "precise exception" (2 points) II. Explain how the PowerPc 620 could handle precise exceptions. (8 points) b. No forwarding is explicitly described on the PowerPC 620. There are two possible reasons. Choose one and defend your choice: (10 points) I. Forwarding provides no improvement. II. Forwarding cannot be done. (In addition to answering the question, include sufficient description of forwarding so the grader believes you understand how it works.) 5. Memory (18 points) Consider a virtually-indexed, physically-tagged cache. a. Describe how it works. (4 points) b. What problem is it addressing? Describe how it addresses that problem. (6 points) c. Explain the limits on its size. (8 points) (especially explain WHY there is a limit so the grader believes that you understand why) 6. What is the formula for average access time given three levels of cache? (5 points) Make sure that each term in the formula is clearly defined.