-
Notifications
You must be signed in to change notification settings - Fork 43
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
rv64i_m ebreak.S - DUT and Ref run different test programs #115
Comments
@Peter-Herrmann Thanks for your detailed explanation, it's helping me debug my own issues immensely. The I looked inside your zip; it looks like your SAIL plugin is a copy of the one provided by the neorv32 RISCOF plugin. In that plugin as well as the neorv32 plugin proper are the following lines:
In your zip file, only the SAIL plugin has these lines; they're absent from your Lucid64 plugin. This results in different masks, and I'm guessing is the reason your DUT and ref diverge. With that said, I would've figured that cc: @stnolting: Did you ever get feedback from anyone working on RISCOF, the arch-tests, or the config parser on whether adding define overrides is the correct way to change the |
I am running an RV64IMZicsr_Zifencei DUT against SAIL and I am struggling to understand why the elf's generated for the Ref and DUT differ on this single instruction:
This section of code checks
mcause
against a mask,0xB0FB
or0xB0F3
.mcause
value is set (i.e 3rd bit formcause = 3
), then it proceeds to check ifmtval
holds the PC for the exception thrown, writing the offset from the beginning of the test to the signature file.mtval
contains zero and writes that to the signature.This behavior seems to correspond to the mtval_update config in the riscv-config, but changing this value has no effect.
Essentially what I am running into is that the Ref test executable seems to always assume that
mtval=0
afterEBREAK
(without checking), while the DUT executable expectsmtval=PC
afterEBREAK
.If I modify the DUT's elf so that this mask is the same as the instruction in the Ref's elf, the test passes, otherwise the test fails. Likewise, If I modify the Ref's elf file so that the mask matches the DUT, the test passes.
8000091c: 0fb40413
, the signatures match8000091c: 0f340413
, the signatures matchIt does not seem correct to me that the DUT and Ref could possibly have different expectations during the test like this.
My isa.yaml:
and my platform.yaml:
And here is the source for my project if needed:
rv-application-rough-RV64IMZicsr_Zifencei.zip
The text was updated successfully, but these errors were encountered: