36 lines
1.6 KiB
Text
36 lines
1.6 KiB
Text
This directory contains Perl scripts that provide comprehensive
|
|
regression testing of the different Y86-64 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/psim).
|
|
-i Test the iaddq instruction
|
|
|
|
You can use make to run all four test programs. Options to make include:
|
|
|
|
SIM=simfile
|
|
TFLAGS=<any flags you want to give to the testing scripts>
|
|
|
|
For example, you could say:
|
|
make SIM=../pipe/psim TFLAGS=-i
|
|
to test the pipeline simulator including the iaddq instruction. (Note that
|
|
this test will fail for the default implementation of pipe, since it does
|
|
not implement the iaddq instruction.)
|
|
|
|
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.
|