Computer Architecture

Assignment No 2


Problems 1-5

Page A-81

Questions are,

1. A-1

2. A-2

3. A-3

4. A-5

5. A-12


Problem 6:

Assume standard 5-stage pipeline(1-cycle pipe stages, in-order execution).


For the following instructions:


Ld, R1, #1000

Ld, R2, #1001

Ld, R3, (R2)

Ld, R4, (R1)

Add, R4, R4, R3

Sub, R5, R4, R3

St, R5, (R1)


(a)Showing the 5-stage pipeline timing diagram for each instruction, taking into account appropriate stalls (assuming no forwarding)  how many cycles it takes to execute the above program.  How long would this take if the above 5-stage machine was not pipelined, that is, each instruction took 5 cycles to execute.


(b)Now assuming that forwarding is allowed redo part (a).