-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ebreak compliance test make no sense on machine mode softcore ? #12
Comments
I would agree, but then we could start a long discussion about the "minimal" requirements. I would say implementing "mscratch" CSR is also not needed to pass the RV32I ISA tests, but well the tests use it. Your point about native handling of ebreak makes sense of course. But we can not go from the prospective that only things that "make" sense are needed and will be tested. If you have a design that passes EVERYTHING else and fails on ebreak because of "native" handling, I guess the judges would accept that as exception, if properly documented by you. |
Based on the new official FAQ it seems that you actually have to pass EBREAK testing. |
Unfortunatly ^^ |
Are you talking about https://github.com/riscv/riscv-compliance/blob/master/riscv-test-suite/rv32i/src/I-EBREAK-01.S ? |
Yes ^^ |
Isn't that just like any other trap instruction? |
@AnttiLukats - I agree that the RV32I ISA tests requiring the CSR registers isn't weird. Maybe someone should send them patch to make them unneeded? |
Yes it is exactly ilike a ecall, except the mcode is different.
|
While I doubt it would be /actually/ accepted to use something else - it's really only implied that you need to use the standard RISCV binutils assembler... There doesn't look to be any rules against post processing the binary while loading or embedding in your Verilog from what I can see? The FAQ mentions that doing soft implementations of less used instructions by trapping is allowed too... |
haha, post processing.. no I would say it is prohibited. The FAQ is very close to nonsense, it is possible to comply to the rules as original rules but it is not possible to comply to the FAQ any more. |
Please explain? |
explain what? that post processing is not OK, or that FAQ makes rules nonsense? if TRAP is OK, then the tests would NOT PASS. So either the rules in original form apply or the FAQ changes them. The test cases write mtvec - so they will use their own trap handler that DOES NOT emulate anything. hence without modififying the test case sources, the test cases can no longer pass (if trap emulation is ok by the faq) |
Have your CPU trap to The code doing the emulation at This can be 100% transparent to the running code - it just looks like your CPU is just really slow at trapping? Why wouldn't something like that work? |
you can CHEAT many ways 1 you could leave CSRxxx instructions as illegal and trap to hard coded trap, then you can grab the writes to mtvec CSR both would be cheating and violation - the test cases DO WRITE to mtvec ! and they should run also if compiled to memory space that does not include your hard coded trap handler address - if the CPU is compliant it would work, the test case sets mtvec and traps and tests everything |
The contest rules explicitly state;
The FAQ also says;
I would say they are explicitly looking for how far you can push things while not exposing the implementation details. It doesn't matter what goes on "behind the curtain" as long as all there are no visible changes in the output. |
Currently, the softcore has to pass the ebreak complience test, but I don't see any sense in this for a softcore which only implement the machine mode / without linux.
Also, it has the side effect of not don't allowing some debugging architecture where the ebreak instruction is natively handled by a debug module into the CPU. (ex : VexRiscv debug module)
The text was updated successfully, but these errors were encountered: