ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

Sdtrig

T1 riscv feature feature
Debug triggers
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon Scopev1.0.0 (ratified)
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db

Summary

Triggers can cause a breakpoint exception, entry into Debug Mode, or a trace action without having to execute a special instruction. This makes them invaluable when debugging code from ROM. They can trigger on execution of instructions at a given memory address, or on the address/data in loads/stores.

Syntax / Encoding

Sdtrig v1.0.0 (ratified)

Reference Notes

Triggers can cause a breakpoint exception, entry into Debug Mode, or a
trace action without having to execute a special instruction. This makes
them invaluable when debugging code from ROM. They can trigger on
execution of instructions at a given memory address, or on the
address/data in loads/stores.

If Sdtrig is implemented, the Trigger Module must support at least one
trigger. Accessing trigger CSRs that are not used by any of the
implemented triggers must result in an illegal instruction exception.
M-Mode and Debug Mode accesses to trigger CSRs that are used by any of
the implemented triggers must succeed, regardless of the current type of
the currently selected trigger.

A trigger matches when the conditions that it specifies (e.g. a load
from a specific address) are met. A trigger fires when a trigger that
matches performs the action configured for that trigger.

Triggers do not fire while in Debug Mode.