Hazard3/test/sim/sw_testcases
Luke Wren 3fe0d92d41 Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
..
.gitignore Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
Makefile Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
Readme.md Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
amo_smoke.c Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
amo_smoke.expected_output Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
amo_smoke.gtkw Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
amo_timer_irq.c Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
amo_timer_irq.gtkw Illegal instruction test 2021-12-10 00:11:18 +00:00
cleantests Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
ebreak.c Add ebreak size/alignment test 2021-12-11 11:17:24 +00:00
ebreak.expected_output Add ebreak size/alignment test 2021-12-11 11:17:24 +00:00
ecall_simple.c Add instruction access fault testcase 2021-12-11 09:54:00 +00:00
ecall_simple.expected_output Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
ecall_simple.gtkw Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
hellow.c Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
hellow.expected_output Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
illegal_instr.c Add instruction access fault testcase 2021-12-11 09:54:00 +00:00
illegal_instr.expected_output Illegal instruction test 2021-12-10 00:11:18 +00:00
instr_access_fault.c Add instruction access fault testcase 2021-12-11 09:54:00 +00:00
instr_access_fault.expected_output Add instruction access fault testcase 2021-12-11 09:54:00 +00:00
load_misalign_halfword.c Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
load_misalign_halfword.expected_output Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
load_misalign_word.c Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
load_misalign_word.expected_output Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
lr_sc_smoke.c Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
lr_sc_smoke.gtkw Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
runtests Consolidate openocd and bin-load testbenches 2021-12-11 09:46:38 +00:00
store_misalign_halfword.c Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
store_misalign_halfword.expected_output Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
store_misalign_word.c Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
store_misalign_word.expected_output Add load/store alignment testcases 2021-12-11 12:53:37 +00:00
wfi_loop.c Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00
wfi_loop.expected_output Add test script to make it easier to add software testcases 2021-12-09 22:25:18 +00:00

Readme.md

Software Testcases

A smorgasbord of software testcases for various features and cases that aren't well-covered by upstream tests such as riscv-arch-test, the riscv-test end-to-end debug tests or riscv-formal. Each test consists of one C file.

Some tests have an expected text output associated with them -- the test passes if this text output matches, and main() exits with a zero return code. Other tests are completely self-checking, reporting pass/fail only with the return code from main(). This means there is no point running these tests if the processor is in a fundamentally broken state (e.g. doesn't pass ISA compliance) and can't be trusted to check itself.

To run the tests:

./runtests

This will first rebuild the simulator (../tb_cxxrtl/) if needed, then build and run all the software testcases, then print out a summary of test pass/fail status. The ./run_tests executable itself returns a successful exit code if and only if all tests passed. A VCD trace and printf log will be created for each test, with the same name as the test, for debugging failures.

To clean up the junk:

./cleantests