CSCI 2321 (Principles of Computer Design), Spring 2002:
Homework 6
- Assigned:
- April 22, 2002.
- Due:
- April 29, 2002, by the start of class.
Not accepted late.
- Credit:
- 30 points.
(Optional) figures to print
Some of the problems ask you to modify figures from the textbook.
For these problems you may find it useful to print
a copy of the figure.
To save you the trouble of photocopying the relevant figures
or finding them on the authors' Web site,
here are they are in your choice of
printable formats.
All figures below are copyrighted.1
- (5 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.
- (5 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.
- (10 points)
Do problem 5.15 on p. 429 of the textbook.
(See
the previous section (1)
if you want to print copies of the relevant figures.)
- (10 points)
Do problem 5.17 on p. 429 of the textbook.
(See
the previous section (1)
if you want to print copies of the relevant figures.)
Footnotes
- ...1
- COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC.
ALL RIGHTS RESERVED.
Berna Massingill
2002-04-22