Prev

Home

Next

Suggestion Box

CPSC 418 --- Advanced Computer Architecture --- Spring 1996
Homework 09 --- Due 19 Mar

General Information for This Homework

When drawing ``execution tables'' for pipelines:

Problem 1 (10 Points)

Given the following assembly code:
      ; initial values:  R1=A, R2=B, R3=C, R4=D, R5=E
      1000 :  SUBx  R1, R2, R3  
      1001 :  ADDx  R2, R3, R1  
      1002 :  ANDx  R1, R4, R5  
      1003 :  XORx  R2, R4, R5  
    

Problem 1.a (2 points)

Comment the code by giving a unique character to each value, as was done in lecture. (NOTE: Be nice to the TA and assign characters in alphabetical order.)

Label all of the hazards in the code and explain what causes each hazard. (e.g. RAW on R4 between lines 2034 and 2048)

Problem 1.b (4 points)

Assuming that the bypass path in Fig 1 does not exist, complete the execution table in Fig 3. For each clock-cycle show the values stored/produced at the end of the clock-cycle for:

Problem 1.c (4 points)

Using the bypass path, complete the execution table in Fig 4. For each clock-cycle show the values stored/produced at the end of the clock-cycle for:

Problem 2 (9 points)

Given the following assembly code:
      ; initial values:  R1=A, R2=B, R3=C, R4=D
      1001 :  DIVx  R1, R2, R3
      1002 :  DIVx  R4, R2, R1
      1003 :  SUBx  R1, R4, R3
      1004 :  ADDx  R4, R3, R4
    

Problem 2.a (2 points)

Comment the code by giving a unique character to each value, as was done in lecture. (NOTE: Be nice to the TA and assign characters in alphabetical order.)

Label all of the hazards in the code and explain what causes each hazard. (e.g. RAW on R4 between lines 2034 and 2048)

Problem 2.b (5 points)

Complete the execution table in Fig 5. For each clock-cycle show the values stored/produced at the end of the clock-cycle for:

Problem 2.c (2 points)

What would be the costs and performance gains, if any, for adding a bypass path from the output of the Divide stage to the input of the Execute stage?

Problem 3 (1 Point)

How much time did you spend total on the assignment and on each of these problems? Which problems were useful or useless? How well did the lectures and text book prepare you for this homework? Which concepts needed better explanation?
Figure 1: Block Diagram of Simple Microprocessor Pipeline
Figure 2: Block Diagram of Complex Microprocessor Pipeline


Prev

Home

Next

Suggestion Box
Last modified: 05 Mar 96