1. Assume that an automobile assembly process takes 4 hours.

If the stages take the following amounts of time, then what is the time between completions of automobiles?

Chassis 45 minutes

Motor 1 hour

Interior 1 hour and 15 minutes

Exterior 1 hour

2. Consider the 5 stage (IF, DI, EX, MEM, WB) instruction pipelining discussed and the following assembly language segment: ADD R3, R2, R1 ; R3 R2 + R1

SUB R4, R3, R5 ; R4 R3 - R5

a) In what stage does the ADD instruction update R3?

b) In what stage does the SUB instruction read R3?

c) In what stage does the ADD instruction generate the new R3 value?

d) In what stage does the SUB instruction execute with the R3 value?

3. What would control the MUXs of the above bypass-signal path?

4. Consider the following code: ADD R3, R2, R1

STORE R3, 4(R4)

a) In what stage does the ADD instruction update R3?

b) In what stage does the STORE instruction read R3?

c) In what stage does the ADD instruction generate the new R3 value?

d) In what stage does the STORE instruction need the new R3 value?

What would the timing be without bypass-signal paths/forwarding (use "stalls" to solve the data hazard)?

  Time
Instructions 1 2 3 4 5 6 7 8 9 10 11 12
ADD R3, R2, R1 IF ID EX MEM WB              
STORE R3, 4(R4)   IF                    

(Assume that R3 can be written and the new value read in the same stage.)

5. What would the timing be with bypass-signal paths?

  Time
Instructions 1 2 3 4 5 6 7 8 9 10 11 12
ADD R3, R2, R1 IF ID EX MEM WB              
STORE R3, 4(R4)   IF                    

6. Draw the bypass-signal paths needed for the above example.

7. How many cycles are needed to perform the following AL program without forwarding?

  Time
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
ADD R3, R2, R1 IF ID EX MEM WB                      
LOAD R4, 4(R3)   IF                            
SUB R5, R4, R3                                
STORE R5, 8(R6)                                
ADD R6, R5, R4                                

8. How many cycles are needed to perform the following AL program with forwarding?

  Time
Instructions 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
ADD R3, R2, R1 IF ID EX MEM WB                      
LOAD R4, 4(R3)   IF                            
SUB R5, R4, R3                                
STORE R5, 8(R6)                                
ADD R6, R5, R4                                

Draw ALL the bypass-signal paths needed for the above example.