This directory contains Perl scripts that provide comprehensive testing
of the different Y86 simulators.  There are four basic test types, implemented
as four different scripts:

	optest.pl:	Tests each individual instruction type
	jtest.pl:	Tests all of the jump types under different conditions
	ctest.pl:	Tests different pipeline control combinations
	htest.pl:	Tests many different hazard possibilities
			This involves running 864+ tests, so it takes a while.

Each of the tests has the following optional arguments:
	-s simfile	Use simfile as simulator (default ../pipe/pipe_tty).
	-i		Test the iaddl instruction
	-l		Test the leave instruction
	-p perffile	Compare performance data with that achieved by
			official solution in specified file

You can use make to run all four test programs.  Options to make include:

	SIM=simfile
	TFLAGS=<any flags you want to give>
	VERSION=version of simulator you are using (for performance evaluation)

For example, you could say:
	make SIM=../pipe/pipe_tty TFLAGS=-il
to test the pipeline simulator including both the iaddl and leave instructions,
or:
	make ptest SIM=../pipe_tty VERSION=full TFLAGS=-il
to check the performance of the pipeline that implements both
the iaddl and leave instructions.

When the test program detects an erroneous simulation, it leaves the
.ys file in the directory (ordinarily it deletes the test code it
generates).  You can then run a simulator (the GUI version is
especially helpful here) on one of these failing cases.  Suppose the
failing test is in file bad-test.ys.  Then you can execute "make
bad-test.yo" to create the object code, and simulate it with one of
the simulators.

Note that the standard test code only detects functional bugs, where the
processor simulation produces different results than would be
predicted by simulating at the ISA level.  

To test for performance bugs, you should run "make ptest" as described above.

