2005Su CS61C Homework 6: ALU in Logisim

Due 23:59:59 on 2005-07-26

TA In Charge: Zach

Administrative Requirements

To submit your project, create a directory named hw6 that contains your hw6.circ file. From within that directory, type "submit hw6".

Overview

This is a homework done in logisim, where you will implement a 7 function, 16-bit Arithmetic Logic Unit (ALU).

Functions

The seven functions that you will implement are: add, subtract, OR, AND, shift left logical, shift right logical, and shift right arithmatic. The ALU will perform a desired function on two 16-bit inputs (X and Y, where x0 is the lowest order bit for x, etc...) and output the result (RESULT). The function will be determined by the value of a control signal (S), as listed below. In addition to the 16 bits of output provided in RESULT, two additional outputs will be provided: unsigned overflow, and signed overflow. Unsigned overflow will have a high value iff the command was an add and unsigned overflow occured. Signed overflow will have a high value iff the command was an add or a subtract, and signed overflow occured. (You need not worry about unsigned overflow for subtractions.)

Here's what occurs for each operation:

But wait, there's more!

Think about intuitive ways to test your ALU. If the grader can look at your logisim file and immediately see that everything is in working order, it will be to your advantage. You might consider some method for automatically testing your ALU, such as a counter. Perhaps you should add testing logic that signals an error if an incorrect value is seen. Think about this, we want to see some form of testing suite in your outter-most circuit design.

Not Allowed On This Assignment:

You may only use tools from the "Base" and "Gates" libraries in Logisim. Do not use any items from the Memory, Plexers, Arithmetic, or Legacy libraries. Any ALU pieces built using any of these illegal components will be given no credit.

Details & Hints