Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Triggers

Phase 1D: Trigger Module


Spec Feature (Chapter)Vexriscv Debug ImplementationImplementation Details
Ch 5: Trigger Module (hart-side CSRs)
tselect (0x7A0)✅ ImplementedCsrPlugin.scala (lines 870-875): WARL index, parameterized debugTriggers (default 2)
tinfo (0x7A4)✅ ImplementedCsrPlugin.scala (line 878): reports type 2 (mcontrol) support
tdata1 (0x7A1)⚠️ PartialCsrPlugin.scala (lines 922-942): type=2, dmode, execute, m/s/u, action. Missing: timing, select, sizelo/hi, maskmax, chain, match, load, store, hit
tdata2 (0x7A2)✅ ImplementedCsrPlugin.scala (lines 944-953): 32-bit compare value, PC equality match
tdata3 (0x7A3)❌ Not implemented
tcontrol (0x7A5)❌ Not implementedNo mte/mpte
Trigger type⚠️ mcontrol (type 2) onlyLegacy type 2, not type 6 (mcontrol6). Spec recommends type 6 for new implementations
Match modes⚠️ Equal onlyOnly match=0 (equality). No napot, >=, <, mask modes
Match targets⚠️ Execute address onlyOnly execute bit implemented. No load/store data/address match
Privilege filtering✅ Implementedm, s, u bits with privilegeHit logic (lines 930-934)
dmode security✅ Implementeddmode bit controls debug-only write access (line 925)
action field⚠️ PartialRegister exists but only action=1 (enter debug) used in match logic
Trigger chaining❌ Not implementedNo chain bit
dcsr.cause=2 on trigger✅ ImplementedCsrPlugin.scala (line 892): sets dcsr.cause := 2 on trigger hit
Trigger hit → debug entry✅ ImplementedCsrPlugin.scala (lines 881-897): decodeBreak halts pipeline, enters debug mode
mcontrol6 (type 6)❌ Not implementedOnly legacy type 2 exists
icount (type 3)❌ Not implemented
itrigger/etrigger/tmexttrigger❌ Not implemented
Hardware breakpoints⚠️ Spec-compliant but limitedType 2 mcontrol with execute address match=0 only, privilege filtering, dmode security
mcontext/scontext❌ Not implemented
SoC Integration
DTM→DM→Hart wiring✅ ImplementedDebugModuleFiber.scala — multi-hart binding, clock-domain-safe pipelining
Tilelink SBA bridge✅ ImplementedmakeSysbusTilelink() in DebugModuleFiber