Lab 1 - Arithmetic and Logic Unit (ALU)Intro:Welcome to cs161L. In this class you are allowed to work on all labs alone, or in groups of two. This lab will be an introduction to microprocessors and the VHDL language. You will also be getting familiar with the Xilinx design environment. The goal of this lab is to implement a simple Arithmetic and Logic Unit (ALU) in VHDL. ALUs are hardware circuits that perform the arithmetic computations within a processor. They support multiple operations like addition, subtraction, multiplication, division, square roots, etc. The hardware logic to perform these operations can vary widely based on the approach used (Carry-Lookahead vs Ripple-Carry adder) or the data types supported (Integer, Float, Double). An ALU could even supply multiple version of the same operation. They are not limited to only arithmetic operations. They can support bit-wise operations, like AND OR and NOT, as well. Input data and control bits are sent to the ALU. The control bits specify an operation, and the ALU redirects the inputs to the corresponding functional circuit. When the computation completes the result is output along with extra data about the operation (overflow, underflow, carryouts, etc.) Before starting this lab you should be familiar with:
DeliverablesFor this lab you are expected to build an ALU that supports 8 arithmetic operations. The ALU should be designed in such a way that the user can specify the operation's width without modifying the VHDL code. In addition to the ALU you are also expected to build a test-bench that sufficiently verifies it's correctness.
The carryout port is the MSb's (Most Significant Bit's) carry out. The zero port should be '1' when the result port is all zeros. The overflow port should be '1' when the available bits are not enough to represent the result. It occurs in the following situations.
Turn-In:Each group should turn in one tar file to iLearn. The contents of which should be:
|