CSCI 2321 (Principles of Computer Design), Spring 2002:
Homework 5
- Assigned:
- April 1, 2002.
- Due:
- April 8, 2002, by the start of class.
- Credit:
- 30 points.
(Optional) figures to print
Some of the problems ask you to modify figures from the textbook,
or ask you to trace through execution of instructions using one
of the figures. 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 copyrighted1.
- (5 points)
Suppose that at the beginning of a clock cycle
the following is true:
- The program counter (PC) has a value of 4.
- The instruction memory's location 4 contains
the binary representation of the
MIPS assembler instruction
add $t0, $t1, $t2.
- Register $t1 contains 8.
- Register $t2 contains -2.
Using Figure 5.19 (p. 360), trace through what happens
during the clock cycle. At the point at which values
are written into state elements, what values will
the following have?:
- Output of instruction memory (instruction in
binary form).
- Input and output of program counter register (PC).
- Inputs and outputs of register file
(read register 1, read register 2,
write register, write data).
- Inputs and output of ALU.
- Outputs of control (RegDst, etc.).
- Output of ALU control.
- (5 points)
Suppose that at the beginning of a clock cycle
the following is true:
- The program counter (PC) has a value of 8.
- The instruction memory's 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 data memory
location 24 is -10.
Using Figure 5.19 (p. 360), trace through what happens
during the clock cycle. At the point at which values
are written into state elements, what values will
the following have?:
- Output of instruction memory (instruction in
binary form).
- Input and output of program counter register (PC).
- Inputs and outputs of register file
(read register 1, read register 2,
write register, write data).
- Inputs and output of ALU.
- Inputs and output of data memory (address, write
data, read data).
- Outputs of control (RegDst, etc.).
- Output of ALU control.
- (10 points)
Do problem 5.5 on p. 427 of the textbook.
(See
the previous section (1)
if you want to print copies of the relevant figures.)
- (10 points)
Do problem 5.6 on p. 427 of the textbook.
(See
the previous section (1)
if you want to print copies of the relevant figures.)
Footnotes
- ... copyrighted1
- COPYRIGHT 1998 MORGAN KAUFMANN PUBLISHERS, INC.
ALL RIGHTS RESERVED.
Berna Massingill
2002-04-08