Testing ReadMe

Rosemary Francis 2004

This folder contains testing programs and testing program generators. 

The generators come in several flavours. ProgramGen generates a program which will test an ALU operation with various random numbers. It will place one result in each register. It is up to you to then run that program and verify the results. The simplest way of doing the is to run it on the harware then run either SimpleSimulator or J_105 (found in the 'simulate' directory) and compare the results. 

usage : java ProgramGen <op> <prog name>

The second program generator in this folder is IfTestGen_<optype>. This is used to test correct condition flag behaviour. The program generated is similar to 'basicIfTest' run 15 times with a different operation in place of cmpi. The 15 pairs of values have been carefully choosen and can be changed easily by editing the java source code. 

IfTestGen_reg generates programs for operations of the type '<op> ra rb'. IfTestGen_imm generates programs for operations of the type '<op> ra imm4' or '<op> ra imm7'. It is up to you to choose appropriate immediate values. Remember that imm7 is sometimes signed and sometimes unsigned. 

Usage : java IfTestGen_<op type> <prog name> <op>

The third is a must better test generator, CondTestGen. It test only the four flags, not all the condition codes. You can either run it with the 15 pairs of small values (no option needed) or with the max or min value in r0.

Usage : java CondTestGen <prog name> <op> <options : min/max>