0% found this document useful (0 votes)
75 views2 pages

Lab2: Design A MIPS 32-Bit ALU: EE471 - Computer Organization and Design Semester 1 2016-2017

The document provides instructions for a lab assignment to design a 32-bit MIPS ALU that performs addition, subtraction, XOR, and set on less than functions based on a 2-bit control input, including specifying the ALU's ports and control line assignments and noting that the carryout and overflow flags are important for addition and subtraction while the zero and negative flags are important for addition, subtraction and XOR. Students are asked to complete the ALU design using Quartus II and ModelSim software and test it with the provided testbench file.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views2 pages

Lab2: Design A MIPS 32-Bit ALU: EE471 - Computer Organization and Design Semester 1 2016-2017

The document provides instructions for a lab assignment to design a 32-bit MIPS ALU that performs addition, subtraction, XOR, and set on less than functions based on a 2-bit control input, including specifying the ALU's ports and control line assignments and noting that the carryout and overflow flags are important for addition and subtraction while the zero and negative flags are important for addition, subtraction and XOR. Students are asked to complete the ALU design using Quartus II and ModelSim software and test it with the provided testbench file.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

EE471 - Computer Organization and Design

Semester 1 2016-2017
Danang University of Science and Technology, Faculty of Electronics and Telecommunications
Prepared by Ho Viet Viet, Pham Xuan Trung, Nguyen Van Hieu, Tang Anh Tuan and Tran Van Lic
Lab2: Design a MIPS 32-bit ALU
Lab Objectives:
For this lab2 you are to design a simple 32-bit MIPS ALU. The ALU functions
implemented are Addition, Subtraction, eXclusive OR, and Set on Less Than.
Examples of this type of architecture is shown in chapter 4 of the textbook. The
overall block diagram of your design will look like the figure below.

Bus A

32
Output

32

ALU Zero

Bus B Overflow

32 Carryout

Negative

ALU
2
Control

The ALU has 8 ports. These ports are the two input ports A and B, the output port, ALU
control, zero detect output, overflow detect output, negative detect output, and the
carryout output. The ALU control line assignments is given below. Please use these
inputs to select the ALU function.

ALU CONTROL LINES FUNCTION


00 Add
01 iitiiti
XOR
10 Sub
11 Slt
Note:
- The Carryout and Overflow flags are very important for Addition and Subtraction. The
Carryout flag is set if an unsigned overflow occurs. The Overflow flag is set if a signed
overflow occurs.
- The Zero and Negative flags are only important for Addition, Subtraction, and XOR.
The Zero flag is set if the Output equals zero. The Negative flag is set if the most
significant bit of the Output equals one.
- What these flags do in the other cases is UP TO YOU.

Computer resources and software tools:


PCs with Software Quartus II, ModelSim, IVerilog installed, testbench: alustim.v
Lab Requirements (as in lab1)

You might also like