riscv-non-isa/riscv-trace-spec

What priority is trigger action?

larryrong opened this issue · 1 comments

Hello,

3 actions are defined in chapter 3.2.4 Using trigger outputs from the Debug Module.

Triggers fire simultaneously actions such as trace-on and trace-notify.
What action will fire? or give me a priority order for firing action at the same time.

Thanks,
Larry

Larry, thanks.

On traces from the cycle it is asserted, and off stops tracing after the cycle it is asserted. So if both are asserted together you get all instructions from that one cycle traced
Notify ensures that the final instruction in the block retired that cycle gets explicitly traced (i.e address reported).
In the case where on and off are also active, the 1st and last instructions will be reported anyway so the notify has no explicit effect.
If on and notify are on together, the on will report the 1st instruction from that cycle and the notify the last (for single retirement there is only 1 so the notify does nothing)
If off and notify are on together, the notify does nothing as the off will ensure the last instruction retired is reported anyway