Lab 5 - Single Cycle Datapath

Due: Wednesday at noon

The purpose of this lab is to trace instructions as they pass through the single cycle datapath.

Trace the following assembly program as it travels through the single cycle datapath shown in Figure 5.24 (password protected, the password will be given in class, email me for the password if you cannot make it to the lab). Note this is the 1st printing form of Figure 5.24 and the line from the AND gate for branches should go to the first MUX after the branch target adder, not the second as it currently shows (your textbook should have the corrected image if you have the revised printing).

For each instruction, show the value of each control line and highlight which buses are used. You can do this by either printing out several copies of the image and writing it on paper or by loading the image into an image editor.

Loop:     beq $t0, $t1, Exit
          sw $zero, 0($t0)
          add $t0, $t0, $s4     # s4 contains the offset
          j Loop
Exit:
If you opt to do this on paper, turn it in to me by the due date. If you opt to use an image editor, save in JPG, GIF or PDF format and email me the file(s) by the due date.