CSE370 Assignment 8


Collaboration Policy:

Unless otherwise noted, you may collaborate with other CSE370 students on the homework assignments. Do not look at homework or exam solutions from previous years. You must spend at least 15 minutes working on a problem before seeking assistance. Collaboration means that you may discuss the problems and make notes during the discussion, but you may not look at other student’s work when writing up your homework.. Your homework represents your own work—the homework must show that you understand the material and have worked as an individual on every problem. You may not divide up the task of doing the problem sets in the interpretation of collaboration. You may discuss lecture material with anyone.


Reading:

  1. Computer Organization
  2. Computer Organization II
  3. The MIPS2000 processor is a simplified version of the one described in Patterson & Hennessy's Computer Organization and Design, 3rd edition, Morgan-Kaufmann. There should be plenty around the department as this is the CSE378 textbook

Exercises:

  1. We talked about our MIPS2000 implementation in class on friday, and you can get it here. After you download the zip file, open Aldec, Select Workspace > Restore Workspace from the menu, and browse to the zip file. After restoring the project, you need to open the workspace in the standard manner. The restored project contains all the commented Verilog files you'll need to determine the detailed operation of the processor's data-path.
  2. Your goal is to determine the specific control signals needed for each of the instructions. There is skeleton code in controller.v, so you need only to replace all of the instances of x with the correct values.
  3. Here is a description of the instructions you need to implement.
    NameEncAbbrR BehaviorPC Behav.
    Arithmetic Op Reg ADD,SUB,etc rd = rs op rt PC++
    Set on less than Reg SLT rd = (rs < rt)? 1:0 PC++
    Jump Register Reg JR No change PC=rs
    I-Format Instructions
    Load Word from Memory Imm LW rt = MEM[rs+SE(immed)] PC++
    Store Word to Memory Imm SW MEM[rs+SE(immed)] = rt PC++
    Add Immediate Imm ADDI rt = rs + SE(immed[15:0]) PC++
    Or Immediate Imm ORI rt = rs | {ZERO[15:0],immed} PC++
    Load Upper Immed. Imm LUI rt = immed[15:0],zeros[15:0] PC++
    Branch if equal Imm BEQ No change PC = PC+1+((rs == rt)? SE(immed) : 0)
    J-Format Instructions
    Jump Jmp J No change PC = {(PC+1)[31:26],Inst[25:0]}
    Jump and Link Jmp JAL r31=PC+1 PC = {(PC+1)[31:26],Inst[25:0]}
  4. The file imemory_hanoi.v contains an implementation of the "Towers of Hanoi". The number of discs is read from dmemory[254]. Once your controller is ready, be sure to set a stimulator for clk (use 40ns). Note: this is a recursive implementation that stores info in dmem for each "call". Therefore, if you use too many discs, memory will overflow and things will stop working. You can fix this by increasing the size of memory in dmemory.v, and the number of bits of address used.
  5. Submission instructions will be finalized soon

Comments to: cse370-webmaster@cs.washington.edu