I'm running test cases randomly generated by Google's riscv-dv on the sail-riscv c_emulator model.
It runs a few thousand instructions and then dies:
[2399] [M]: 0x00000000800016BC (0x1D73222F) sc.w.aq tp, t1, s7
Sail exception!Exiting due to uncaught exception
How can I tell what this "uncaught exception" is referring to? I can't find anything in the c_emulator/* that would tell me anything more than have_exception.
When I run the same code on the ocaml emulator, I see:
[2399] [M]: 0x00000000800016BC (0x1D73222F) sc.w.aq tp, t1, s7
reservation: 0x000000008001E000, key=0x000000008001E000
Error: Not implemented: sc.aq
Which is a nice clear error message.
How can I find that same message when running the C model?
I see this struct zexception in the generated C code, but I'm not sure how I can access that struct from within riscv_sim.c. That struct is not defined in any header file, and since riscv_sim.c is compiled separately, it can't see it.
I'm running test cases randomly generated by Google's riscv-dv on the sail-riscv c_emulator model.
It runs a few thousand instructions and then dies:
How can I tell what this "uncaught exception" is referring to? I can't find anything in the
c_emulator/*that would tell me anything more thanhave_exception.When I run the same code on the ocaml emulator, I see:
Which is a nice clear error message.
How can I find that same message when running the C model?
I see this
struct zexceptionin the generated C code, but I'm not sure how I can access that struct from withinriscv_sim.c. That struct is not defined in any header file, and sinceriscv_sim.cis compiled separately, it can't see it.