Fill This Form To Receive Instant Help
Homework answers / question archive / Digital Logic PROJECT 1 Title: Arithmetic Logic Unit (ALU) Point Value: 100 The Problem In this project, you will be completing the design of a simple Arithmetic Logic Unit using Xilinx ISE Schematic Capture
Digital Logic PROJECT 1
Title: Arithmetic Logic Unit (ALU)
Point Value: 100
In this project, you will be completing the design of a simple Arithmetic Logic Unit using Xilinx ISE Schematic Capture.
DISCLAIMER: The processor we are working with is a very basic 8 bit single cycle processor with no data memory. While it is a good representation and is good for education, commercial processors are typically more complex.
A skeleton has been provided that contains various aspects of the processor already designed. Below is a description of the ALU as it pertains to this processor. You will need to use these descriptions as well as the information in the architecture section to complete this design.
Your ALU will fit in this Multi Purpose Processor (MPP.sch). You will draw your schematic for the ALU in ALU.sch which has already been provided for you. You can get to ALU.sch by clicking on the ALU symbol in MPP.sch, right click -> Symbol ->Push into symbol.
You can also get to the ALU.sch by going to Design and clicking on CORE_ALU - ALU
Arithmetic Logic Unit (ALU):
The arithmetic unit does the arithmetic and logic lifting for the processor. This ALU is an 8 bit ALU and can do 8 different operations as described in the table below. You will build the components for these logic and arithmetic operations.
Opcode |
Operation |
000 |
O = B |
001 |
O = A ^ B (bitwise xor) |
010 |
O = A AND B (bitwise and) |
011 |
O = A OR B (bitwise or) |
100 |
O = A + B (addition) |
101 |
O = A - B (subtract) |
110 |
O(7) = 0, 0(6:0) = B (7:1) (logical shift right) |
111 |
O = A * B (multiplication) |
ALU inputs:
A(7:0):
8 bit data to be operated on. This comes from the register file, read data a(R_data_a).
B (7:0):
8 bit data to be operated on. This can come from the register file, read data b (R_data_b) or the data input to the processor.
Opcode (2:0):
This picks the operation to be done.
ALU Outputs:
O (7:0):
The result of the ALU operation.
ALU.sch
You will build your ALU in ALU.sch.
ALU.sch currently looks like this:
You may delete the comments on the top but leave the bus inputs/outputs where they are and place the components needed for your ALU here. Make connections to the bus inputs/outputs. There are couple of ways to attach to the bus. You used one method in your Arithmetic Circuits Lab, another method is explained below. |
Testing
It is encouraged that you test your work as you go along. Use the methods you used in your Arithmetic Circuits Lab (Force Constants). To aide in this, the skeleton comes with a test bench (simulation file) that you can use to test your designs.
ALU Test Bench (This is only visible when in Simulation mode)
The ALU Test bench is labelled: ALU_ALU_sch_tb
This is what the test bench will show before you have implemented the ALU.
This testbench steps through all the opcode values in order starting from 000 up to 111.
The values for A and B are both set to the binary value “10101010”.
To use the text bench:
You do not need to have all the components built in the ALU to test an individual one, but you do need to have the multiplexor component built at the very least before you can test the rest of the components.
This is what it will look like when your components are working correctly:
Implementation Details & Hints:
The 100 total points for this part will be broken down into expected functionality, and how organized the design is.
**If the 8 bit multiplexor component in the ALU does not work you will lose 20 points on the Design Functionality (in addition to any other points you lose).
Arithmetic Logic Unit (MPP) Architecture:
This section describes the architecture for the MPP that will be used in this project. As outlined earlier, this is a very simple processor.
Arithmetic Logic Unit (ALU):
The ALU for this processor is an 8 bit ALU and can perform 8 operations as described in the table below.
This is the only part you will be responsible for in this Project |
Opcode |
Operation |
Description |
000 |
O = B |
Output is = equal to input B |
001 |
O = A ^ B (bitwise xor) |
Xor of each bit in A with the corresponding bit in B |
010 |
O = A AND B (bitwise and) |
AND of each bit in A with the corresponding bit in B |
011 |
O = A OR B (bitwise or) |
OR of each bit in A with the corresponding bit in B |
100 |
O = A + B (addition) |
8 bit addition with a final carry out bit |
101 |
O = A - B (subtract) |
8 bit subtraction with a borrow out bit |
110 |
O(7) = 0, 0(6:0) = B (7:1) (logical shift right) |
Logical shift of the data at input B right by one bit |
111 |
O = A * B (multiplication) |
8 Multiplication. To make our design simpler, we only use the 4 LSB of A and B |
Some Xilinx notes
If you don’t want to connect all the lines to a bus with a bus tap because there are so many or it could make your schematic messy. You can name the net instead. First make sure that you have put wires at the end of the pins you want to connect to the bus. Select
.
If you want to name individual bits on consecutive wires, (X(0), X(1), X(2), etc.), select “Increase the name”, so that the index will increase automatically as you select a wire and you can name the nets for all your outputs quickly.
The net name must go on a wire – not the pin.
Select the wires at the end of the pins and the Net name will be placed there.
Now the schematic looks like this – I have found that it is easier to read and takes less time |
|
This schematic is identical to the one above
Connecting a bit from one bus to a bit of a different bus in xilinx can be an issue. In order to do this, you need a buffer component (buf in xilinx).
See the picture below for an example, in this picture I am connecting the bit 0 of Bus1 to bit 1 of Bus2.