ModelSim MCP Server
Allows AI assistants using OpenAI Codex CLI to automate ModelSim/QuestaSim FPGA simulation workflows, including design compilation, simulation execution, waveform analysis, coverage collection, and batch automation.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ModelSim MCP ServerQuickly simulate alu.sv"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ModelSim L MCP Server
ModelSim/QuestaSim 自动化 MCP 服务器 — 为 AI 助手提供完整的 FPGA 仿真能力。
An MCP server exposing local ModelSim/QuestaSim CLI tools via the Model Context Protocol.
概述 / Overview
modelsim-Lmcp-server 将本机 ModelSim/QuestaSim 命令行工具暴露为 57 个 MCP 工具,覆盖从建库编译、仿真运行、波形分析、覆盖率收集、门级仿真、UVM 到批量自动化的全流程。
与 QuartusMCP 互补:QuartusMCP 管理工程/编译/下载流程,ModelSimMCP 专注于仿真验证。
自动发现 — 启动时扫描 C/D/E/F 盘及 WSL 挂载点,自动找到
modelsim_ase/modeltech安装独立于 Quartus — 不需要 Quartus 环境,可单独使用 ModelSim SE / QuestaSim
支持所有版本 — ModelSim 10.x、QuestaSim 2020+、各 Quartus 随附版本
Related MCP server: vivado-mcp-agent
安装 / Installation
git clone https://github.com/liujunjie666777/modelsim-Lmcp-server.git
cd modelsim-Lmcp-server
pip install -r requirements.txt环境要求:
Windows 10/11
Python 3.10+
mcp>=1.0.0本机安装 ModelSim / ModelSim-Altera / QuestaSim(任意版本)
MCP 配置 / Configuration
WorkBuddy
编辑 ~\.workbuddy\mcp.json:
{
"mcpServers": {
"modelsim": {
"command": "python",
"args": ["E:/.workbuddy/mcp-servers/modelsim-Lmcp-server/modelsim_mcp_server.py"],
"env": {
"MODELSIM_BIN": "E:/intelFPGA_lite/18.1/modelsim_ase/win32aloem"
}
}
}
}Claude Code
编辑项目目录下的 .mcp.json 或用户目录 ~/.mcp.json:
{
"mcpServers": {
"modelsim": {
"command": "python",
"args": ["path/to/modelsim_mcp_server.py"],
"env": {
"MODELSIM_BIN": "path/to/modelsim_ase/win32aloem"
}
}
}
}Cursor
编辑 .cursor/mcp.json:
{
"mcpServers": {
"modelsim": {
"command": "python",
"args": ["path/to/modelsim_mcp_server.py"]
}
}
}Continue
编辑 ~/.continue/config.json:
{
"modelsim": {
"command": "python",
"args": ["path/to/modelsim_mcp_server.py"]
}
}修改配置后请重启对应的 MCP 客户端。环境变量
MODELSIM_BIN通常不需要手动设置 — 服务器会自动发现。
可选环境变量
变量 | 说明 | 默认值 |
| ModelSim bin 目录 | 自动扫描 C/D/E/F 盘 |
| ModelSim 安装根目录 | 自动扫描 |
自动发现支持的路径模式:
{drive}:/intelFPGA_lite/*/modelsim_ase/win32aloem{drive}:/intelFPGA_lite/*/modelsim_ase/win32{drive}:/modeltech*/win64或win32
功能概览 / Features
分类 | 工具数 | 说明 |
环境与发现 | 3 | 自动发现安装、许可证检查、版本查询 |
库管理 | 5 | 创建/删除/映射库、列出库与设计单元 |
编译 | 3 | Verilog/SystemVerilog 编译、VHDL 编译、批量编译 |
仿真执行 | 5 | 启动/运行/重启仿真、六步完整流程、最简一键仿真 |
波形操作 | 7 | 波形布局保存/加载、图片导出、WLF 比较、VCD 互转、离线查看 |
信号操作 | 4 | Force 信号、检查信号值、Log 信号、添加到波形 |
覆盖率 | 3 | 覆盖率仿真、UCDB 合并、排除项管理 |
批量自动化 | 4 | DO 文件生成、批处理脚本、DO 执行、Makefile 生成 |
高级仿真 | 7 | 门级仿真、时序仿真、并行仿真、UVM、回归测试、条件断点、Watchpoint |
断言 | 1 | SVA 断言仿真 |
仿真库编译 | 1 | 编译 Altera/Intel 器件仿真库 |
工具集 | 7 | 错误码查询、源码查看、WLF 信息、WLF 恢复/转日志、加密、Tcl 执行 |
内存与调试 | 5 | 内存检查、虚拟信号、断点、Transcript 录制、WLF 检查点 |
快捷入口 | 2 | 快速仿真、最简参数版 |
完整工具目录 / Complete Tool Catalog
环境与发现
工具 | 说明 |
| 自动发现本机 ModelSim 安装路径与工具 |
| 检查许可证状态 |
| 获取版本号 |
库管理
工具 | 说明 |
| 创建设计库 (vlib) |
| 删除设计库 (vdel) |
| 映射逻辑库到物理路径 (vmap) |
| 列出所有已映射的库 |
| 列出库中已编译的设计单元 (vdir) |
编译
工具 | 说明 |
| 编译 Verilog/SystemVerilog (vlog) |
| 编译 VHDL (vcom) |
| 批量编译整个目录树 |
仿真执行
工具 | 说明 |
| 启动仿真会话 (vsim) |
| 完整六步流程:建库→编译→启动→加波形→运行→保存 |
| 高级仿真:自定义信号、force、运行后操作 |
| 重启当前仿真 |
| 快速一键仿真 |
| 最简参数版仿真(4 参数) |
波形操作
工具 | 说明 |
| 保存波形布局 (.do) |
| 加载波形布局 |
| 导出波形图片 (BMP/PNG/JPG) |
| 比较两个 WLF 文件 (wlfcmp) |
| WLF → VCD 转换 |
| VCD → WLF 转换 |
| 离线查看 WLF 波形 (GUI) |
信号操作
工具 | 说明 |
| 批量 force 信号值 |
| 检查信号当前值 |
| Log 信号到 WLF |
| 添加信号到波形(支持分组、分隔线、进制) |
覆盖率
工具 | 说明 |
| 运行覆盖率仿真 + 生成报告 |
| 合并 UCDB 覆盖率数据 |
| 排除/恢复覆盖率检查项 |
| 生成覆盖率报告 |
批量自动化
工具 | 说明 |
| 生成可复用 DO 文件(含完整注释模板) |
| 生成 Windows .bat 一键仿真脚本 |
| 执行已有 DO 文件 |
| 生成 ModelSim Makefile (vmake) |
高级仿真
工具 | 说明 |
| 门级时序仿真(SDF 反标注) |
| 完整时序仿真流程 |
| 并行仿真执行 |
| UVM 仿真运行 |
| 回归测试批量运行 |
| SVA 断言仿真 |
| 设置条件断点 |
仿真库
工具 | 说明 |
| 编译 Altera/Intel 器件仿真库 |
工具集
工具 | 说明 |
| 查询错误代码含义 (verror) |
| 显示源代码带行号 (vcat) |
| WLF 文件元信息 (wlfman) |
| 恢复损坏的 WLF (wlfrecover) |
| WLF 波形 → 文本日志 |
| 加密 Verilog 源文件 (vencrypt) |
| 在 ModelSim 上下文中执行任意 Tcl 命令 |
内存与调试
工具 | 说明 |
| 查看仿真中内存实例内容 |
| 创建虚拟信号/总线/函数 |
| 设置断点 (when) |
| 录制/停止 Transcript 到 DO 文件 |
| 添加 Watchpoint 监控 |
| 保存 WLF 检查点 |
使用示例 / Usage Examples
一键仿真
quick_verilog_sim
rtl: "../rtl/mux4to1.sv"
tb: "../tb/mux4to1_tb.sv"
top_name: "mux4to1_tb"
work_dir: "D:/project/mux4to1/sim"覆盖率仿真
run_coverage_simulation
top_module: "alu_tb"
rtl_files: "../rtl/*.sv"
tb_files: "../tb/alu_tb.sv"
coverage_types: "bcesxf"
save_ucdb: "alu_cov.ucdb"编译器件仿真库
compile_simulation_library
quartus_root: "E:/intelFPGA_lite/18.1/quartus"
device_family: "cycloneive"生成可复用脚本
generate_do_file → 编辑 run.do → generate_batch_script → 双击 run.bat
与 QuartusMCP 分工
流程 | 工具 |
项目管理、管脚分配、综合/布局布线 | QuartusMCP |
功能仿真、时序仿真、覆盖率 | ModelSimMCP |
SignalTap 调试、JTAG 下载 | QuartusMCP |
波形分析、VCD 转换、DO 脚本 | ModelSimMCP |
注意事项 / Notes
仿真需要有效许可证
本项目只调用本机命令行工具,不包含 ModelSim/器件库文件
run_tcl_commands会执行任意 Tcl,请只运行可信命令
CQUPT
许可证 / License
MIT — 详见 LICENSE
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceProvides MCP tools for CPACS-oriented TiGL workflows, enabling lifecycle management, inspection, export, and parameter manipulation of aircraft geometry models without native geometry runtimes.Last updated3MIT
- Alicense-qualityCmaintenanceMCP server for deterministic Vivado FPGA automation including project scaffolding, simulation, synthesis, implementation, and gated bitstream generation.Last updated4MIT
- AlicenseAqualityCmaintenanceWraps Quartus II 9.1 command-line tools into MCP tools, enabling AI agents to create projects, assign pins, generate simulation waveforms, run simulations, compile, read reports, and program devices.Last updated164MIT
- Alicense-qualityAmaintenanceA minimal MCP server that provides 25 tools and 5 hooks to control Xilinx Vivado EDA for FPGA development, including session management, Tcl execution, smart diagnostics, and IP debugging.Last updated85Apache 2.0
Related MCP Connectors
Free MCP tools: the only MCP linter, health checks, cost estimation, and trust evaluation.
Production-grade cryptography toolkit with 31 MCP tools for classical, PQC, and KMS workflows.
Connect any two APIs and keep them in sync — 45 MCP tools with shadow previews and diagnostics.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/liujunjie666777/modelsim-Lmcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server