The RISC-V external-debug front end your first silicon needs on the bench
The Zen Debug subsystem is the standard way an OpenOCD-class host debugger takes control of a RISC-V design: an IEEE 1149.1 JTAG TAP / DTM that carries a debugger's scans in over four wires, and a RISC-V Debug 1.0 Debug Module that turns those scans into hart halt/resume/reset, register access, and memory access. It is the first block first silicon needs on the bench — the path by which everything else is halted, inspected, and loaded. Product / integrator view; every number is sourced from the as-built RTL or marked TBC with an owner.
1. The subsystem in one paragraph
The Zen Debug subsystem implements the full JTAG → DTM → DMI → DM → hart chain on-chip, in two composable sub-blocks. The JTAG TAP / DTM drives a standard 16-state 1149.1 controller off four JTAG wires, exposes a 5-bit instruction register (BYPASS / IDCODE / DTMCS / DMI), and acts as a DMI master — when the debugger selects the DMI instruction, each data scan carries a single {address, data, op} register transaction. The Debug Module is the DMI slave on the other side: a RISC-V Debug 1.0 register file that drives hart halt / resume / reset, runs an abstract Access-Register engine to read and write GPRs and CSRs, and owns a 32-bit system-bus master that reads and writes memory directly — with address autoincrement to stream a firmware image into RAM. A host drives the pins; the subsystem reaches the hart over a clean, defined CPU-debug interface and owns everything on the debugger's side of it.
- TAP/DTM + Debug Module (the subsystem)
- host debugger / hart / memory
sbautoincrement to stream one data scan per word rather than re-sending the address.2. What it is, at a glance
| Element | Detail | Default | Status |
|---|---|---|---|
| JTAG interface | 4-wire (TCK/TMS/TDI/TDO) + async TRST, per IEEE 1149.1 | — | exists |
| TAP controller | standard 16-state 1149.1 FSM | 16 | exists |
| Instruction register | 5-bit; BYPASS / IDCODE / DTMCS / DMI | 5-bit | exists |
| IDCODE | 32-bit device identity, parameterised | 0x00000001 | exists |
| DMI transaction | {data, addr, op} register scan | 41-bit | exists |
| Debug Module | RISC-V Debug 1.0 register file (dmcontrol…sbdata0) | — | exists |
| Hart control | halt / resume / hart-reset / ndmreset, dmactive-gated | — | exists |
| Abstract commands | Access-Register (GPR/CSR), two abstract-data words | datacount 2 | exists |
| System-bus access | 32-bit master; byte/half/word; address autoincrement | 32-bit | exists |
| Program Buffer / multi-hart / trace | roadmap extensions | — | TBC |
| Max TCK / clock frequency | characterization downstream | TBC | TBC |
Sources: Zen Debug product datasheet; as-built RTL.
3. How a client uses it
- Attach and identify — drive the four JTAG wires from an OpenOCD-class host, read IDCODE to confirm the scan chain, read DTMCS to confirm the DTM and its address width.
- Take control — write
dmcontrolover DMI to halt the hart and polldmstatusfor the halted/running/available projection before boot code runs. - Inspect and patch state — read and write GPRs and CSRs with abstract Access-Register commands (data moves through the abstract-data words); read and write memory over the system-bus master.
- Load and launch — stream a firmware image into RAM with system-bus autoincrement, then release the hart from reset to run it — no on-chip loader required.
4. Verification & provenance
- Compliance coverage: 17 of 17 assertion-based tests PASS — 6 on the JTAG TAP / DTM (reset, IDCODE, BYPASS, DTMCS, DMI read/write) and 11 on the Debug Module (register round-trip, halt/resume, abstract read/write, system-bus read/write/autoincrement, busy-collision semantics).
- Standards: IEEE 1149.1 TAP FSM, mandatory BYPASS, IR-capture LSB, and falling-edge TDO all verified compliant; RISC-V Debug 1.0 DTM, DM register offsets, abstract Access-Register, and system-bus access all verified compliant. Synthesis is latch-free (no inferred latches).
- Delivered as a verified, license-ready IP kit (TAP/DTM core, Debug Module, compliance testbenches, verification IP) compliant to RISC-V Debug 1.0 and IEEE 1149.1; conformance certification of the integrated SoC remains the licensee's responsibility.
Sources read
Sources: Zen Debug product datasheet (overview, features & compliance, applications, functional overview, performance, verification & deliverables, ordering & licensing); as-built RTL.