nexus-am/tests/countertest
Xu, Zefan 91f7a347be fix(countertest): incorrect type for test_counter_inhibit 2024-09-10 12:23:30 +00:00
..
include countertest: support counter-write test 2024-05-30 12:30:49 +08:00
src fix(countertest): incorrect type for test_counter_inhibit 2024-09-10 12:23:30 +00:00
Makefile countertest: initial commit for the test framwork 2024-05-27 21:53:23 +08:00
README.md countertest: update README 2024-05-30 13:22:05 +08:00

README.md

Counter Test

This program provides a self-test for the counter CSRs, testing the following features:

  • reading and writing mcycle, mtime(no write), minstret, mhpmcounter3 - mhpmcounter31.
  • reading cycle, time, instret, hpmcounter3 - hpmcounter31, and corresponding permission check according to mcounteren, hcounteren, and scounteren.
  • Functionality of mcountinhibit.

This program provides a simple framework for privilege mode switching and expected exception capture, which could be applied to other test programs.

How-to

In tests/countertest, run

make ARCH=riscv64-xs

You will get countertest-riscv64-xs.bin in tests/countertest/build.

This program would HIT GOOD TRAP if there were no fatal error.