About Vivado MCP
Vivado MCP is an MCP server published by mapleleavessssssss-wq in the Blockchain category: vivado MCP server — 让 Claude Code / Cursor / Codex 驱动本地 FPGA 全流程。30 个精选工具、8 个证据驱动 Prompt、doctor 环境自检、GUI/Tcl/attach 会话,以及时序和 CRITICAL WARNING 中文诊断。. Conduid read 32 tools from its source: check_bitstream_readiness, compare_xci, generate_bitstream, get_cdc_report, get_critical_warnings, get_io_report and 26 more. It is published to PyPI as vivado-mcp and runs with uvx.
The repository has 181 stars and 41 forks, is licensed Apache-2.0, and its last commit was on 2 Nov 2026. The latest release is v0.3.26 (22 Sep 2026): 本版将 FPGA 诊断与工作流升级正式打包发布:32 个 MCP 工具、11 个 Prompt、5 份 Skills。 主要变化 时序证据:支持结构化 JSON、离线报告与基线比较;修正设计阶段和烧录就绪的证据判断。 CDC 报告:新增 get_cdc_report,支持现场与离线分析,区分检查项、时钟对、明细及豁免;缺失证据保持未验证… It follows v0.3.25 (9 Aug 2026), and the 4 most recent releases go back to v0.3.23 (15 Jun 2026). It passes 4 of the 5 static checks Conduid ran on the repository; it does not pass Dependencies pinned. Its topics include eda, fpga, hardware-debugging, tcl, verilog and vivado.
Install
uvx vivado-mcppip install vivado-mcpgit clone https://github.com/mapleleavessssssss-wq/vivado-mcpTools (32)
check_bitstream_readiness检查比特流生成前的实现状态、时序摘要和严重警告。| Parameter | Type | Description |
|---|---|---|
| impl_run | string | 实现 run 名称,默认 "impl_1"。 |
| session_id | string | 目标会话 ID。 |
compare_xci对比两个 XCI 文件的 IP 配置差异。| Parameter | Type | Description |
|---|---|---|
| file_a * | string | 第一个 XCI 文件路径(如基准/正常配置)。 |
| file_b * | string | 第二个 XCI 文件路径(如待检查/异常配置)。 |
| show_all | boolean | 是否显示所有参数(默认仅显示差异)。 |
generate_bitstream生成比特流文件。在实现完成后执行。| Parameter | Type | Description |
|---|---|---|
| force | boolean | 跳过 CRITICAL WARNING 安全检查,默认 False。 |
| impl_run | string | 实现 run 名称,默认 "impl_1"。 |
| jobs | integer | 并行任务数,默认 4。 |
| session_id | string | 目标会话 ID。 |
| timeout_minutes | integer | 超时分钟数,默认 30。 |
get_cdc_report解析 CDC 报告,按时钟对、严重级别和规则计数并返回有界明细 JSON。| Parameter | Type | Description |
|---|---|---|
| max_details | integer | 返回明细上限,0..500;超过上限仍统计完整输入并明确截断。 |
| report_file | string | 可选本地原始 report_cdc -details 文本,最多 16 MiB,无需会话。 |
| session_id | string | 现场查询会话 ID。 |
get_critical_warnings提取并分类 CRITICAL WARNING / ERROR / 非标错误,统一失败诊断入口。| Parameter | Type | Description |
|---|---|---|
| compare_with_last | boolean | True 时追加一段与上次快照的差分报告(仅对综合/实现有效)。 |
| run_name | string | run / fileset 名称(如 ``synth_1`` / ``impl_1`` / ``sim_1``), 默认 ``impl_1``。``sim_*`` 走 simulation 日志诊断路径。 |
| session_id | string | 目标会话 ID。 |
| tail_n | integer | 非标错误扫描时每个日志 tail 的末尾行数,默认 50,范围 1~500。 仿真模式适用于每个 xsim 子日志。 |
get_io_report获取结构化 IO 引脚报告(JSON)。| Parameter | Type | Description |
|---|---|---|
| session_id | string | 目标会话 ID。 |
get_ip_status检查项目中所有 IP 的版本状态(哪个需要升级、哪个已锁定)。| Parameter | Type | Description |
|---|---|---|
| session_id | string | 目标会话 ID。 |
get_next_suggestion根据当前项目状态推断下一步应该做什么。| Parameter | Type | Description |
|---|---|---|
| session_id | string | 目标会话 ID。 |
get_pre_commit_summary生成一段可以贴进 git commit body 的工程摘要(时序/资源/CW)。| Parameter | Type | Description |
|---|---|---|
| impl_run | string | 用来查 runme.log 计数的 run(默认 impl_1)。 |
| session_id | string | 目标会话 ID。 |
get_project_info获取当前 Vivado 项目的综合信息(项目名 / part / 顶层 / 文件列表 / IP / run 状态)。| Parameter | Type | Description |
|---|---|---|
| session_id | string | 目标会话 ID。 |
get_run_progress查看 run 的运行进度(适合长任务等待时看"走到哪一步")。| Parameter | Type | Description |
|---|---|---|
| run_name | string | run 名称(如 "synth_1" / "impl_1"),默认 "impl_1"。 |
| session_id | string | 目标会话 ID。 |
| tail_lines | integer | 日志尾部要读多少行,默认 30。 |
get_timing_report获取结构化时序报告。| Parameter | Type | Description |
|---|---|---|
| baseline_file | string | 可选之前保存的完整 JSON 返回值路径,最多 4 MiB。 |
| output_format | string | text(默认)或 json;json 模式错误也返回 JSON。 |
| report_file | string | 可选原始时序报告路径,最多 16 MiB;不是 JSON 快照。 |
| session_id | string | 目标会话 ID。 |
get_utilization_report获取资源占用摘要(LUT/FF/BRAM/DSP/IO)。| Parameter | Type | Description |
|---|---|---|
| detail | boolean | True 时末尾附加 Block RAM 明细段(RAMB36/FIFO* / RAMB36E1 only / RAMB18 的 used/available)。默认 False,输出与原有格式一致。 |
| session_id | string | 目标会话 ID。 |
inspect_ip_params查询 IP 实例的所有配置参数(含 GUI 中隐藏的参数)。| Parameter | Type | Description |
|---|---|---|
| filter_keyword | string | 可选过滤关键词(如 "gt"、"loc"、"lane"),不区分大小写。 |
| ip_name * | string | IP 实例名称(如 "xdma_0")。 |
| session_id | string | 目标会话 ID。 |
list_sessions列出所有活跃的 Vivado 会话及其状态。parse_bit_header离线解析 .bit 比特流文件头部,无需启动 Vivado。| Parameter | Type | Description |
|---|---|---|
| file_path * | string | .bit 文件的绝对路径。 |
parse_ltx离线解析 ILA 调试探针文件(.ltx),无需连板 / 启动 Vivado。| Parameter | Type | Description |
|---|---|---|
| file_path * | string | .ltx 文件的绝对路径。 |
parse_xpr离线解析 Vivado 工程文件(.xpr),无需启动 Vivado。| Parameter | Type | Description |
|---|---|---|
| file_path * | string | .xpr 工程文件的绝对路径。 |
program_device编程 FPGA 设备。封装 open_hw_manager → connect → program 多步操作。| Parameter | Type | Description |
|---|---|---|
| bitstream_path * | string | 比特流文件路径(.bit 文件)。 |
| hw_server_url | string | 硬件服务器地址,默认 "localhost:3121"。 |
| session_id | string | 目标会话 ID。 |
| target | string | 目标设备过滤器,默认 "*"(第一个可用设备)。 |
query_waveform离线发现 VCD 信号或查询有界波形变化,返回 JSON。| Parameter | Type | Description |
|---|---|---|
| condition | object | 可选结构化条件,信号须已选中,位值为二进制字符串(可 x/z)。 {"op":"equals","signal":"top.data","value":"0001"}; {"op":"change","signal":"top.data"}; {"op":"unknown","signal":"top.data"}; {"op":"all_equals","values":{"top.valid":"1","top.ready":"1"}}。 不支持表达式、通配符或 eval;短位值按 VCD 宽度扩展。 |
| end_time | integer | 包含此时刻的结束 tick,默认读到文件末尾。 |
| file_path * | string | 本地 VCD 文件路径。 |
| max_events | integer | 1..1000,变化/条件匹配上限,发现模式用作信号上限。 |
| signals | array | 最多 32 个精确层级路径,如 top.data;为空时发现信号/层级。 |
| start_time | integer | 非负整数 VCD tick,默认 0。 |
run_implementation启动实现(布局布线);默认等待完成,也可异步提交。| Parameter | Type | Description |
|---|---|---|
| jobs | integer | 并行任务数,默认 4。 |
| run_name | string | 实现 run 名称,默认 "impl_1"。 |
| session_id | string | 目标会话 ID。 |
| timeout_minutes | integer | 超时分钟数,默认 60。 |
| wait | boolean | True 等待完成并诊断;False 启动后立即返回 job_id。 |
run_synthesis启动综合;默认等待完成,也可异步提交后查询状态。| Parameter | Type | Description |
|---|---|---|
| jobs | integer | 并行任务数,默认 4。 |
| run_name | string | 综合 run 名称,默认 "synth_1"。 |
| session_id | string | 目标会话 ID。 |
| timeout_minutes | integer | 超时分钟数,默认 30。 |
| wait | boolean | True 等待完成并诊断;False 启动后立即返回 job_id。 |
run_tcl执行任意 Vivado Tcl 命令。支持所有 Vivado Tcl API。| Parameter | Type | Description |
|---|---|---|
| command * | string | Tcl 命令文本(支持多行)。 |
| session_id | string | 目标会话 ID,默认 "default"。 |
| timeout | integer | 命令执行超时秒数,默认 120。注意超时语义:超时只是 MCP 停止 等待并返回错误,**命令在 Vivado 里仍在继续跑**(不会被取消),后续 命令会排队等它跑完。长任务(综合/实现/比特流)请改用 run_synthesis / run_implementation / generate_bitstream (Python 轮询不阻塞),或按预期耗时调大本值。 |
safe_tcl执行带参数的 Tcl 命令模板,自动用 Tcl list 规则转义参数。| Parameter | Type | Description |
|---|---|---|
| args | array | 参数值列表,将被自动转义。 |
| session_id | string | 目标会话 ID,默认 "default"。 |
| template * | string | Tcl 命令模板,用 {0}/{1}/... 表示参数位置。 |
| timeout | integer | 命令执行超时秒数,默认 120。 |
set_wave_analog把信号设为模拟(Analog)波形显示(纯 Tcl 配方,实测 Vivado 2019.1 可渲染)。| Parameter | Type | Description |
|---|---|---|
| height | integer | 行高像素(存盘后在 wcfg 里叫 CellHeight)。 |
| interp | string | 插值方式,白名单 LINEAR / HOLD。 |
| max | number | AnalogMax(必传,与 min 成对)。 |
| min | number | AnalogMin(必传,与 max 成对)。 |
| session_id | string | 目标会话 ID。 |
| signals * | array | 信号列表(短名或全路径,须已 add_wave 进波形)。 |
set_wave_zoom设置波形时间缩放窗口(改 wcfg XML 后 close -force + open 重载)。| Parameter | Type | Description |
|---|---|---|
| end_ns * | number | 缩放结束时间(ns)。 |
| session_id | string | 目标会话 ID。 |
| start_ns * | number | 缩放起始时间(ns),须 < end_ns。 |
| wcfg | string | 显式 wcfg 磁盘路径;缺省自动解析 current_wave_config。 |
start_session启动一个新的 Vivado 会话。| Parameter | Type | Description |
|---|---|---|
| mode | string | ``"gui"`` / ``"tcl"`` / ``"attach"``,默认 ``"gui"``。 |
| port | integer | TCP 端口语义(B 方案): - ``gui`` 默认 ``9999``:先 probe 9999,命中现有 vmcp server 则直接复用/ attach(单 GUI 自动复用,也避免抢端口产生孤儿);无则 spawn 并绑 9999。 - **多开独立实例**:传 ``port=0`` 自动分配一个空闲端口启动全新实例(零手动 配端口、跳过 probe),或给不同端口的显式值。注意:不传 port 时即便换 session_id 也会 probe/attach 到 9999 的同一个 GUI(不会自动多开),要独立 实例就传 ``port=0`` 或显式不同端口。 - ``attach`` 模式:要连接的现有 GUI 的显式端口(默认 9999)。 |
| session_id | string | 会话标识符,默认 "default"。 |
| timeout | integer | 启动超时秒数,GUI 模式建议 120+。默认 120。 |
| vivado_path | string | 可选,自定义 Vivado 可执行文件路径。留空则自动检测。 |
stop_session关闭指定的 Vivado 会话。| Parameter | Type | Description |
|---|---|---|
| session_id | string | 要关闭的会话标识符。 |
verify_io_placement_tool验证 IO 引脚分配:比对 XDC 约束与实际布局。| Parameter | Type | Description |
|---|---|---|
| session_id | string | 目标会话 ID。 |
verilog_compile_check用 iverilog / verilator 做 Verilog 语法 + 连接性检查(比 Vivado 综合快 50 倍)。| Parameter | Type | Description |
|---|---|---|
| files * | array | Verilog / SystemVerilog 文件路径列表(.v / .sv)。 .vhd/.vhdl 不支持,返回 SKIP 并附替代方案指引(check_syntax)。 |
| timeout | number | 子进程超时秒数,默认 30。 |
| tool | string | "auto"(默认,优先 iverilog) / "iverilog" / "verilator"。 |
xdc_auto_fix自动修复 XDC 文件中能安全自修的问题(MISSING_IOSTANDARD / CLOCK_NO_PERIOD)。| Parameter | Type | Description |
|---|---|---|
| board | string | 板卡名,影响默认 IOSTANDARD 和时钟周期。支持: basys3 / nexys-a7 / arty-a7 / zybo / kc705。留空用 LVCMOS33 兜底。 |
| dry_run | boolean | True(默认)只输出补丁预览不改文件;False 实际写回。 |
| session_id | string | 目标会话 ID(仅在不传 xdc_paths 时使用)。 |
| xdc_paths | array | XDC 文件路径列表。不传则从当前 session 的项目里抓。 |
xdc_lint对 XDC 约束文件做静态检查(pure Python,不依赖 Vivado 综合)。| Parameter | Type | Description |
|---|---|---|
| session_id | string | 目标会话 ID(仅在不传 xdc_paths 时使用)。 |
| xdc_paths | array | 要检查的 XDC 文件路径列表。若不传,则从当前 session 的项目里 自动抓取所有 constrs_1 下的 XDC 文件。 |
Security checks
Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 2.7K words.
- ✓License declaredThe repository declares the Apache-2.0 license.
- ✓Tests presentA test suite exists in the repository.
- !Dependencies pinnedNo lockfile anywhere in the repository. Installs can pull different code over time.
- ✓No dynamic code executionScanned 52 source files and found no eval, dynamic Function or shell execution.
1 check has not been run yet.
What the source scan found
- Transport
- stdiosrc/vivado_mcp/__main__.py:108
- Starts other programs
- 5 callssrc/vivado_mcp/analysis/verilog_compile_check.py:281, src/vivado_mcp/vivado/gui_session.py:667, src/vivado_mcp/vivado/gui_session.py:949
- Outbound network calls
- No outbound network calls
- Writes or deletes files
- 16 callssrc/vivado_mcp/analysis/warning_snapshot.py:115, src/vivado_mcp/analysis/warning_snapshot.py:205, src/vivado_mcp/analysis/wcfg_editor.py:110
- Lockfile
- None in the repository
Pattern matches on the source text of 52 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 2.7K words, fetched a month ago. The original in the repository is authoritative.
Read full README