CPE 315
Spring 2006
Professor Stearns
Laboratory Project #1 - MIPS ALU
Due Friday, June 30 by 5:00 pm in the CSC drop box

Notes:
  1. You may do this lab using SIM or Xilinx ModelSim
  2. You may do this lab by yourself or with one partner
SIM Resources:
  1. 8 bit adder
  2. Lab #1 makefile
    You are writing alu.c and lab1.c
  3. Mux example
    It is strongly suggested that you build and use the mux example.

Objectives:
  1. To learn how to build an ALU
  2. To learn how to construct a SIM module.

Description:
The objective of this lab is to build and test an 8-bit ALU.
Later in the quarter, we will add more functionality to this ALU and convert it to 32 bits.
  1. Designing the ALU
    You are to build the one-bit ALU shown in Figure B.5.8 of our textbook.
    The complete ALU includes 8 of these 1-bit ALUs plus an Overflow detection circuit.

    Use fullAdd.h and fullAdd.c as examples and templates for your one bit alu (oneBitalu.h and oneBitalu.c)

    It is strongly suggested that you test your one bit alu separately; there is a makefile command to build this test.

    make 1bitTest

  2. ALU as a module
    Use the 8 bit adder files as templates for your 8 bit alu.
    8bitAdd.h is a template for alu.h
    8bitAddd.c is a template for alu.c
    8bitAddTest.c is a template for lab1.c

  3. lab1.c instantiates and tests your ALU; label each of your switches and probes clearly.
    There are 2 sets of 8-bit input switches (A, B)
    There are 4 other switches (Binvert, Operation 1 , Operation 0 , CarryIn 0
    There are 10 output probes (Result, CarryOut 7 , V)

    Use the following keys for the switches:
    A: 7-0
    B: Shift 7-0
    Binvert: i
    Operation: op
    CarryIn 0 : c

  4. Demo the ALU to Professor Stearns
    Suggestion: make a truth table for your ALU before the demo; ensure that all input permutations (there are lots of Don't Care) work properly.

Deliverables
  1. A formal lab report as described in the syllabus.
    You need not include test cases; this work will be demoed in lab.
  2. Listings of all source code
    or printout of your Xilinx schematic
  3. (SIM implementations) A demonstration of the ALU
  4. (ModelSim implementations) A demonstration of the ALU
    plus excellent, annotatted, printouts of the ModelSim test results


Last updated on 6/26/06