Professor
Shai Simonson - CSC 304 - Computer Architecture
Assignment 6
DataPath, Control, and
Pipelining
Due: Friday, April 26
Hints: The multicycle data path on our web page has a j instruction already included, and that is half the work for implementing a jal. The jal instruction can branch directly off of the first cycle. It does not read any registers and thus need not execute the second cycle at all. In contrast, the swap instruction must branch off of cycle 2, because it certainly uses register values. Both jal and swap need two new cycles to complete their executions. Swap uses one cycle to write one register and then another cycle to write the next one. Jal uses one cycle to store the PC in $31 and one cycle to overwrite the PC with the jump-label in the instruction.
http://www.stonehill.edu/compsci/shai.htm