Prev

Home

Next

CPSC 418: Solution 9

Postscript source for figures

Problem 1

(Part 1a)

 
1000 : SUBx R1, R2, R3       ; A-B=F 
1001 : ADDx R2, R3, R1       ; B+F=G 
1002 : ANDx R1, R4, R5       ; G&D=H 
1003 : XORx R2, R4, R5       ; B^D=I 

Hazards:

(Part 1b)

See postscript source above.

(Part 1c)

See postscript source above.

Problem 2

(Part 2a)

 
1001 : DIVx R1, R2, R3        ; A/B=F 
1002 : DIVx R4, R2, R1        ; D/B=G 
1003 : SUBx R1, R4, R3        ; F-D=H 
1004 : ADDx R4, R3, R4        ; D+G=I 

Hazards:

(Part 2b)

Performance gains for adding bypass after divide would not be very significant, because there are not very many divide instructions in most programs. If this were not the case, then with the bypass stage, performance would increase as DIV would require one less cycle.

The cost would be extra hardware for signal lines, multiplexer on input to EX stage, and control logic in Fetch Operands. The multiplexer would likely increase the cycle time.

(Part 2c)


See postscript source above.

Prev

Home

Next
Last modified: 25 March 96