vivado-debug
Use this skill when the user needs help with Vivado in-system debugging, hardware programming, or debug core configuration. This includes ILA (Integrated Logic Analyzer) configuration and trigger strategies, VIO (Virtual I/O) usage for signal monitoring and control, JTAG-to-AXI Master for AXI transaction generation, mark_debug attribute and debug probing flows (Netlist Insertion, HDL Instantiation), Set Up Debug Wizard, ILA cross-trigger architecture, debug core timing impact and mitigation, Vivado Hardware Manager operation, FPGA/SoC device programming, Versal debugging architecture (AXI4 Debug Hub, CIPS integration), SVF file programming, debug clock requirements, and common debug error troubleshooting. This skill provides debugging strategy and decision-making knowledge — for TCL command execution use vivado-tcl, for implementation strategies use vivado-impl, for timing analysis use vivado-analysis.
adeleempurpled290 · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add adeleempurpled290/FPGA-Agent-skills --skill vivado-debug技能说明
name: vivado-debug description: Use this skill when the user needs help with Vivado in-system debugging, hardware programming, or debug core configuration. This includes ILA (Integrated Logic Analyzer) configuration and trigger strategies, VIO (Virtual I/O) usage for signal monitoring and control, JTAG-to-AXI Master for AXI transaction generation, mark_debug attribute and debug probing flows (Netlist Insertion, HDL Instantiation), Set Up Debug Wizard, ILA cross-trigger architecture, debug core timing impact and mitigation, Vivado Hardware Manager operation, FPGA/SoC device programming, Versal debugging architecture (AXI4 Debug Hub, CIPS integration), SVF file programming, debug clock requirements, and common debug error troubleshooting. This skill provides debugging strategy and decision-making knowledge — for TCL command execution use vivado-tcl, for implementation strategies use vivado-impl, for timing analysis use vivado-analysis.
Vivado Programming & Debugging Guide
Based on UG908 (v2025.2). This skill helps choose debug strategies, configure debug cores, and troubleshoot hardware debugging. For complete command syntax, see REFERENCE.md. For TCL execution, use vivado-tcl.
Debug Core Selection
Choose debug cores based on what you need to observe or control:
| Debug Core | Version | Purpose | Key Capability |
|---|---|---|---|
| ILA (Integrated Logic Analyzer) | v6.2 | Trigger on events and capture data at system speeds | Waveform capture, advanced triggers, storage qualification |
| VIO (Virtual Input/Output) | v3.0 | Monitor or control signals at JTAG scan rates | Real-time signal read/write, no waveform capture |
| JTAG-to-AXI Master | v1.2 | Generate AXI transactions to interact with AXI slave cores | Read/write AXI Full and AXI Lite interfaces |
| ILA Cross-Trigger | (ILA feature) | Synchronize triggers between ILA cores or between ILA and processor | Cross-clock-domain trigger coordination |
Decision guide:
Need to capture signal waveforms at full speed?
YES --> ILA
NO --> Need to read/write signals in real-time?
YES --> VIO (low bandwidth, JTAG rate)
NO --> Need to read/write AXI slave registers?
YES --> JTAG-to-AXI Master
NO --> Need to coordinate triggers across clock domains?
YES --> ILA with Cross-Trigger enabled
Debug Probing Flow Selection
Four approaches to add debug cores, each with different trade-offs:
| Scenario | Flow | How It Works | Best For |
|---|---|---|---|
| Tag signals in HDL, use wizard later | mark_debug + Netlist Insertion | Add mark_debug attribute in VHDL/Verilog. After synthesis, use Set Up Debug wizard to insert ILA cores. | Flexibility to enable/disable debug without HDL changes |
| Mark signals in synthesized netlist GUI | GUI Mark Debug | Right-click nets in Netlist/Schematic views and select Mark Debug. Use Set Up Debug wizard. | Quick signal selection without modifying source code |
| Automated scripted flow | TCL Automation | Use set_property to set mark_debug, then create_debug_core / connect_debug_port TCL commands. | Repeatable, version-controlled debug insertion |
| Full control in HDL source | HDL Instantiation | Manually instantiate ILA/VIO/JTAG-to-AXI Master IP in HDL and connect to signals. | Per-probe comparator control, cross-trigger ports, VIO cores |
mark_debug Attribute
Vivado Synthesis Syntax
Verilog:
(* mark_debug = "true" *) wire [7:0] char_fifo_dout;
VHDL:
attribute mark_debug : string;
attribute mark_debug of char_fifo_dout: signal is "true";
Valid values: "TRUE" or "FALSE" (the "SOFT" value is not supported by Vivado synthesis).
config_flows -mark_debug Modes
Control MARK_DEBUG behavior post-synthesis without modifying source files:
| Mode | Synthesis Behavior | Implementation Behavior | Use When |
|---|---|---|---|
enable (default) | Do not optimize MARK_DEBUG nets | Do not optimize MARK_DEBUG nets | Active debugging, need nets preserved |
disable | Freely optimize | Freely optimize | Production build, remove all debug overhead |
synthesis_only | Do not optimize (nets available at start of impl) | Freely optimize during impl | Want debug net availability but allow impl optimization |
Debug Net Icons in Vivado IDE
Hollow green icon = MARK_DEBUG set, NOT connected to any ILA core
Full green icon = MARK_DEBUG set, connected to an ILA core
Yellow icon = No MARK_DEBUG on net, but connected to an ILA core
ILA Configuration Decisions
Data Depth Selection
The C_DATA_DEPTH property controls how many samples the ILA stores. Larger depth consumes more Block RAM:
| C_DATA_DEPTH | Samples | BRAM Impact | Recommended Use |
|---|---|---|---|
| 1024 (default) | 1K | Low | Initial debug, quick trigger verification |
| 2048 | 2K | Low-Medium | Short protocol sequences |
| 4096 | 4K | Medium | Typical protocol debug |
| 8192 | 8K | Medium-High | Longer event sequences |
| 16384 | 16K | High | Multi-phase protocol analysis |
| 32768 | 32K | High | Rare event capture with large pre/post-trigger window |
| 65536 | 64K | Very High | Extended capture, ensure BRAM budget allows |
| 131072 | 128K | Very High | Maximum capture depth, significant resource cost |
Rule of thumb: Start with 1024. Increase only when you need more pre/post-trigger context. Each doubling roughly doubles BRAM usage per probe bit.
Key ILA Properties Decision Table
| Property | Default | Set to TRUE When | Impact |
|---|---|---|---|
| C_ADV_TRIGGER | false | Need state-machine-based triggers, counter triggers, or range triggers | Adds trigger logic resources |
| C_EN_STRG_QUAL | false | Need basic capture control (filter which samples are stored) | Uses 1 comparator for capture control |
| C_INPUT_PIPE_STAGES | 0 | Timing violations on ILA probe inputs; increase to 1-6 | Adds FF pipeline stages, improves timing at cos |