-
Notifications
You must be signed in to change notification settings - Fork 94
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
Question about Trigger Match Control Type6 CSR's "match" field function #1057
Comments
You're right. The Spike code looks wrong. It seems like it should be something like If I want to match when value[1:0]=3 then I need to program tdata2=0x0000000300000003 where [31:2] must be 0 according to the spec. If I have non-zero in [31:2] like 0x00000003DEADBEEF then the trigger cannot possibly match. The Spike bug was probably never caught because nobody programmed the trigger in this way that made it impossible to match. |
Got it. |
I doubt this code was ever tested, and this change isn't tested either, because OpenOCD doesn't use this trigger type. This problem was reported in riscv/riscv-debug-spec#1057
I doubt this code was ever tested, and this change isn't tested either, because OpenOCD doesn't use this trigger type. This problem was reported in riscv/riscv-debug-spec#1057
Hi All,
I have a question about the mc6 trigger CSR's match field.
When I read the "match" field function, I think the compare formula should be like below if I config match=5.
"results=((compare_value[63:32]&tdata2[63:32])==(tdata2[31:0]))"
But the SPIKE code shows the tdata2[31:0] also ANDed with tdata[63:32], which seems mismatch with SPEC(Because I think the SPEC doesn't say the tdata2[31:0] should ANDed with tdata2[63:32])
the SPIKE code copied below,from https://github.com/riscv-software-src/riscv-isa-sim/blob/master/riscv/triggers.cc
the same question is also existed for match=4、5、12、13.
Could anyone help me explain the SPEC description ?
Best regards,
Micreven
The text was updated successfully, but these errors were encountered: