pete > courses > CS 202 Spring 24 > Tier 2, Phase 2, Problem 02: ARM32 ALU


Tier 2, Phase 2, Problem 02: ARM32 ALU

For this problem, you will construct an ALU for an ARM32 processor. It will support all the arithmetic and logical operations entailed by the ARM32 instructions we have looked at in class, as well as some that will come in handy when constructing the full processor (which is the Phase 2 project).

Your submission will consist of two files, described in detail below:

Note that a working solution to this assignment will be necessary to complete the Phase 2 project.

Interface & Behavior

The file alu.circ must contain a subcircuit named main with the following inputs and outputs:

name width direction
operand_0 32 bits in
operand_1 32 bits in
operation 4 bits input
result 32 bits out

And the following behavior:

when "operation" is… "result" should be…
0000 operand_0 bitwise-and operand_1
0001 operand_0 bitwise-xor operand_1
0010 operand_0 minus operand_1
0011 operand_1 minus operand_0
0100 operand_0 plus operand_1
1100 operand_0 bitwise-or operand_1
1101 operand_0
1111 bitwise-not of operand_0

For arithmetic operations, assume all values are two’s complement. You may ignore overflow.

You may assume that values of "operation" not in the table above will never be given.

Note that we will not be able to test (and therefore give feedback on) the functionality of your circuit unless its inputs and outputs are exactly as specified above.

Restrictions

You are limited to components from the following Logisim libraries:

You may add as many subcircuits as you deem appropriate.

Testing

You must submit a test-vector.txt file that adequately tests your circuit. When devising your tests, here are some things to keep in mind:

Submission Instructions

Copy the alu.circ and test-vector.txt files to weathertop and then run:

$ 202 submit t2p2p02 alu.circ
$ 202 submit t2p2p02 test-vector.txt

Submissions will not be accepted after 2pm on Wednesday, 10 April.

Last modified: