Expand mcontrol6.hit into hit0 and hit1, and remove mcontrol6.timing.#795
Conversation
cd528eb to
94b837f
Compare
|
I haven't thought through all the implications but here are some initial questions/comments:
This is a nontrivial change so I still want to think about it. |
|
I like the idea of this PR. We generally prefer triggers fire before the instruction to give the user more insight, and we allow firing after for cases where the triggers cannot fire before. Additionally, the debugger can understand whether the instruction is executed by reading the tdata1 CSR. I can provide a PR of hit0 and hit1 for Spike after approval of this PR. (minor typo: "It they are implemented..." -> "If they are implemented...") |
94b837f to
edaabc3
Compare
I would expect that in a given implementation the trigger fires when it fires, and the timing is suggested by the table. I suppose an implementation could fire at a different time depending on the action, but that seems like added complexity with no benefit.
I would like implementation to be clear on whether the trigger hit immediately after, or later. That seems the most useful to a user. Otherwise everyone will just report the vague after and the distinction is lost. Is it onerous to have to report the distinction?
hit0/hit1 are WARL, so I think that is allowed.
Done.
It's back.
I think it makes things a little more fuzzy, but ultimately probably simpler. Now it seems possible that someone decides to implement chains of instruction address before + load value after, which previously were prohibited (because timing didn't match). What happens when a debugger sets a chain that can never fire because of hardware limitations? Or that can fire on some instructions but not on others? |
|
Paul Donahue (@pdonahue-ventana) What do you need to feel good about this PR? More discussion in the mailing list/meeting? I want to get this going, since it affects some of e.g. the vector discussion. |
edaabc3 to
2ef49d0
Compare
|
I'm OK with this in principle. Just wordsmithing. |
This lets an implementation be more specific about when a trigger fired in relation to the instruction that matched, to avoid user confusion when triggers fire late.
2ef49d0 to
0b7960b
Compare
Paul Donahue (pdonahue-ventana)
left a comment
There was a problem hiding this comment.
Perfect!
This was an awkward way to let the hardware know what it supports, and it breaks down with load before triggers and AMOs. 2-bit hit is a much better solution. This simplifies a bunch of language, too, and makes it more clear that timing is best-effort.
0b7960b to
9244505
Compare
Not quite. I just pushed some more tweaks. |
|
The latest version still looks good. |
This bit used to be used to request/acknowledge trigger timing information. This change ensures triggers that implements the spec before #795 will still work.
|
I haven't followed all the details here, but I'm wondering whether the same effect here can be achieved without introducing a backwards incompatibility with earlier The currently-specified behavior is: I think that the before/after encoding here is redundant, because that is already reported by the So the same information can be derived without backwards-incompatibility and with consistent meaning of "hit" in all implementations, whether or not they support the Thanks. |
|
Ok, I think I see: the timing field is only a recommendation, not a requirement, so cannot be relied upon to determine actual timing. |
And also I hope to remove the timing bit in #807. |
This lets an implementation be more specific about when a trigger fired in relation to the instruction that matched, to avoid user confusion when triggers fire late.
It also simplifies the spec around desired trigger timing behavior, simply asking for best effort to match the recommendation from the table.