Skip to content
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

Multiple mcontrol6 triggers match on same instruction with different actions and timings #1043

Open
tomaird opened this issue Jun 5, 2024 · 1 comment

Comments

@tomaird
Copy link

tomaird commented Jun 5, 2024

I have a question about how mcontrol6 triggers should act in the following scenario:

  • We have a memory instruction - e.g. a load, which is executed at PC 0x10 and loads from memory address 0x20
  • Trigger 0 is set to exact match on address 0x10 (execute), with action Breakpoint exception (0)
  • Trigger 1 is set to exact match on address 0x20 (load), with action Enter debug mode (1)

Also assuming we are trying to do "before" timing, precisely.

The spec is clear what should happen if both actions were Breakpoint exception - Trigger 0 would fire first, as defined in the table in Section 5.3 (Priority). Instruction address breakpoint from execute address before has higher priority than Load address breakpoint from load address before. But this table only applies to synchronous exceptions, not debug mode entry.

There is also discussion below that table on what should happen if two triggers of the same priority fire at once, for various actions. But based on the above table, it cannot be assumed that these two triggers have the same priority, so it doesn't necessarily apply

I understand that a lot of this behaviour around timings and priorities is implementation defined, but it would be useful to get some input on the intention or recommended solution for this scenario.

@pdonahue-ventana
Copy link
Collaborator

I think that "synchronous exception" in that table really means things that cause either a synchronous trap or a synchronous halt. It's everything except for interrupts, haltreq, tmexttrigger firing, and any other asynchronous things. All triggers with action=0 and action=1 are treated the same for purposes of that table, though maybe that should be clarified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants