✨ add new module: execution trace buffer (TRACER) #1313
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some time ago I read a blog article about the ARM embedded trace buffer (-> interrupt.memfault.com/blog/instruction-tracing-mtb-m33) and was quite excited about the concept. Hence, this PR adds a very similar module to the processor that allows for execution tracking via "instruction delta tracing".
The tracer module is configured by two new top generics:
Once started, the trace buffer collects the instruction execution flow in an internal FIFO. Older elements are automatically discarded so that the buffer only contains the last
IO_TRACER_BUFFER
instruction deltas. Tracing can be stopped manually or automatically: when a certain address is reached, the tracer stops automatically and can optionally trigger an interrupt.The trace data can be processed directly (stand-alone; no debugger required) by the processor:
Alternatively, the data can also be output and displayed directly using a GDB script: