nexus-am/tests/countertest
Xu, Zefan 5b34ea9384 countertest: update README 2024-05-30 13:22:05 +08:00
..
include countertest: support counter-write test 2024-05-30 12:30:49 +08:00
src countertest: setup pmp before test 2024-05-30 13:14:21 +08: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.