CSCI 2321 (Principles of Computer Design), Spring 2004:
Homework 6
- Assigned:
- April 7, 2004.
- Due:
- April 14, 2004, at 5pm.
- Credit:
- 20 points.
Problems
Do the following problems.
You may write out your answers by hand or using a word processor or
other program, but please submit hard copy, either in class or
in my mailbox in the department office.
- (10 points)
Suppose that at the beginning of a clock cycle
the following is true:
- The program counter (PC) has a value of 4.
- Memory location 4 contains
the binary representation of the
MIPS assembler instruction
add $t0, $t1, $t2.
- Register $t1 contains 8.
- Register $t2 contains -2.
Trace through what happens during execution of this
instruction by the multicycle implementation described
in section 5.4:
- How many cycles are required for execution of
this instruction?
- For each cycle, what are the values of the control
signals in the table of Figure 5.34 (p. 384)?
You may omit any whose values don't matter.
- For each cycle, which state elements' values change
at the end of the cycle, and to what? State
elements include the register file, the memory,
and the PC, IR, MDR, A, B, and ALUOut registers.
- (10 points)
Suppose that at the beginning of a clock cycle
the following is true:
- The program counter (PC) has a value of 8.
- Memory location 8 contains
the binary representation of the
MIPS assembler instruction
lw $t0, 8($t1).
- Register $t1 contains 16.
- The 32-bit value stored starting at memory
location 24 is -10.
Trace through what happens during execution of this
instruction by the multicycle implementation described
in section 5.4, as in the preceding problem.
Berna Massingill
2004-04-07