Testing Plan

Each instruction will be tested on its own with all registers starting with value 0. A string of assembly statements will initialize the registers and perform an operation, and the value found in the destination register will be compared to the expected value.

Different test cases are given for each instruction to try to "break" it or get it to give an incorrect value. Therefore, the instructions will be mixing up signed numbers and tested for consistency. The li instructions in the test examples are actually pseudoinstructions involving both lui and ori. We will test and verify lui and ori first, since they are needed for the rest of the testing situations. Also, lw and sw must be verified working before lwra, swra, jm and mtm are tested. The core instructions will be tested as a first priority, then if the non-core instructions are implemented, those will also be tested.

All instructions have been tested with the following test cases, and have been shown to work properly.

 

Test Cases