Vivado Red MCP
v0.5.0Drive AMD Vivado from AI assistants, with Red Pitaya STEMlab 125-14 build and deploy flows.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
start_session
Start a persistent Vivado TCL session. Must be called before project/design tools. Vivado startup is ~30s; the session is reused across tool calls.
| Parameter | Type | Description |
|---|---|---|
vivado_path | string | Path to vivado(.bat) executable (default: 'vivado' from PATH). |
stop_session
Stop the Vivado TCL session and free resources.
session_status
Get statistics for the current Vivado session (commands run, timing, errors).
check_session_health
Verify the Vivado process is responsive. With auto_recover=true the session is restarted if it hangs.
| Parameter | Type | Description |
|---|---|---|
auto_recover | boolean | Restart session if unhealthy (default: true) |
get_host_status
Get host hostname, free memory, and session state. Useful to check there is enough RAM before launching synthesis/implementation.
open_project
Open an existing Vivado project (.xpr file).
| Parameter | Type | Description |
|---|---|---|
project_path * | string | Path to .xpr project file |
close_project
Close the currently open project.
get_project_info
Get name, part, target language, directory of the open project.
create_project
Create a new Vivado project on disk in project mode. Defaults to the Red Pitaya STEMlab 125-14 part (xc7z010clg400-1). Call add_sources / add_constraints next, then run_synthesis.
| Parameter | Type | Description |
|---|---|---|
directory * | string | Parent directory; project created at <directory>/<name> |
name * | string | Project name |
force | boolean | Overwrite existing project (default: true) |
part | string | Xilinx part number (default: xc7z010clg400-1) |
target_language | string | Verilog or VHDL (default: Verilog) |
add_sources
Add HDL source files (.v/.sv/.vhd) to the current project. Optionally sets the top module and updates compile order.
| Parameter | Type | Description |
|---|---|---|
files * | array | Absolute paths to HDL source files |
fileset | string | Target fileset (default: sources_1) |
set_top | string | If given, set this module as project top after adding files |
add_constraints
Add XDC constraint files to the current project.
| Parameter | Type | Description |
|---|---|---|
files * | array | Absolute paths to .xdc files |
fileset | string | Target fileset (default: constrs_1) |
list_boards
List boards with bundled XDC + metadata. No Vivado session required.
get_board_info
Get bundled metadata for a board: part, LED pinout, absolute XDC paths, default synth flags. Use the returned absolute_path values with add_constraints. No Vivado session required.
| Parameter | Type | Description |
|---|---|---|
board * | string | Board identifier, e.g. 'red_pitaya_125_14' |
run_synthesis
Run synthesis on the current project (reset_run -> launch_runs synth_1 -> wait_on_run). Returns ground-truth status from the run object, not just text parsing.
| Parameter | Type | Description |
|---|---|---|
jobs | integer | Parallel jobs (default: 4) |
timeout | integer | Timeout seconds (default: 2400 = 40min). Increase for large designs. |
run_implementation
Run implementation (opt_design -> place_design -> route_design). Returns ground-truth status from the impl_1 run object.
| Parameter | Type | Description |
|---|---|---|
jobs | integer | Parallel jobs (default: 4) |
timeout | integer | Timeout seconds (default: 5400 = 90min). |
generate_bitstream
Generate bitstream — `launch_runs impl_1 -to_step write_bitstream` -> wait_on_run. Returns ground-truth run status and the .bit path.
| Parameter | Type | Description |
|---|---|---|
timeout | integer | Timeout in seconds (default: 3600) |
set_run_strategy
Set the strategy of a synthesis or implementation run (e.g. synth_1 'Flow_PerfOptimized_high', impl_1 'Performance_NetDelay_high'). On an unknown name, Vivado's error lists the valid strategies.
| Parameter | Type | Description |
|---|---|---|
run * | string | Run name (e.g. synth_1, impl_1) |
strategy * | string | Strategy name |
get_timing_summary
Get timing summary (WNS, TNS, WHS, THS). Returns parsed metrics by default. Use generate_full_report for raw output.
| Parameter | Type | Description |
|---|---|---|
detail_level | string | summary | standard (+ truncated raw) | full (+ complete raw) |
report_type | string | summary (default), setup, hold, or all |
get_timing_paths
Get failing/critical timing paths. Returns structured summary by default; use detail_level=standard|full for the raw text too.
| Parameter | Type | Description |
|---|---|---|
clock | string | Filter by clock domain |
detail_level | string | summary (default) | standard | full |
from_pin | string | Filter -from pattern |
num_paths | integer | Number of paths (default: 10) |
path_type | string | setup (default) or hold |
slack_threshold | number | Only show paths with slack < this (default: 0 = failing paths) |
through | string | Filter -through pattern |
to_pin | string | Filter -to pattern |
get_utilization
Resource utilization (LUT/FF/BRAM/DSP/IO). Parsed only by default.
| Parameter | Type | Description |
|---|---|---|
detail_level | string | |
hierarchical | boolean | Hierarchical breakdown (default: false) |
module_filter | string | Wildcard for hierarchical filter |
threshold_percent | number | Mark resources below this util%% as below_threshold |
get_clocks
Get clock information and constraints (report_clocks).
get_messages
Get Vivado messages filtered by severity (error/critical/warning/all).
| Parameter | Type | Description |
|---|---|---|
severity | string | all (default) | error | critical | warning |
get_design_hierarchy
Get the design hierarchy (modules and instances), optionally filtered.
| Parameter | Type | Description |
|---|---|---|
instance_pattern | string | Wildcard pattern (e.g., '*cpu*', 'core/alu/*') |
max_depth | integer | Max hierarchy depth (default: 3) |
get_ports
Get top-level I/O ports of the design.
get_nets
Search for nets by pattern (default '*').
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results (default: 100) |
pattern | string | Wildcard pattern (default: '*') |
get_cells
Search for cells/instances by pattern.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Max results (default: 100) |
pattern | string | Wildcard pattern (default: '*') |
launch_simulation
Launch xsim in behavioral/post-synth/post-impl mode.
| Parameter | Type | Description |
|---|---|---|
mode | string | Simulation mode (default: behavioral) |
run_simulation
Run the simulation for a specified time (e.g. 100ns, 1us, all).
| Parameter | Type | Description |
|---|---|---|
time * | string | 100ns | 1us | 10ms | all |
restart_simulation
Restart the simulation from time 0.
close_simulation
Close the current simulation.
get_simulation_time
Get the current simulation time (current_time).
get_signal_value
Get current value of a signal in simulation.
| Parameter | Type | Description |
|---|---|---|
signal * | string | Hierarchical signal path |
radix | string | Display radix (default: hex) |
get_signal_values
Get values of multiple signals matching a wildcard pattern (max 50).
| Parameter | Type | Description |
|---|---|---|
pattern * | string | Signal pattern, e.g. /tb/dut/* |
radix | string |
add_signals_to_wave
Add signals to the waveform viewer.
| Parameter | Type | Description |
|---|---|---|
signals * | array |
set_simulation_top
Set the top-level testbench module for simulation.
| Parameter | Type | Description |
|---|---|---|
top_module * | string | |
fileset | string | default: sim_1 |
get_simulation_objects
List simulation objects in a scope (signals/ports/internal).
| Parameter | Type | Description |
|---|---|---|
filter | string | |
scope | string | default: / |
get_scopes
List child scopes (hierarchy) in the simulation.
| Parameter | Type | Description |
|---|---|---|
parent | string | default: / |
step_simulation
Step simulation by delta cycles.
| Parameter | Type | Description |
|---|---|---|
count | integer | default: 1 |
add_breakpoint
Add a breakpoint on signal edge or change.
| Parameter | Type | Description |
|---|---|---|
signal * | string | |
condition | string |
remove_breakpoints
Remove all breakpoints (remove_bps -all).
get_simulation_messages
Get simulation log messages filtered by severity.
| Parameter | Type | Description |
|---|---|---|
severity | string |
run_tcl
Execute a raw TCL command in Vivado. Use for advanced ops not covered by other tools.
| Parameter | Type | Description |
|---|---|---|
command * | string | TCL command to execute |
timeout | integer | Optional command timeout in seconds |
run_tcl_script
Source a .tcl script file in the Vivado session (uses `source` under the hood). Helpful for replaying canonical Red Pitaya / Xilinx reference scripts.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute path to .tcl script |
timeout | integer | Optional script timeout in seconds |
create_block_design
Create a new block design and make it current. Optionally sets the board_part property on the project beforehand (board_part requires the BSP to be installed in Vivado).
| Parameter | Type | Description |
|---|---|---|
name * | string | Block design name (no .bd) |
board_part | string | Optional vendor:board:part string (e.g. 'digilentinc.com:arty-a7-35:part0:1.0') |
save_bd_design
Save the currently open block design to disk.
close_bd_design
Close the currently open block design (without deleting).
list_bd_cells
List cells in the current block design (optionally filtered).
| Parameter | Type | Description |
|---|---|---|
filter | string | Wildcard pattern, default '*' |
add_ip_to_bd
Add an IP core to the current block design (`create_bd_cell -type ip -vlnv ...`). If `config` is provided, the CONFIG.* keys are applied via set_property -dict.
| Parameter | Type | Description |
|---|---|---|
cell_name * | string | Instance name (e.g. 'processing_system7_0') |
vlnv * | string | Vendor:Library:Name:Version (e.g. 'xilinx.com:ip:processing_system7:5.5') |
config | object | Dict of CONFIG.* properties (e.g. {'CONFIG.PCW_USE_M_AXI_GP0': '1'}) |
create_bd_port
Create a top-level port on the current block design. Scalar or vector (`from`/`to`) via create_bd_port, or an interface port when `vlnv` is given (create_bd_intf_port, e.g. the XADC 'xilinx.com:interface:diff_analog_io_rtl:1.0'). Port names must match the constraints (XDC) of the board.
| Parameter | Type | Description |
|---|---|---|
name * | string | Port name (e.g. 'led_o') |
direction | string | Direction for a plain port (default: I) |
from | integer | MSB index for a vector port (e.g. 7) |
mode | string | Interface mode (default: Slave): Master, Slave, ... |
to | integer | LSB index for a vector port (default: 0) |
type | string | Optional port type: clk, rst, ce, intr, data, undef |
vlnv | string | Interface VLNV: creates an interface port instead |
add_module_to_bd
Add an RTL module (Verilog/VHDL already in the project, see add_sources) to the current block design as a module-reference cell (`create_bd_cell -type module -reference`). Optional `config` sets its parameters, e.g. {'CONFIG.WIDTH': '8'}; string parameters keep their quotes, e.g. {'CONFIG.init': '"0011"'}.
| Parameter | Type | Description |
|---|---|---|
cell_name * | string | Instance name in the BD |
module * | string | Top module name of the RTL |
config | object | Dict of CONFIG.* parameters |
configure_bd_cell
Set CONFIG.* properties on an existing block-design cell (set_property -dict). Use for settings that must be applied after creation or in a separate step, e.g. importing a PS7 board preset: {'CONFIG.PCW_IMPORT_BOARD_PRESET': '<path>/red_pitaya.xml'}.
| Parameter | Type | Description |
|---|---|---|
cell_name * | string | |
config * | object | Dict of CONFIG.* properties |
connect_bd_net
Connect two scalar pins/ports in the current block design.
| Parameter | Type | Description |
|---|---|---|
pin_from * | string | e.g. 'processing_system7_0/FCLK_CLK0' |
pin_to * | string | e.g. 'axi_gpio_0/s_axi_aclk' |
connect_bd_intf_net
Connect two AXI/interface pins in the current block design.
| Parameter | Type | Description |
|---|---|---|
intf_from * | string | e.g. 'processing_system7_0/M_AXI_GP0' |
intf_to * | string | e.g. 'axi_gpio_0/S_AXI' |
auto_connect_axi
Use `apply_bd_automation -rule xilinx.com:bd_rule:axi4` to wire an AXI master to a slave (inserts AXI interconnect + clock/reset hookups).
| Parameter | Type | Description |
|---|---|---|
master * | string | AXI master intf pin |
slave * | string | AXI slave intf pin |
options | object | Optional extra -config key/value pairs (e.g. {'Clk_master': 'Auto'}) |
apply_ps7_preset
Apply the Zynq-7000 processing_system7 board preset to a PS7 cell — wires FIXED_IO / DDR / clocks per the board definition. Equivalent to clicking 'Run Block Automation' on a freshly added PS7 in the GUI.
| Parameter | Type | Description |
|---|---|---|
apply_board_preset | boolean | Whether to apply the current board preset (default: true) |
cell | string | PS7 cell name (default: 'processing_system7_0') |
validate_block_design
Run validate_bd_design and return parsed status. Failures include unconnected pins, conflicting CONFIG values, or missing assignments.
regenerate_bd_layout
Regenerate the block design layout (cosmetic; useful before save).
assign_bd_address
Auto-assign addresses in the BD address editor (assign_bd_address).
generate_bd_wrapper
Generate the HDL wrapper for a block design and (by default) add it to sources_1 and set it as project top. Implements the canonical pattern: make_wrapper -files <bd> -top; add_files -norecurse <wrapper>; set_property top <wrapper> [current_fileset]; update_compile_order.
| Parameter | Type | Description |
|---|---|---|
bd_name * | string | Block design name (no .bd) |
set_top | boolean | Also set the wrapper as project top (default: true) |
create_ip
Create an IP from the Xilinx IP catalog. Generates a .xci file in the project's IP sources fileset. Use configure_ip + generate_ip_target afterwards, then run synth_ip if you want out-of-context synthesis.
| Parameter | Type | Description |
|---|---|---|
ip_name * | string | Catalog name (e.g. 'clk_wiz') |
module_name * | string | Instance/module name on disk (e.g. 'clk_wiz_0') |
library | string | default: ip |
vendor | string | default: xilinx.com |
version | string | Optional explicit version |
configure_ip
Set CONFIG.* properties on an existing IP via set_property -dict.
| Parameter | Type | Description |
|---|---|---|
config * | object | Dict of CONFIG.* keys to values (e.g. {'CONFIG.PRIM_IN_FREQ': '125'}) |
module_name * | string |
generate_ip_target
Generate IP output products (synthesis + simulation by default).
| Parameter | Type | Description |
|---|---|---|
module_name * | string | |
targets | array | default: ['synthesis', 'simulation'] |
synth_ip
Run out-of-context (OOC) synthesis on an IP.
| Parameter | Type | Description |
|---|---|---|
module_name * | string |
upgrade_ip
Upgrade IP version (no-op if already at latest).
| Parameter | Type | Description |
|---|---|---|
module_name | string | Specific IP to upgrade; if omitted, upgrades all in project |
report_ip_status
Get a structured snapshot of the project's IP and their upgrade status.
open_hw_manager
Open the Hardware Manager (no JTAG connection yet).
close_hw_manager
Close the Hardware Manager.
connect_hw_server
Connect to a hw_server (cs_server). Default URL is localhost:3121 — the value Vivado uses when running hw_server locally.
| Parameter | Type | Description |
|---|---|---|
url | string | host:port (default: localhost:3121) |
refresh_hw_device
Refresh the currently selected hardware device (re-reads JTAG chain state). Call after re-plugging a cable.
program_device
Program a .bit onto the first device on the JTAG chain. Sequence: open_hw_target -> set PROGRAM.FILE -> program_hw_devices. The hardware must already be connected (`open_hw_manager` + `connect_hw_server`).
| Parameter | Type | Description |
|---|---|---|
bit_file * | string | Absolute path to .bit |
probes_file | string | Optional ILA probes .ltx file |
report_power
Run report_power and return parsed totals (total/dynamic/static W) + a truncated raw block. Full output stored at /tmp/vivado_red_mcp/.
report_drc
Run report_drc and return parsed violations list (severity/code/message). Use after place_design/route_design to catch design-rule problems.
report_methodology
Run report_methodology (UltraFast methodology checks). Returns violation list grouped by severity.
report_qor_assessment
Run report_qor_assessment (overall design quality score).
report_clock_interaction
Run report_clock_interaction to find cross-clock paths (timed/async/unconstrained).
load_board_xdc
Resolve a bundled board XDC and attach it to the current project. Standalone wrapper over get_board_info + add_constraints.
| Parameter | Type | Description |
|---|---|---|
board * | string | Board id, e.g. 'red_pitaya_125_14' |
variant | string | XDC variant id (e.g. 'leds_min', 'full'). Default: 'full' |
generate_cfgmem
Convert a .bit into a raw binary image (.bit.bin) loadable via /dev/xdevcfg on the Red Pitaya. Use after generate_bitstream.
| Parameter | Type | Description |
|---|---|---|
bit_file * | string | Absolute path to input .bit |
output | string | Output .bit.bin path (default: <bit_file>.bin) |
get_synthesis_errors_parsed
Return structured errors and critical warnings from a run's log (default: synth_1), plus those of every failed run (e.g. out-of-context IP runs). Use after run_synthesis fails to get a clean actionable list.
| Parameter | Type | Description |
|---|---|---|
max_items | integer | default: 50 |
run | string | default: synth_1 |
create_redpitaya_project_rtl
One-shot composite: create project -> add HDL sources -> apply XDC -> synth -> impl -> write_bitstream -> generate .bit.bin. Stops on the first failing stage and returns a structured payload.
| Parameter | Type | Description |
|---|---|---|
directory * | string | |
name * | string | |
top_module * | string | |
verilog_files * | array | |
board | string | default: red_pitaya_125_14 |
extra_xdc_files | array | |
impl_timeout | integer | |
jobs | integer | |
synth_flags | string | |
synth_timeout | integer | |
xdc_variant | string |
rp_fetch_repo
Download the RedPitaya-FPGA repo from GitHub as a source zip and extract it (no git required, stdlib only). Returns repo_path to feed into rp_setup_workspace. Idempotent — pass force=true to redownload. No Vivado session required.
| Parameter | Type | Description |
|---|---|---|
dest_path | string | Directory to extract into. Default: current working directory. |
force | boolean | If true, delete an existing extracted dir and redownload (default: false). |
ref | string | Branch or tag to fetch (default: master). Extracted dir is RedPitaya-FPGA-<ref>. |
timeout | integer | Download timeout in seconds (default: 600). |
url | string | Override the full zip URL (e.g. a tag or a fork). If set, ref is used only for the expected dir name. |
rp_setup_workspace
Copy a RedPitaya-FPGA repo into an isolated workspace so builds don't touch the pristine checkout. The copy is patched to run on the installed Vivado release (block-design version check) and without git. Idempotent — pass force=true to recopy. No Vivado session required.
| Parameter | Type | Description |
|---|---|---|
repo_path * | string | Path to the RedPitaya-FPGA checkout (contains prj/, rtl/, brd/, *.tcl) |
force | boolean | If true, delete and recopy an existing workspace (default: false) |
workspace_path | string | Destination workspace dir. Default: <repo_parent>/redpitaya_mcp_workspace |
rp_list_projects
List projects under prj/ of a RedPitaya workspace or repo. Flags which are Z10-capable (have ip/system.tcl or legacy ip/systemZ10.tcl). No Vivado session required.
| Parameter | Type | Description |
|---|---|---|
path * | string | Workspace or repo root (the dir that contains prj/) |
rp_workspace_info
Report workspace state: projects present and which already have a built bitstream.
| Parameter | Type | Description |
|---|---|---|
workspace_path * | string |
rp_create_custom_project
Clone an existing prj/<base> into prj/<name> inside the workspace, ready for custom PL logic. Returns the rtl/ dir and red_pitaya_top path to edit. No Vivado session required.
| Parameter | Type | Description |
|---|---|---|
base_project * | string | Existing project to clone (e.g. 'v0.94', 'barebones') |
name * | string | New project name |
workspace_path * | string |
rp_build_project
Build a RedPitaya PS+PL project end-to-end: run the repo's project setup TCL (creates the PS7 block design from ip/system.tcl), then synthesis, implementation and write_bitstream, then generate the .bit.bin. Returns {stage, xpr_path, bit_path, bin_path, timing}. Requires start_session first.
| Parameter | Type | Description |
|---|---|---|
project * | string | Project under prj/ to build (e.g. 'v0.94', 'barebones') |
workspace_path * | string | |
defines | string | Extra Verilog defines passed as tclarg 1 (default: empty) |
impl_timeout | integer | Implementation timeout s (default: 5400) |
jobs | integer | Parallel jobs for synth/impl (default: 4) |
model | string | Board model — only 'Z10' supported (default: Z10) |
setup_timeout | integer | Project-setup TCL timeout s (default: 900) |
synth_flags | string | Extra synth_design flags via STEPS.SYNTH_DESIGN.ARGS.MORE_OPTIONS. Default empty. RedPitaya canonical for reproducibility: '-flatten_hierarchy none -bufg 16 -keep_equivalent_registers' (NOTE: those pr… |
synth_timeout | integer | Synthesis timeout s (default: 2400) |
deploy_to_redpitaya
Copy a .bit.bin to a Red Pitaya over SSH/SCP and load it into the FPGA. Uses /dev/xdevcfg (works on Red Pitaya OS 1.04 + 2.00) or fpgautil (OS 2.00). No Vivado session required.
| Parameter | Type | Description |
|---|---|---|
bit_bin_path * | string | Absolute path to the local .bit.bin produced by generate_cfgmem |
host * | string | Red Pitaya IP or hostname (e.g. '192.168.1.100' or 'rp-f0abcd.local') |
connect_timeout | integer | SSH connect timeout in seconds (default: 10) |
keep_remote | boolean | Leave the .bit.bin on the board after loading (default: false → rm) |
key_filename | string | Path to an SSH private key. If set, overrides password auth. |
method | string | Loader: 'xdevcfg' (default, both OS) or 'fpgautil' (OS 2.00) |
password | string | SSH password (default: 'root' — Red Pitaya factory default) |
port | integer | SSH port (default: 22) |
remote_path | string | Remote .bit.bin path (default: /tmp/<basename>) |
user | string | SSH user (default: 'root') |
ssh_redpitaya_exec
Run an arbitrary shell command on a Red Pitaya over SSH and return stdout/stderr/exit code. Useful for status checks, dmesg reads, manual loader invocations.
| Parameter | Type | Description |
|---|---|---|
command * | string | Shell command to execute |
host * | string | |
connect_timeout | integer | |
exec_timeout | integer | Command timeout (default: 30s) |
key_filename | string | |
password | string | |
port | integer | |
user | string |
get_vivado_doc
Look up a topical Vivado documentation summary bundled with this server. Returns markdown content + upstream URL. Known topics: block_design, ps7_zynq, timing_constraints, synthesis_strategies, simulation_xsim, red_pitaya_125_14, redpitaya_ps_pl_flow, tcl_quoting, hw_manager, ip_integrator, pitfalls_2020_1.
| Parameter | Type | Description |
|---|---|---|
topic * | string | Topic name; see KNOWN_TOPICS in the tool description |
version | string | Target Vivado version (cosmetic, default '2020.1') |
list_vivado_docs
List the bundled Vivado documentation topics.
request_feature
Submit a feature request for the Vivado MCP server (persisted on disk).
| Parameter | Type | Description |
|---|---|---|
description * | string | What you need and why |
title * | string | Short title |
priority | string | |
use_case | string | Task that prompted the request |
list_feature_requests
List all submitted feature requests.
generate_full_report
Generate a full Vivado report to a file. Use when inline reports get truncated or you need the complete output. Returns a report_id usable with read_report_section.
| Parameter | Type | Description |
|---|---|---|
report_type * | string | |
options | object | Report-specific options (e.g. {hierarchical: true}) |
output_file | string | Optional custom output path |
read_report_section
Read a section of a previously generated report. Provide report_id (from generate_full_report) or a direct file_path.
| Parameter | Type | Description |
|---|---|---|
file_path | string | |
num_lines | integer | default: 100 |
report_id | string | |
search_pattern | string | Regex to locate a section; returns context around first match |
start_line | integer | 1-indexed (default: 1) |