Recent Changes
Search:

:: Personal ::

E

Main / CoursesAASampleMidterm

Engr 851 - Sample Midterm Questions

  1. List three pros and cons for VLIW and three pros and cons for Superscalar architectures and briefly explain your reasoning.
    1. List three use cases where VLIW would be more suitable than Superscalar.
    2. List three use cases where Superscalar would be more suitable than VLIW.
  2. Consider the set of instructions below to be executed on our standard 5 stage pipeline (F, D, E, M, W):
    R1 = M[1000]; // LOAD R1 from memory location 1000.
    R2 = M[1001];
    R3 = R1 + R2;
    R2 = R5 / 2;
    R4 = R3 + R2;
    R6 = M[2000];
    R6 = R6 + R4;
    M[2000] = R6; // Store R6 to memory location 2000.
    1. Assuming no fancy processor abilities (no data forwarding within the pipeline, out of order execution, etc), how many clock cycles does this code take? Assume every instruction takes 5 clock cycles while LOAD and STORE operations take an additional 4 clock cycles in the memory state (9 cycles total).
    2. Assuming still a single pipeline but with superscalar, out-of-order execution, rewrite the code above that would result in the fastest execution on this processor. How many clock cycles does it take?
    3. Rewrite the code assuming your processor can handle VLIW with up to 3 parallel instruction issues.
      1. How many clock cycles does the new processor take to execute the VLIW code?
    4. Will register renaming help to speed things up here (for the basic case)? Explain your answer.
    5. Will register renaming help to speed things up in the superscalar case? Explain.
  3. Using a simple example, illustrate how branch prediction can improve performance. Note that you must first describe what your branch predictor is doing.
    1. Can you come up with an example where your branch predictor will hurt performance? Explain.