Instructions

Write out the answers to the following questions.

The Assignment

First, answer Exercises 5.1, 5.8, 5.9, and 5.10 on pages 354-355 in the textbook.

Then answer the following questions:

  1. What are the two sources of information for Read Register #2 in the register file of the MIPS datapath? Why are there two sources? What is the structure of the multiplexer for connecting these two sources to the register file? (That is, what are m and n in the term, “an m×n multiplexer?”) What is the name of the control signal that selects which source is used? What instructions cause this control signal to have a value of 1?
  2. What are the two sources of information for Write Data in the register file of the MIPS datapath? What is the structure of the multiplexer for connecting these two sources to the register file? What is the name of the control signal that selects which source is used? What instruction(s) cause this control signal to have a value of 1?
  3. What is the structure of MIPS main memory, in bytes and in words? How many bits in a memory address? When would the rightmost two bits of a memory address ever be anything other than 2'b00?
  4. What are the three uses for I-format instructions? Give an example of an instruction name for each.
  5. Write the Verilog expression for computing the immediate operand for an addi instruction.
  6. Write the Verilog expression for computing the immediate operand for an andi instruction and tell why it is different from the answer to the previous question.
  7. Write the Verilog expression for computing the effective address of lw and sw instructions.
  8. Write the Verilog expression for computing the target address for conditional branch instructions.
  9. Write the Verilog expression for computing the target address for J-format instructions.
  10. List all the elements for the MIPS datapath that have a clock input. (There are either two or three, depending on whether you include Data Memory or not.)

Submit The Assignment By Email

I prefer receiving your answers as plain text in the body of your email message. If you use a word processor, paste your answers into the body of your message rather than sending an attachment.

Send your email to:

Christopher.VickeryATqc.cuny.edu

Be sure the Subject Line of your email says CS-343 Assignment 5, just like that, to be sure your message does not get trapped by my spam filters.

Be sure to put your name in your email message!