Sie sind auf Seite 1von 3

Computer Organization and Design Semester 1 2011-2012 Danang University of Technology, Faculty of Electronics and Telecommunications Prepared by Ho Viet

Viet and Pham Xuan Trung

Lab2: Design a MIPS 32-bit ALU


Due Date: Lab Objectives: For this lab2 you are to design a simple 32-bit MIPS ALU. The ALU functions implemented are ADD, SUB, XOR, and SLT. Examples of this type of architecture is shown in chapter 4 of your textbook. The overall block diagram of your design will look like the figure below.

Bus A 32 Output

Bus B 32

ALU ALU
32 Zero

Overflow Carryout

Negative

ALU 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 00 01 10 11 FUNCTION Add XOR Sub SLT

Page 1

Note that the Carryout and Overflow flags are only important for Adds and Subtracts, and the zero and negative flags for Adds, Subtracts, and XORs. What these flags do in the other cases is irrelevant (it depends on you). Computer resources and software tools: PCs with Software Quartus II, ModelSim, IVerilog installed, testbench: alustim.v

Page 2

Das könnte Ihnen auch gefallen