Zen Peripherals · Debug & Bring-up · brief · 2026-11-04

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.

4-wireJTAG (TCK/TMS/TDI/TDO) + async TRST
16-stateIEEE 1149.1 TAP controller FSM
RISC-V 1.0Debug Module + DTM transport
32-bitsystem-bus master (byte/half/word, autoincr)
host debuggerOpenOCD-class JTAG TAP / DTM16-state · DMI master Debug ModuleDMI slave · Debug 1.0 hart memory 4-wire JTAG DMI halt / resume / reset 32-bit sysbus
Figure 1. The debug chain: a host debugger drives four JTAG wires into the TAP/DTM, which masters DMI register transactions into the Debug Module; the DM drives hart halt/resume/reset and reads/writes memory over a 32-bit system-bus master.
First thing on the bench. Attach a JTAG probe, read IDCODE to confirm the scan chain, then halt the hart to take control before boot code runs. BYPASS lets the TAP sit transparently in a multi-device JTAG chain, and system-bus autoincrement loads a boot image straight into RAM with no on-chip loader.
Throughput is JTAG-bound, not core-bound. The Debug Module answers a register access in a single core cycle, but end-to-end speed is set by the serial scan — the 41-bit DMI data scan is the per-access floor. Block memory transfers use sbautoincrement to stream one data scan per word rather than re-sending the address.

2. What it is, at a glance

ElementDetailDefaultStatus
JTAG interface4-wire (TCK/TMS/TDI/TDO) + async TRST, per IEEE 1149.1—exists
TAP controllerstandard 16-state 1149.1 FSM16exists
Instruction register5-bit; BYPASS / IDCODE / DTMCS / DMI5-bitexists
IDCODE32-bit device identity, parameterised0x00000001exists
DMI transaction{data, addr, op} register scan41-bitexists
Debug ModuleRISC-V Debug 1.0 register file (dmcontrol…sbdata0)—exists
Hart controlhalt / resume / hart-reset / ndmreset, dmactive-gated—exists
Abstract commandsAccess-Register (GPR/CSR), two abstract-data wordsdatacount 2exists
System-bus access32-bit master; byte/half/word; address autoincrement32-bitexists
Program Buffer / multi-hart / traceroadmap extensions—TBC
Max TCK / clock frequencycharacterization downstreamTBCTBC

Sources: Zen Debug product datasheet; as-built RTL.

3. How a client uses it

  1. 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.
  2. Take control — write dmcontrol over DMI to halt the hart and poll dmstatus for the halted/running/available projection before boot code runs.
  3. 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.
  4. 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

Endpoint debug front end, not a trace fabric. This subsystem is halt-mode debug plus register and memory access over a clean CPU-debug boundary. Instruction/data trace, a Program Buffer, abstractauto, and multi-hart selection are roadmap items — single-hart halt-mode debug is what ships today.

Sources read

Sources: Zen Debug product datasheet (overview, features & compliance, applications, functional overview, performance, verification & deliverables, ordering & licensing); as-built RTL.