Design for Debug

Design-for-Debug (DfD) Infrastructure is the set of on-chip hardware structures (trace buffers, trigger logic, performance counters, and debug buses) built into a chip to enable post-silicon debugging of functional bugs, performance issues, and system-level integration problems — providing visibility into internal chip state that would otherwise be invisible after the chip is packaged, where the investment of 3-5% die area for debug infrastructure can save months of debug time and prevent costly re-spins caused by undiagnosed silicon bugs.

Why DfD Is Essential

  • Pre-silicon simulation: Covers <1% of possible states → bugs remain.
  • First silicon: ~50-80% of chips have bugs requiring debug.
  • Without DfD: Bug manifests as incorrect output → no visibility into why → weeks/months of guesswork.
  • With DfD: Trigger on condition → capture internal signals → root cause in days.

DfD Components

ComponentWhat It DoesOverhead
Trace bufferRecords internal signals over time0.5-2% area (SRAM)
Trigger logicDetects specific events/conditions0.1-0.5% area
Debug bus/MUXRoutes selected signals to trace0.2-1% area + wires
Performance countersCount events (cache misses, stalls, etc.)0.1-0.3% area
JTAG/debug portExternal access to debug infrastructureMinimal
Bus monitorSnoop on-chip bus transactions0.2-0.5% area

Trace Buffer Architecture

Internal signals (hundreds)
         ↓
 [Debug MUX] ← selects which signals to observe (programmable)
         ↓
 [Compression] ← optional: compress trace data
         ↓
 [Trigger Unit] ← start/stop capture on event match
         ↓
 [Trace SRAM] ← stores last N cycles of selected signals
         ↓
 [JTAG readout] → off-chip analysis
  • Trace width: 64-256 bits (selected from thousands of internal signals).
  • Trace depth: 1K-64K entries → records 1K-64K cycles of history.
  • Trigger: Programmable match on address, data, FSM state → start/stop capture.
  • Post-trigger: Capture N cycles after trigger → see events after bug condition.
  • Pre-trigger: Circular buffer → see events leading up to bug.

Trigger Logic

Trigger TypeWhat It Detects
Address matchSpecific memory address accessed
Data matchSpecific data value on bus
Event sequenceEvent A followed by Event B within N cycles
Counter thresholdCache miss count exceeds limit
WatchpointWrite to protected memory region
Cross-triggerTrigger from another IP block

Performance Counters

  • Programmable counters that count hardware events.
  • Events: Cache hits/misses, branch predictions, pipeline stalls, bus transactions.
  • Software reads counters via performance monitoring unit (PMU) registers.
  • Use: Performance profiling (perf, VTune), power estimation, workload characterization.
  • Typical: 4-8 programmable counters per core + fixed counters for cycles/instructions.

Debug Modes

ModeMechanismSpeedUse Case
JTAG scanStop clock, shift out stateVery slow (KHz)Full state dump
Trace captureRecord at speed, read out laterFull speedRace conditions, timing bugs
Logic analyzer (ATE)External probeNear-speedManufacturing debug
Software debug (breakpoint)CPU halts at addressFull speed until breakFirmware debug

Area and Power Trade-off

  • Trace SRAM: 32KB trace buffer → ~0.03mm² at 5nm → acceptable.
  • Debug MUX and trigger: ~0.5-1% of block area.
  • Power: Debug infrastructure can be clock-gated when not in use → zero active power.
  • Trade-off: 3-5% total area overhead → saves weeks of debug time + potential re-spin ($10M+).

Design-for-debug infrastructure is the insurance policy that makes first-silicon bring-up feasible within weeks instead of months — without trace buffers, trigger logic, and performance counters, post-silicon debugging of subtle functional bugs and performance anomalies would require blind guessing from external observations alone, making DfD one of the most cost-effective investments in the entire chip design process.

Take design for debug further

Ask the copilot about this term, or have our engineers assess it against your process.