Question about riscv-tests and asm-test #3357
-
I'm trying to understand how Rocket-chip uses riscv-tests to test instruction sets. "*. S" uses RVTEST_PASS and RVTEST_FAIL to indicate whether the test was successful. But I'm confused about the execution details of these two macros. How rocket-chip testbench(Testdriver) monitor the test result through these two macro? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is done via an interface called Host-Target Interface (HTIF). It is implemented in rocket-chip, spike, pk, riscv-tests and many others so it is the de facto standard. ucb-bar/riscv-sodor#13 (comment) said it should disappear soon. But AFAIK the only equivalent thing is semihosting and I think the semihosting spec is far from mature. Besides these spec stuffs, the summary of the HTIF is that, with a Specifically, for rocket-chip, in emulator.cc, the elf will be loaded by Then dtm_t will monitor the
As for this, the ecall interface is a generic interface. If you are baremetal, then see Which will directly write to As for virtual memory, things are handled in |
Beta Was this translation helpful? Give feedback.
This is done via an interface called Host-Target Interface (HTIF). It is implemented in rocket-chip, spike, pk, riscv-tests and many others so it is the de facto standard.
ucb-bar/riscv-sodor#13 (comment) said it should disappear soon. But AFAIK the only equivalent thing is semihosting and I think the semihosting spec is far from mature.
Besides these spec stuffs, the summary of the HTIF is that, with a
.tohost
section inside theelf
, the loader (riscv-fesrv) of the elf (e.g. inside the vcs emulator) will know where to monitor, and once the software write something to.tohost
, fesrv will know it and d…