Xcelium MCP Server

Xcelium MCP Server

Enables AI assistants to control Cadence Xcelium and SimVision simulators in real time for automated RTL and gate-level debugging. It provides 25 tools for signal inspection, watchpoints, binary search, and simulation state management.

Category
访问服务器

README

Xcelium MCP Server

MCP (Model Context Protocol) server that enables AI assistants to control Cadence Xcelium/SimVision in real time via a Tcl socket bridge. Supports automated RTL/gate-level debugging with watchpoints, binary search, checkpoints, and SHM probe control.

Architecture

┌──────────────┐  stdio   ┌───────────────────┐  TCP    ┌─────────────────────┐
│ AI Assistant  │ <------> │ Python FastMCP     │ <-----> │ mcp_bridge.tcl      │
│ (Claude, etc) │          │ Server (25 tools)  │ :9876  │ inside xmsim/SV     │
└──────────────┘          └────────────────────┘        │ (13 meta commands)  │
                                                         └─────────────────────┘

Installation

pip install -e .

# With screenshot support (requires ghostscript)
pip install -e ".[screenshot]"

# With dev dependencies
pip install -e ".[dev]"

Setup

1. Simulator Side (Linux server)

Load the Tcl bridge when launching xmsim or SimVision:

# Batch mode (no GUI license needed)
xmsim -64bit -input mcp_bridge.tcl top

# SimVision GUI mode
simvision -64bit -input mcp_bridge.tcl dump.shm

The bridge listens on TCP port 9876 by default. Override with:

export MCP_BRIDGE_PORT=9877

Bridge signals readiness by creating /tmp/mcp_bridge_ready_9876.

2. AI Tool Configuration

Claude Code (~/.claude.json):

{
  "mcpServers": {
    "xcelium-mcp": {
      "type": "stdio",
      "command": "ssh",
      "args": ["-o", "BatchMode=yes", "sim-server", "/path/to/xcelium-mcp"]
    }
  }
}

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "xcelium": {
      "command": "xcelium-mcp"
    }
  }
}

3. SSH Tunnel (remote server)

# Forward port 9876 in ~/.ssh/config
Host sim-server
    LocalForward 9876 localhost:9876

Available Tools (25)

Connection & Control (1-7)

Tool Description
connect_simulator Connect to bridge (host, port, timeout)
disconnect_simulator Disconnect (for reconnection only)
sim_run Run simulation with duration and timeout (default 600s for gate sim)
sim_stop Stop a running simulation
sim_restart Restart from time 0
sim_status Get current time, scope, state
set_breakpoint Set conditional breakpoint

Signal Inspection (8-13)

Tool Description
get_signal_value Read current signal values
describe_signal Get signal type, width, direction
find_drivers Find all drivers (X/Z debugging)
list_signals List signals in a scope
deposit_value Force a value onto a signal
release_signal Release a deposited signal

Waveform (14-16)

Tool Description
waveform_add_signals Add signals to waveform viewer
waveform_zoom Set waveform time range
cursor_set Set waveform cursor position

Debug & Screenshot (17-18)

Tool Description
take_waveform_screenshot Capture waveform as PNG
run_debugger_mode Full debug snapshot with checklist

Advanced Debug (19-25)

Tool Description
shutdown_simulator Safe shutdown preserving SHM waveform data
watch_signal Set watchpoint to stop at exact clock edge when condition is true
watch_clear Clear watchpoints (specific ID or all)
probe_control Enable/disable SHM recording, optionally per scope
save_checkpoint Save simulation state for later restoration
restore_checkpoint Restore to a saved checkpoint
bisect_signal Binary search to find when a condition first becomes true

Debugging Workflows

Quick Bug Hunt (watchpoint)

connect_simulator()
watch_signal(signal="top.dut.r_state", op="==", value="4'hF")
sim_run(duration="100us")          # stops at exact clock edge
get_signal_value(signals=["top.dut.r_state", "top.dut.r_data"])
watch_clear()
shutdown_simulator()               # always use this, never disconnect

Automated Time Search (bisect)

connect_simulator()
bisect_signal(
    signal="top.dut.r_error", op="==", value="1'b1",
    start_ns=0, end_ns=1000000,    # 0-1ms range
    precision_ns=100                # 100ns precision
)
# Returns iteration log + final narrowed time range
shutdown_simulator()

Long Simulation with SHM Control

connect_simulator()
probe_control(mode="disable")       # no SHM recording
sim_run(duration="50ms")            # skip uninteresting region
probe_control(mode="enable")        # start recording
sim_run(duration="10ms")            # capture region of interest
shutdown_simulator()

Checkpoint & Replay

connect_simulator()
sim_run(duration="10ms")
save_checkpoint(name="before_bug")
sim_run(duration="5ms")             # analyze bug region
restore_checkpoint(name="before_bug")  # go back
sim_run(duration="5ms")             # try different analysis
shutdown_simulator()

Key Rules

  1. Always specify duration in sim_run to prevent hang on infinite loops
  2. Always use shutdown_simulator to end sessions (preserves SHM data)
  3. Never use disconnect_simulator to end sessions (SHM not flushed)
  4. Gate-level sim: increase timeout with sim_run(timeout=1800) if needed
  5. Bridge ready: check /tmp/mcp_bridge_ready_<port> file instead of TCP ping

Tcl Bridge Meta Commands

The bridge (mcp_bridge.tcl) accepts these meta commands over TCP:

Command Description
__PING__ Health check
__QUIT__ Close connection
__SCREENSHOT__ <path> Capture waveform to PostScript
__SHUTDOWN__ Safe shutdown (database close + finish)
__RUN_ASYNC__ <dur> Non-blocking sim run
__PROGRESS__ Query sim time during async run
__WATCH__ <sig> <op> <val> Set signal watchpoint
__WATCH_LIST__ List active watchpoints
__WATCH_CLEAR__ <id|all> Delete watchpoints
__PROBE_CONTROL__ <mode> [scope] Toggle SHM recording
__SAVE__ <name> Save checkpoint
__RESTORE__ <name> Restore checkpoint
__BISECT__ <sig> <op> <val> <start> <end> [precision] Binary search

Any other input is evaluated as a raw Tcl/SimVision command.

Testing

pytest tests/

Requirements

  • Python >= 3.10
  • mcp >= 1.0.0
  • xmsim or SimVision (Cadence Xcelium) with Tcl console
  • ghostscript (optional, for EPS to PNG screenshot conversion)

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选