Skip to content
Back to skills

Ic Workflow Router

ASecurity

FPGA 前端纯 Verilog-2001 工程的总控路由与闭环编排 Skill(兼顾通用可综合 RTL 规范)。 当用户提出端到端的 FPGA 硬件设计任务(如新建 IP、依据公开手册重构便携开源 IP、排查仿真失败、修复时序/CDC、优化 PPA、跑 Vivado 综合/实现)时,首先激活本 skill,按清晰阶段与门禁依次编排各原子子 skill。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentspythonbash

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add lihhf666-rgb/open-verilog-ip-skills --skill ic-workflow-router --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ic Workflow Router?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ic Workflow Router
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lihhf666-rgb-ic-workflow-router/badge)](https://www.skillsdirectory.com/skills/lihhf666-rgb-ic-workflow-router)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ic-workflow-router
description: >-
  FPGA 前端纯 Verilog-2001 工程的总控路由与闭环编排 Skill(兼顾通用可综合 RTL 规范)。
  当用户提出端到端的 FPGA 硬件设计任务(如新建 IP、依据公开手册重构便携开源 IP、排查仿真失败、修复时序/CDC、优化 PPA、跑 Vivado 综合/实现)时,首先激活本 skill,按清晰阶段与门禁依次编排各原子子 skill。
---

# FPGA 前端全流程总控编排(`ic-workflow-router`)

本 Skill 面向直接执行 **FPGA 硬件与开源 IP 开发**的 LLM 助手,将复杂前端任务拆解为**阶段清晰、门禁明确、可复现**的标准闭环。子 Skill 采用**按需加载**原则:先按本页主流程推进,遇到具体细分场景(如复杂状态机、仿真错拍、时序收敛、PPA 优化)时再查阅对应子 Skill。

---

## 一、端到端 6 步标准流水线

### Step 1:需求与规格冻结
* 明确顶层模块名、参数表、完整端口清单(方向/位宽/时钟域/协议)、复位契约(同步/异步、跨时钟单侧复位策略)、目标延迟拍数与边界行为。
* 若目标是参照已有 `.xci` 配置文件(仅明文参数与端口声明),可使用 `.agents/skills/ic-xilinx-vivado/scripts/parse_xci.py` 提取参数表与端口表(脚本会强制校验模块名与非零端口数,解析为空即非零退出):
  ```bash
  python .agents/skills/ic-xilinx-vivado/scripts/parse_xci.py <path/to/ip.xci> --stub <path/to/ip_stub.v> --out docs/<ip>_spec.md
  ```
* **注意合规边界**:仅依据明文配置参数与厂商公开用户手册编写独立 RTL,严禁尝试逆向、反编译或解密任何受保护/加密的第三方 IP。

### Step 2:编写纯 Verilog-2001 RTL(优先复用通用原语)
* 优先查阅机器可读原语清单 `rtl/common/manifest.json`(含依赖、合法参数、复位契约、延迟与吞吐),直接复用 `rtl/common/` 中 56 个纯 Verilog-2001 通用原语,避免重复手写:
  * 流处理与交换:`open_skid_buffer`、`open_axis_join2`、`open_axis_fork`、`open_axis_mux`、`open_axis_demux`(显式 `INVALID_POLICY`)、`open_axis_switch`(M×N 全交叉开关)、`open_axis_keep_pack`(`TKEEP` 压紧与字节对齐)、`open_axis_pkt_fifo`(存储转发帧 FIFO)、`open_axis_dwidth_conv`、`open_gearbox`
  * AXI4 事务与检查:`open_axi_burst_gen`、`open_axi_wr_engine`、`open_axi_rd_engine`、`open_axi_bram_ctrl`、`open_axi_checker`、`open_axil_csr`、`open_axil_demux`、`open_credit_ctrl`、`open_reorder_buf`
  * CDC / 存储 / DSP / 控制:`open_cdc_sync`、`open_rst_sync`、`open_cdc_pulse`、`open_cdc_handshake`、`open_edge_debounce`、`open_async_fifo`、`open_sync_fifo`、`open_sdp_ram`、`open_tdp_ram`、`open_cordic`、`open_fir_transposed`、`open_irq_ctrl`、`open_rr_arbiter` 等
* 使用清单工具按拓扑依赖自动生成 `filelist.f`,杜绝漏文件或顺序错误:
  ```bash
  python .agents/skills/ic-verilog-style/scripts/manifest_tool.py filelist \
    --manifest rtl/common/manifest.json --modules open_axi_wr_engine open_axis_keep_pack --out build/filelist.f
  ```
* **Blocking AXI-Stream 流水线标准结构**:
  ```text
  [open_axis_join2 (1 拍)] ──▶ [N 级核心流水线 (统一 pipe_en 使能, N 拍)] ──▶ [open_skid_buffer (1 拍)]
  总延迟 Latency = 1 + N + 1 = N + 2 拍
  ```
* **纯 Verilog-2001 核心纪律**(详见 `ic-verilog-style`):
  1. 文件首尾规范使用 `` `timescale 1ns / 1ps ``、`` `default_nettype none `` 与 `` `default_nettype wire ``;
  2. 禁用 SystemVerilog 语法(禁止 `logic`、`always_ff`、`always_comb`、`for (int i=...)`);
  3. 显式对齐所有运算位宽,仅复位控制/有效位寄存器,数据通路寄存器不接复位。

### Step 3:门禁 1 — 双工具 Lint 与参数矩阵回归
运行跨平台一键 Lint 脚本(Linux/macOS 原生执行,Windows 自动调用 WSL),通过 Verilator `1364-2001 -Wall` 与 Icarus Verilog `-g2001 -Wall` 检查:
```bash
python .agents/skills/ic-verilog-style/scripts/lint_v2001.py \
  --top <TOP_MODULE> \
  --rtl rtl/<ip>.v rtl/common/open_skid_buffer.v
```
若改动了通用原语,必须同步通过 `manifest_tool.py lint-matrix`(覆盖最小值、典型值、非二次幂与上界参数组合):
```bash
python .agents/skills/ic-verilog-style/scripts/manifest_tool.py lint-matrix \
  --manifest rtl/common/manifest.json --modules <MODULE_NAME> --result-json build/lint_matrix_result.json
```
* **退出门禁**:退出码为 `0` 且无编译警告。若有语法或位宽警告,查阅 `ic-verilog-style` 修正后复测。

### Step 4:门禁 2 — 三层分离验证与仿真 `result.json` 门禁
严禁将协议合法性、事务正确性与逐拍延迟混为一谈,必须按以下 **三层分离验收**:
1. **协议层(Protocol)**:挂载在线检查器(`open_axi_checker` / `open_axis_checker`)及测试台握手断言,验证 `VALID` 不掉拍、payload 稳定、4 KiB 不越界、`WLAST` 与 `AWLEN` 匹配、无死锁、单侧/双侧复位恢复。
2. **事务层(Transaction)**:以包/突发/矩阵为单位对比参考模型(Scoreboard),验证零丢包、零重复、数据与 `TKEEP`/`TID`/`TDEST`/`TUSER`/`BRESP` 一致;**允许合法的内部调度与流水深度差异**。
3. **逐拍层(Cycle-Accurate,按需启用)**:仅当需求明确要求替换既有 `.xci` 且保持完全一致延迟时,才与参考记录进行逐拍对比;按 **`.xci` 配置 + 器件型号 + 工具版本** 归档参考记录,避免不同工具版本的合法差异误报。

* **AXI-Stream 采样铁律**:在 `dut->eval()` 之后、时钟上升沿跳变**之前**锁存 `tvalid && tready`;输入 `tvalid` 拉高后在握手完成前必须保持 `tvalid` 与 `tdata` 稳定。
* 运行跨平台一键编译仿真脚本(带覆盖率与统一 `result.json` 门禁):
  ```bash
  python .agents/skills/ic-sim-debug/scripts/run_verilator_cpp.py \
    --top <TOP_MODULE> \
    --rtl rtl/<ip>.v rtl/common/open_skid_buffer.v \
    --tb sim/tb_<ip>.cpp \
    --build-dir build/obj_sim \
    --coverage --min-line-cov 80 --min-branch-cov 80 \
    --result-json build/obj_sim/result.json
  ```
* **退出门禁**:即使测试台进程返回 0,只要日志检测到 `Errors=N`(N>0)/`FAIL`/`MISMATCH`(退出码 `4`)、缺少 `coverage.dat`(退出码 `5`)或覆盖率未达阈值(退出码 `6`),脚本均返回非零退出码。

### Step 5:门禁 3 — Vivado OOC 综合/实现、退出码检查与扫频 PPA 归档
Windows 下若 `vivado.bat` 已在 `PATH` 中,脚本将通过 `shutil.which()` 自动解析完整路径(亦可显式设置 `VIVADO_BIN`):
```bash
# 快速综合体检(Post-Synth):
python .agents/skills/ic-xilinx-vivado/scripts/run_ooc_synth.py \
  --top <TOP_MODULE> --part <TARGET_PART> \
  --rtl rtl/<ip>.v rtl/common/open_skid_buffer.v \
  --out-dir build/reports/r0 --name <ip>_r0 --clk aclk --period 5.0

# 交付前真实布局布线 + CDC/Methodology/Power 完整签核(--impl 自动开启 --signoff):
python .agents/skills/ic-xilinx-vivado/scripts/run_ooc_synth.py \
  --top <TOP_MODULE> --part <TARGET_PART> \
  --rtl rtl/<ip>.v rtl/common/open_skid_buffer.v \
  --out-dir build/reports/r0_impl --name <ip>_r0 --clk aclk --period 5.0 --impl
```
* **退出门禁与统一 `result.json`**:脚本自动生成 `<out-dir>/result.json`(可通过 `--result-json` 自定义路径),并按失败类型返回明确非零退出码:
  * `0`:全部通过(必需报告齐全、`WNS >= 0`、`WHS >= 0`、`Latch = 0`、`CDC Critical/Unsafe = 0`)
  * `2`:必需报告缺失
  * `3`:时序违例(`WNS < 0` 或 `WHS < 0`;仅在扫频探测失败点时显式加 `--allow-timing-fail`)
  * `4`:推断出锁存器(`Latch > 0`)
  * `5`:存在 `CDC Critical / Unsafe` 路径
* **主频口径与扫频记录规范**:
  * 公式推导值 `1000 / (Period - WNS)` 仅标记为 **`Est Fmax (Formula)`**,严禁冒充实测主频。
  * 性能验收必须采用**同约束对照 + 扫频双点记录**,至少记录下表字段(按器件型号、Vivado 版本与约束周期归档):
    | 模块 / 参考配置 | 器件 / 工具版本 | 约束周期 (ns) | LUT / FF / BRAM / DSP | WNS / WHS (ns) | 扫频最高通过点 (MHz) | 扫频下一失败点 (MHz / WNS) |
    | :--- | :--- | :---: | :---: | :---: | :---: | :---: |
    | `<top>` (`<params>`) | `<part>` / `<ver>` | `<T>` | `<lut>/<ff>/<bram>/<dsp>` | `<wns>/<whs>` | `<pass_mhz>` | `<fail_mhz>` (`<neg_wns>`) |
* **多文件交付规范**:交付复杂 IP 时,附带 `manifest_tool.py filelist` 生成的 `filelist.f` 与寄存器偏移文档(若含 AXI-Lite CSR)。

### Step 6:量化 PPA 迭代优化(可选)
* 当需要进一步压缩 LUT/FF/BRAM/DSP 或提升主频时,按 `ic-ip-optimize` 闭环执行:每次仅施加 1 项原子优化,重复 **Lint → 仿真回归 → Vivado 综合/实现**,负收益立即回滚。

---

## 二、按需查阅的子 Skill 索引

| 使用场景 | 子 Skill 路径 |
| :--- | :--- |
| 纯 Verilog-2001 编码规范、参数矩阵与 Lint 排错 | `.agents/skills/ic-verilog-style/SKILL.md` |
| 状态机设计、AXI-Stream 握手防死锁与守卫可满足性检查 | `.agents/skills/ic-fsm-design/SKILL.md` |
| 仿真搭建、错拍定位、覆盖率与多语言协同 | `.agents/skills/ic-sim-debug/SKILL.md` |
| 规格冻结与开源 IP 设计方法论 | `.agents/skills/ic-ip-gen/SKILL.md` |
| PPA 量化优化闭环与原子优化菜单 | `.agents/skills/ic-ip-optimize/SKILL.md` |
| 时序收敛(WNS/WHS)与 CDC 跨时钟域 | `.agents/skills/ic-timing-cdc/SKILL.md` |
| Vivado 命令行 Batch Tcl、扫频签核与报告解析 | `.agents/skills/ic-xilinx-vivado/SKILL.md` |

---

## 三、通用工程纪律
1. **修改必回归**:任何 RTL 改动(包括修时序或加综合属性)后,必须重新通过 Lint 与仿真回归。
2. **数据真实可溯**:所有 LUT/FF/BRAM/DSP/WNS/WHS 数值必须来自真实工具运行输出,严禁估算或捏造。
3. **防空转上限**:同一类错误连续修复 5 轮仍未解决时,停止盲目尝试,向用户清晰说明根因、已尝试方案与备选决策。

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.