READMESource: main@4f2ac48a
RTLCockpit 🧭
面向 RTL 工程师的可视化协同编程驾驶舱 —— 以 DeepSeek Harness (DSH) 插件形态运行。
RTLCockpit 把 RTL 源码编辑、模块层次框图、信号全链路追踪、时钟域分析、仿真执行与 AI Vibe Coding 整合在同一个界面中。
✨ 功能一览
- 📁 工程文件树:打开任意 RTL 工程目录,递归浏览真实文件夹结构
- 📝 三语言代码编辑器:Verilog / SystemVerilog / VHDL 语法高亮(Monaco)
- 🗂️ 四个框图视图:代码框架 / 信号流向 / 时钟树 / 复位树
- 圆角矩形 = 子模块实例;平行四边形 = 模块内纯逻辑;紫色虚线框 = generate 组
- 🔗 信号全链路追踪:选模块 → 选信号 → 左右逐级引出前后模块,所有箭头自左向右
- 🕐 时钟域 / 复位域分析:确定 / 推断 / 未知三级判定,点击信号名联动高亮
- ℹ️ 模块详情:功能描述、时钟域、复杂度、内部逻辑、信号清单、generate 结构
- 🤖 AI Vibe Coding:AI 对话改代码,红绿 diff 预览 + 同意 / 不同意审核
- ▶️ 一键仿真:QuestaSim / Icarus / Verilator(仿真器可选,无仿真器不影响其他功能)
- 📊 代码进度、工期倒排、人格化“吐槽”弹幕
🔒 模型零配置:RTLCockpit 自身不保存任何模型端点或 API Key,始终通过 DSH 调用当前配置的大模型。切换 provider/model 只需改 DSH。
📦 安装条件
| 软件 | 版本要求 |
|---|---|
| OS | Ubuntu(推荐)/ Windows / macOS |
| Node.js | ^22.19 或 >=24 |
DeepSeek Harness(dsh) |
0.1.5-rc.3+(开发实测 0.1.7-rc.2) |
| 仿真器(可选) | QuestaSim 2024.1 / Icarus 11 / Verilator 5 |
| 大模型 | DSH 中已配置好的任意 provider |
🚀 快速开始(作为 DSH 插件安装)
# ① 获取源码并安装依赖
git clone https://github.com/yestone111/RTL_Cockpit.git
cd RTL_Cockpit/rtlcockpit
npm install
# ② 准备模型调用专用的 rtl profile(仅首次;详见产品手册 §3.2)
dsh --profile rtl --from-default-profile headless
dsh plugin --profile rtl add <你使用的 provider 插件,例如 @volcengine/ark-plan-api>
# 编辑 ~/.dsh/profiles/rtl/cordis.patch.yml,使 agent-default-model
# 的 provider/model 与主 profile 保持一致
dsh --profile rtl "1+1=?" # 验证可回答
# ③ 构建并组装插件包(产物在 ../rtlcockpit-plugin)
./scripts/build-plugin.sh
# ④ 安装到 DSH 主 profile(web 是 dsh web 的 profile,按需替换)
dsh plugin --profile web add "$(cd ../rtlcockpit-plugin && pwd)"
然后:
- 重启
dsh web(仅首次安装宿主端需要;之后纯前端改动 Ctrl+F5 即可); - 打开
http://127.0.0.1:3080/rtlcockpit/,或点击 DSH 界面右下角的 🧭 浮动按钮。
开发调试(独立 Web 形态)
cd rtlcockpit
npm run dev # http://127.0.0.1:5173/,改动 HMR 即时生效
📂 仓库结构
RTLCockpit/
├── rtlcockpit/ # 应用源码(开发主目录)
│ ├── src/core/ # 纯 TS:解析 / 分析 / 度量(零 UI、零宿主依赖)
│ ├── src/ui/ # React + Monaco + D3 界面
│ ├── vite/ # dev server 中间件(fs/workspace/sim/vibe API)
│ ├── plugin-host/ # DSH 宿主端 entry.ts + 注入端 client.js
│ ├── host/ # 宿主桥参考实现
│ ├── scripts/
│ │ ├── build-plugin.sh # 一键组装插件到 ../../rtlcockpit-plugin
│ │ └── smoke-test.ts # 冒烟断言
│ └── public/sample-rtl/ # 只读示例工程(测试与演示共用)
├── rtlcockpit-plugin/ # 【构建产物,已 gitignore】由 build-plugin.sh 生成
├── regression/ # 回归测试体系(类型 / 红线 / 核心 / 真实浏览器 UI / HTTP)
├── RTLCockpit_doc/ # 产品手册、开发交接文档、实施记录、需求文档
├── .gitignore
├── LICENSE # MIT
└── README.md
两套运行形态共用同一份
src/core:dev 形态走 Vite 中间件,插件形态走plugin-host/entry.ts(挂/api/rtlcockpit/*),API 前缀由src/core/apiBase.ts统一适配。
🧪 测试与回归
cd rtlcockpit
npm run test:smoke # 冒烟断言:解析 / generate / 时钟域 / 信号 / 仿真规划
npm run test:regression # P0 门禁:类型 + 冒烟 + 红线 + 核心回归 + 真实浏览器 UI + HTTP
npm run test:ui # 仅真实浏览器 UI 回归
📖 文档
完整文档位于 RTLCockpit_doc/:
- RTLCockpit 产品手册 —— 功能与使用方法
- RTLCockpit 开发交接与架构说明 v1 —— 代码地图、红线、已知坑
- RTLCockpit 实施工作计划 v1.5 —— 设计与实施记录
- regression/README.md —— 回归测试体系说明
No comments yet. Be the first to write one.