eda-spec2gds Skill
⚠️ Security Notice: This skill includes optional system installation scripts (scripts/install_ubuntu_24_mvp.sh, scripts/bootstrap_eda_demo.sh) that require sudo access and modify system state. These scripts should only be run in isolated development environments (VM, container, or dedicated workstation), not production systems. Core skill operations (RTL generation, file management, report collection) are file-based and safe.
Execute a staged, artifact-first open-source EDA flow within the workspace. Prefer deterministic scripts for execution, keeping the agent focused on planning, generation, diagnosis, and iteration.
Workflow
1. Normalize the Specification First
- - Convert free-form requirements into a structured specification before writing RTL.
- Read
references/spec-template.md and produce input/normalized-spec.yaml. - If clock/reset, IO, target flow, or timing targets are missing, stop and ask the user or record explicit assumptions.
2. Initialize a Project Directory
- - Create a run folder under
eda-runs/<design-name>/ using the layout in references/workflow.md. - Copy or generate starter files from
assets/project-template/ when useful.
3. Generate RTL and Testbench Separately
- - Write RTL to
rtl/design.v. - Write testbench to
tb/testbench.v. - Keep assumptions and design notes in
reports/rtl-notes.md.
4. Run Validation in Strict Order
- - Run lint/syntax checks before simulation.
- Run simulation before synthesis.
- Run synthesis before OpenLane.
- Do not skip failed stages unless the user explicitly requests it.
5. Treat Artifacts as Source of Truth
- - Save logs, reports, VCD waveforms, netlists, configurations, and summary files.
- Prefer file outputs over GUI tools. GUI viewers like GTKWave/KLayout are optional helpers, not required steps.
6. Diagnose Before Editing
- - For failures, read
references/failure-patterns.md. - Classify the failure: specification gap, RTL bug, testbench bug, synthesis issue, or backend/configuration issue.
- Fix the smallest plausible cause first.
7. Summarize Each Stage Clearly
- - State pass/fail status.
- List key artifact paths.
- Record assumptions, blockers, and next recommended actions.
Hard Rules
- - Do not start backend if simulation is failing.
- Do not start OpenLane if synthesis failed or the top module is unclear.
- Do not silently invent missing interfaces, clocks, resets, or timing targets without documenting assumptions.
- Prefer single-clock, no-macro, no-CDC MVP flows unless the user explicitly requests advanced features.
- Use the scripts in
scripts/ for repeatable operations instead of re-inventing shell commands each time.
Default Project Layout
Use this layout unless the user already has an existing project structure:
CODEBLOCK0
Resource Map
- - Read
references/spec-template.md when the specification is incomplete or ambiguous. - Read
references/workflow.md when you need the phase-by-phase execution order. - Read
references/openlane-playbook.md before setting up or debugging OpenLane. - Read
references/failure-patterns.md when a run fails and you need a triage path. - Read
references/ppa-report-guide.md when summarizing synthesis/backend reports. - Read
references/ubuntu-24-setup.md when preparing an Ubuntu host for this workflow. - Read
references/demo-walkthrough.md when you want a concrete first-run example. - Read
references/dashboard-plan.md when you want a web view for progress and artifacts. - Use scripts in
scripts/ for initialization, spec normalization, environment checks, installation, lint, simulation, synthesis, OpenLane, backend result collection, GDS preview rendering, artifact web serving, report collection, and run summaries. - Use
assets/examples/simple-fifo/ as the first smoke-test case. - Use
assets/openlane-config-template.json as the default backend configuration template.
Quick Start
Prerequisites
Before using this skill, ensure your environment has:
Required Tools:
- -
python3 (3.8+) - INLINECODE24 (synthesis)
- INLINECODE25 +
vvp (simulation) - INLINECODE27 (OpenLane backend)
Optional Tools:
- -
verilator (faster simulation) - INLINECODE29 (GDS visualization)
- INLINECODE30 (waveform viewing)
Option A: Environment Already Prepared
If your system already has the EDA toolchain installed:
- 1. Initialize a run directory with
scripts/init_project.py <design-name>. - Save user requirements to
input/raw-spec.md. - Normalize them into
input/normalized-spec.yaml using scripts/normalize_spec.py along with references/spec-template.md. - Write or copy
rtl/design.v and tb/testbench.v. - Run
scripts/check_env.sh to verify tool availability. - Run
scripts/run_lint.sh, then scripts/run_sim.sh, then scripts/run_synth.sh. - Only after those pass, prepare
constraints/config.json and run scripts/run_openlane.sh. - Collect artifacts with
scripts/collect_reports.py and summarize with scripts/summarize_run.py.
Option B: Fresh Environment Setup
⚠️ Run only in isolated/development environments!
- 1. Review
scripts/install_ubuntu_24_mvp.sh to understand system changes - Run the installation script (requires sudo): INLINECODE47
- Re-login or run
newgrp docker to apply Docker group changes - Pull OpenLane image: INLINECODE49
- Verify installation: INLINECODE50
- Proceed with Quick Start Option A
MVP Scope
Default to an MVP flow that supports:
- - Single module or small design
- Single clock domain
- Simple reset behavior
- Generated or hand-authored Verilog RTL
- Testbench-driven simulation
- Yosys synthesis
- OpenLane backend run with template configuration
- Report collection and summary
Escalate to the user before attempting advanced topics like CDC, SRAM/macros, multi-clock constraints, DFT, or signoff-quality closure.
Security and Isolation
What This Skill Does
Safe, File-Based Operations (Core Skill):
- - Generate RTL and testbench code
- Manage project directory structures
- Run local EDA tools (yosys, iverilog)
- Collect and summarize reports
- Serve local dashboards
System-Modifying Operations (Optional Setup Scripts Only):
- - Install system packages via apt (
scripts/install_ubuntu_24_mvp.sh) - Modify Docker group membership (
usermod -aG docker) - Create Python virtual environments
- Pull Docker images from Docker Hub
Recommended Deployment
- - ✅ Development workstation with sudo access
- ✅ Isolated VM (recommended for production evaluation)
- ✅ Docker-in-Docker container environments
- ⚠️ Shared production systems - review scripts first
- ❌ Unreviewed execution on critical infrastructure
Script Audit Checklist
Before running installation scripts:
- 1. Review
scripts/install_ubuntu_24_mvp.sh for apt/pip/docker commands - Review
scripts/bootstrap_eda_demo.sh for demo setup steps - Understand that
usermod -aG docker grants container escape potential - Verify network destinations (apt archives, PyPI, Docker Hub)
- Consider running in a disposable VM or container
See references/SECURITY.md for detailed security guidance.
eda-spec2gds 技能
⚠️ 安全须知: 本技能包含可选的系统安装脚本(scripts/installubuntu24mvp.sh、scripts/bootstrapeda_demo.sh),这些脚本需要 sudo 权限并会修改系统状态。这些脚本应仅在隔离的开发环境(虚拟机、容器或专用工作站)中运行,不得在生产系统上运行。核心技能操作(RTL 生成、文件管理、报告收集)基于文件操作,是安全的。
在工作区内执行分阶段、以工件为先的开源 EDA 流程。优先使用确定性脚本执行,使智能体专注于规划、生成、诊断和迭代。
工作流程
1. 首先规范化规格说明
- - 在编写 RTL 之前,将自由格式的需求转换为结构化的规格说明。
- 读取 references/spec-template.md 并生成 input/normalized-spec.yaml。
- 如果缺少时钟/复位、IO、目标流程或时序目标,则停止并向用户询问或记录明确的假设。
2. 初始化项目目录
- - 使用 references/workflow.md 中的布局,在 eda-runs// 下创建运行文件夹。
- 根据需要从 assets/project-template/ 复制或生成起始文件。
3. 分别生成 RTL 和测试平台
- - 将 RTL 写入 rtl/design.v。
- 将测试平台写入 tb/testbench.v。
- 将假设和设计说明记录在 reports/rtl-notes.md 中。
4. 按严格顺序运行验证
- - 在仿真之前运行 lint/语法检查。
- 在综合之前运行仿真。
- 在 OpenLane 之前运行综合。
- 除非用户明确要求,否则不要跳过失败的阶段。
5. 将工件视为事实来源
- - 保存日志、报告、VCD 波形、网表、配置和摘要文件。
- 优先使用文件输出而非 GUI 工具。GTKWave/KLayout 等 GUI 查看器是可选的辅助工具,不是必需的步骤。
6. 先诊断再编辑
- - 对于失败情况,读取 references/failure-patterns.md。
- 对失败进行分类:规格说明缺口、RTL 错误、测试平台错误、综合问题或后端/配置问题。
- 首先修复最可能的最小原因。
7. 清晰总结每个阶段
- - 说明通过/失败状态。
- 列出关键工件路径。
- 记录假设、阻碍因素和下一步建议操作。
硬性规则
- - 如果仿真失败,不要启动后端。
- 如果综合失败或顶层模块不明确,不要启动 OpenLane。
- 不要在不记录假设的情况下,默默发明缺失的接口、时钟、复位或时序目标。
- 除非用户明确要求高级功能,否则优先使用单时钟、无宏、无 CDC 的 MVP 流程。
- 使用 scripts/ 中的脚本进行可重复操作,而不是每次重新发明 shell 命令。
默认项目布局
除非用户已有现有项目结构,否则使用此布局:
text
eda-runs//
├── input/
│ ├── raw-spec.md
│ └── normalized-spec.yaml
├── rtl/
│ └── design.v
├── tb/
│ └── testbench.v
├── constraints/
│ └── config.json
├── lint/
│ └── lint.log
├── sim/
│ ├── compile.log
│ ├── sim.log
│ └── output.vcd
├── synth/
│ ├── synth.ys
│ ├── synth.log
│ ├── synth_output.v
│ └── stat.rpt
├── backend/
│ └── openlane_project/
├── reports/
│ ├── summary.md
│ ├── risks.md
│ ├── next-steps.md
│ └── ppa.json
└── metadata.json
资源映射
- - 当规格说明不完整或不明确时,读取 references/spec-template.md。
- 当需要分阶段执行顺序时,读取 references/workflow.md。
- 在设置或调试 OpenLane 之前,读取 references/openlane-playbook.md。
- 当运行失败且需要故障排查路径时,读取 references/failure-patterns.md。
- 在总结综合/后端报告时,读取 references/ppa-report-guide.md。
- 在为此工作流程准备 Ubuntu 主机时,读取 references/ubuntu-24-setup.md。
- 当想要一个具体的首次运行示例时,读取 references/demo-walkthrough.md。
- 当想要一个用于进度和工件的 Web 视图时,读取 references/dashboard-plan.md。
- 使用 scripts/ 中的脚本进行初始化、规格规范化、环境检查、安装、lint、仿真、综合、OpenLane、后端结果收集、GDS 预览渲染、工件 Web 服务、报告收集和运行摘要。
- 使用 assets/examples/simple-fifo/ 作为第一个冒烟测试用例。
- 使用 assets/openlane-config-template.json 作为默认后端配置模板。
快速开始
前提条件
在使用此技能之前,确保您的环境具有:
必需工具:
- - python3(3.8+)
- yosys(综合)
- iverilog + vvp(仿真)
- docker(OpenLane 后端)
可选工具:
- - verilator(更快的仿真)
- klayout(GDS 可视化)
- gtkwave(波形查看)
选项 A:环境已准备就绪
如果您的系统已安装 EDA 工具链:
- 1. 使用 scripts/initproject.py 初始化运行目录。
- 将用户需求保存到 input/raw-spec.md。
- 使用 scripts/normalizespec.py 和 references/spec-template.md 将其规范化为 input/normalized-spec.yaml。
- 编写或复制 rtl/design.v 和 tb/testbench.v。
- 运行 scripts/checkenv.sh 验证工具可用性。
- 依次运行 scripts/runlint.sh、scripts/runsim.sh、scripts/runsynth.sh。
- 仅在这些步骤通过后,准备 constraints/config.json 并运行 scripts/runopenlane.sh。
- 使用 scripts/collectreports.py 收集工件,并使用 scripts/summarize_run.py 进行总结。
选项 B:全新环境设置
⚠️ 仅在隔离/开发环境中运行!
- 1. 查看 scripts/installubuntu24mvp.sh 了解系统更改
- 运行安装脚本(需要 sudo):bash scripts/installubuntu24mvp.sh
- 重新登录或运行 newgrp docker 以应用 Docker 组更改
- 拉取 OpenLane 镜像:docker pull efabless/openlane:latest
- 验证安装:scripts/check_env.sh
- 继续执行快速开始选项 A
MVP 范围
默认使用支持以下功能的 MVP 流程:
- - 单个模块或小型设计
- 单时钟域
- 简单的复位行为
- 生成或手写的 Verilog RTL
- 基于测试平台的仿真
- Yosys 综合
- 使用模板配置的 OpenLane 后端运行
- 报告收集和总结
在尝试高级主题(如 CDC、SRAM/宏、多时钟约束、DFT 或签核级收敛)之前,请先与用户沟通。
安全与隔离
本技能的功能
安全的、基于文件的操作(核心技能):
- - 生成 RTL 和测试平台代码
- 管理项目目录结构
- 运行本地 EDA 工具(yosys、iverilog)
- 收集和总结报告
- 提供本地仪表板服务
修改系统的操作(仅限可选设置脚本):
- - 通过 apt 安装系统包(scripts/installubuntu24_mvp.sh)
- 修改 Docker 组成员身份(usermod -aG docker)
- 创建 Python 虚拟环境
- 从 Docker Hub 拉取 Docker 镜像
推荐部署方式
- - ✅ 开发工作站,具有 sudo 权限
- ✅ 隔离的虚拟机(推荐用于生产评估)
- ✅ Docker-in-Docker 容器环境
- ⚠️ 共享的生产系统 - 先审查脚本
- ❌ 在关键基础设施上未经审查的执行
脚本审计清单
在运行安装脚本之前:
- 1. 审查 scripts/installubuntu24mvp.sh 中的 apt/pip/docker 命令
- 审查 scripts/bootstrapeda_demo.sh 中的演示设置