Agent 生成器
- 作者仓库星标 140
- 作者更新于 实时读取
- 作者仓库 digital-chip-design-agents
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @chuanseng-ng · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: fpga-emulation
description: > the digital-chip-design-agents:fpga-orchestrator agent and pass the full user request and any…
category: 通用
runtime: 无特殊运行时
---
# fpga-emulation 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Invocation / Pre-run Context / Purpose”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Invocation / Pre-run Context / Purpose”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Invocation / Pre-run Context / Purpose”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: fpga-emulation
description: > the digital-chip-design-agents:fpga-orchestrator agent and pass the full user request and any…
category: 通用
source: chuanseng-ng/digital-chip-design-agents
---
# fpga-emulation
## 什么时候使用
- 把通用方向的常用动作沉淀成 Agent 可调用的技能 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不需要额外…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Invocation / Pre-run Context / Purpose」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "fpga-emulation" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Invocation / Pre-run Context / Purpose
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Skill: FPGA Emulation & Prototyping
Invocation
- If invoked by a user presenting an FPGA prototyping task: immediately spawn
the
digital-chip-design-agents:fpga-orchestratoragent and pass the full user request and any available context. Do not execute stages directly. - If invoked by the
fpga-orchestratormid-flow: do not spawn a new agent. Treat this file as read-only — return the requested stage rules, sign-off criteria, or loop-back guidance to the calling orchestrator.
Spawning the orchestrator from within an active orchestrator run causes recursive delegation and must never happen.
Pre-run Context
Before executing or advising on any stage, read the following files if they exist:
memory/fpga/knowledge.md— known failure patterns, successful tool flags, PDK/tool quirks. Incorporate its guidance into every stage decision. If absent, proceed without it.memory/fpga/run_state.md— current run identity (run_id,design_name,tool,last_stage). Use this to resume correctly after interruption. If absent, a new run is starting; the orchestrator will create this file before the first stage.
This pre-run read applies whether this skill is loaded by a user or called by the orchestrator mid-flow. It ensures the fix database is consulted before any diagnosis step.
Purpose
Port an ASIC design to an FPGA prototype platform for pre-silicon hardware/ software co-development. The FPGA prototype is not cycle-accurate but provides functional and architectural validation months before silicon.
Supported EDA Tools
Open-Source
- Yosys (
yosys) — open-source synthesis for Xilinx/Intel/Lattice FPGA targets - nextpnr (
nextpnr-xilinx,nextpnr-ice40,nextpnr-ecp5) — place-and-route for open-source flows - OpenFPGALoader (
openFPGALoader) — universal FPGA programmer - Project IceStorm — iCE40 FPGA toolchain (icepack, iceprog, icetime)
- Project X-Ray — Xilinx 7-series bitstream documentation
Proprietary
- Xilinx Vivado (
vivado) — synthesis, implementation, and bitstream generation for AMD/Xilinx - Intel Quartus (
quartus_sh) — synthesis and programming for Intel/Altera FPGAs - Microchip Libero (
libero) — synthesis and programming for PolarFire/SmartFusion FPGAs - Synopsys Synplify — FPGA synthesis front-end targeting multiple device families
Stage: rtl_adaptation
ASIC → FPGA Substitutions
| ASIC Element | FPGA Replacement |
|---|---|
| SRAM macros | BRAM/URAM (Xilinx) or M20K (Intel) |
| Analog PLLs | MMCM (Xilinx) or ALTPLL (Intel) |
| IO pad cells | FPGA IOB + IOBUF primitives |
| Analog/mixed-signal | Stub model or remove |
| DFT scan logic | Remove — not needed on prototype |
| Power management cells | Remove — FPGA handles internally |
Memory Replacement Rules
- Match port configuration (single-port vs dual-port)
- BRAM has 1-cycle read latency — verify RTL handles this
- Memories > available BRAM: use external DDR via MIG/HBM controller
- Use
XPM_MEMORY(Xilinx) or equivalent portable macros
Clock Replacement Rules
- Replace ASIC PLL with MMCM (Xilinx) or ALTPLL (Intel)
- Scale all clocks to FPGA prototype frequency (typically 50–100 MHz from ≥ 1 GHz ASIC)
- Maintain same ratio between clock domains
- Use BUFG for all global clocks — never route clocks on data fabric
QoR Metrics to Evaluate
- No ASIC-specific primitives remain in adapted RTL
- All memories mapped to BRAM or external DDR
- Adapted RTL: lint clean, 0 errors
- Functional sim: adapted RTL produces same outputs as ASIC RTL
Output Required
- Adapted RTL file set
- Substitution log (what was replaced and why)
- BRAM and MMCM resource estimate
Stage: partitioning
Domain Rules
- Target utilisation per FPGA: <
design_state.constraints.fpga.lut_util_pct_max% LUT (default: 70%) — leave room for ILA debug cores - Minimise inter-FPGA signal count — each signal uses a physical connector pin
- Never cut timing-critical paths at partition boundaries
- Keep complete clock domains within a single FPGA wherever possible
- Inter-FPGA: Aurora or GTH SERDES for high-speed; GPIO for slow control
QoR Metrics to Evaluate
- Per-FPGA: LUT <
design_state.constraints.fpga.lut_util_pct_max% (default: 70%), BRAM <design_state.constraints.fpga.bram_util_pct_max% (default: 80%), DSP <design_state.constraints.fpga.dsp_util_pct_max% (default: 80%) - Inter-FPGA signal count: within connector pin budget
- No clock domain split without explicit bridge
Output Required
- Partition plan (block → FPGA mapping)
- Inter-FPGA signal list
- Physical connector pin assignment
Stage: fpga_synthesis
Domain Rules
- Full Vivado (Xilinx) or Quartus (Intel) flow: synth → opt → place → route → phys_opt → bitstream
- Timing target: WNS ≥
design_state.constraints.timing.wns_ns_target(default: 0) at prototype frequency - If WNS < 0: reduce frequency first; add pipeline registers second
- Utilisation targets: LUT <
design_state.constraints.fpga.lut_util_pct_max% (default: 70%), BRAM <design_state.constraints.fpga.bram_util_pct_max% (default: 80%), DSP <design_state.constraints.fpga.dsp_util_pct_max% (default: 80%)
Debug Infrastructure (add before bitstream)
- ILA: up to 64 probes per core; trigger on errors or key FSM states
- VIO: drive and sample control/status signals from PC
- JTAG-to-AXI: register access from PC without re-synthesising
Timing Closure Techniques
| Technique | When to Apply |
|---|---|
| Reduce clock frequency | First option — accept slower prototype |
| Add pipeline registers | When path identifiable and latency increase acceptable |
| Pblock constraints | Co-locate logic near BRAMs/DSPs |
| BUFG on high-fanout net | Break long high-fanout routes |
| phys_opt –directive AggressiveExplore | Last resort |
QoR Metrics to Evaluate
- WNS ≥
design_state.constraints.timing.wns_ns_target(default: 0) at prototype frequency - LUT <
design_state.constraints.fpga.lut_util_pct_max% (default: 70%), BRAM <design_state.constraints.fpga.bram_util_pct_max% (default: 80%), DSP <design_state.constraints.fpga.dsp_util_pct_max% (default: 80%) - Bitstream: no critical DRC errors
- ILA: configured on key debug signals
Output Required
- Bitstream (.bit or .sof)
- Timing summary report
- Utilisation report
- ILA probe definition file
Stage: bring_up
Bring-up Sequence (follow in order)
- Power-on: measure power rails; current within spec
- FPGA configuration: load bitstream via JTAG or SPI flash
- Clock verification: oscilloscope or ILA — verify frequency and stability
- Reset: toggle reset; verify all status bits de-assert
- Register access via JTAG-to-AXI: read chip-ID register — first functional test
- Memory test: write and read-back BRAM and external DDR
- UART console: CPU outputs boot messages — verify on serial terminal
- Minimal firmware: bare-metal binary executes and prints PASS
Common Failures
| Symptom | Likely Cause | Fix |
|---|---|---|
| MMCM lock never sets | PLL input freq out of range | Recheck MMCM config |
| CPU never outputs UART | Wrong reset vector or memory map | Check linker script |
| Register reads 0x00000000 | Base address wrong in SW | Compare memory_map.h vs HW |
| Register reads 0xDEADBEEF | Out-of-range access → DECERR | Fix address in driver |
| Intermittent data corruption | CDC issue in adapted RTL | Review clock crossings |
QoR Metrics to Evaluate
- All clocks: correct frequency (measured)
- CPU: reaches UART prompt
- All peripheral registers: readable/writable via JTAG
- DDR memory test: passes (if present)
Output Required
- Bring-up test results log
- ILA captures for any failures
- Known issues list for SW team
Stage: sw_validation
Domain Rules
- Run embedded-firmware skill validation suite on FPGA prototype
- Scale all timeouts by FPGA-to-ASIC frequency ratio (e.g., 20× for 50 MHz vs 1 GHz)
- Record all performance measurements at FPGA frequency; note scale factor
Hardware Bug vs Software Bug Triage
- Reproducible deterministically? → likely HW bug
- Same failure in RTL simulation? → RTL bug (fix RTL, not just firmware)
- Different from RTL sim? → FPGA adaptation issue
- Intermittent? → CDC or timing margin issue
Validation Tiers on Prototype
| Test | Pass Criteria |
|---|---|
| BSP | All peripherals accessible |
| Driver unit | 100% per driver |
| System | Correct output vs golden |
| Long-run (4 hr) | 0 lockups, 0 unexpected resets |
QoR Metrics to Evaluate
- All driver tests: PASS on prototype
- Application: correct output vs golden reference
- No lockups or unexpected resets in stress test
- Performance baseline: recorded at prototype frequency
Output Required
- SW validation report
- Performance baseline (labelled as prototype-frequency values)
- Bug list (HW vs SW classification)
- Performance projection to silicon frequency
Stage: proto_signoff
Sign-off Checklist
- All clocks verified at correct frequency
- CPU boots and reaches application code
- All peripheral registers accessible
- All driver tests pass on prototype
- Application produces correct output
- 4-hour stress: clean
- All HW bugs filed to RTL team with ILA captures
- Performance baseline documented
Output Required
- Prototype sign-off report
- Bug report for RTL team (HW bugs with ILA evidence)
- Performance baseline document
- Prototype user guide for SW development team
Constraint Validation
See plugins/meta/skills/pipeline-orchestration/SKILL.md §Constraints Schema for the authoritative schema and stage-entry validation rule.
Required at entry (rtl_adaptation) — hard-fail if missing:
constraints.clock.clk_mhz— ASIC target clock frequency; used to compute FPGA prototype frequency scale-down ratio
Optional (schema defaults apply when absent):
constraints.timing.wns_ns_target(default: 0) — WNS closure threshold at prototype frequencyconstraints.fpga.lut_util_pct_max(default: 70) — per-FPGA LUT utilisation ceiling %constraints.fpga.bram_util_pct_max(default: 80) — per-FPGA BRAM utilisation ceiling %constraints.fpga.dsp_util_pct_max(default: 80) — per-FPGA DSP utilisation ceiling %
Memory
Write on stage completion
After each stage completes (regardless of whether an orchestrator session is active),
append one newline-delimited JSON object to memory/fpga/experiences.jsonl. Do not
rewrite the file; always append. Consumers dedup by run_id on read (last-seen wins).
Use run_id = fpga_<YYYYMMDD>_<HHMMSS>_<6-char-random> where the 6-character suffix
is a lowercase hexadecimal string [0-9a-f] generated once at flow start using a secure
or pseudorandom RNG and reused unchanged on every stage append for this run.
Each appended record must conform to the following schema:
{
"run_id": "fpga_20260418_143052_a3f7b1",
"stage": "<stage_name>",
"timestamp": "<ISO-8601>",
"signoff_achieved": false,
"outcomes": { "<key>": "<value>" },
"metrics": { "<key>": "<value>" },
"tools": [{ "name": "<tool>", "version": "<version>", "result": "<pass|fail>" }],
"notes": "<optional free-text>"
}
Field types: run_id and stage are non-empty strings; timestamp is ISO-8601;
signoff_achieved is a boolean (false for all stage appends; true only in the final
sign-off append for the matching run_id); outcomes and metrics are objects; tools
is an array of objects; notes is an optional string.
Run state (write before first stage, update after each stage)
Write memory/fpga/run_state.md as the first action before launching any tool:
run_id: fpga_<YYYYMMDD>_<HHMMSS>_<6-char-random>
design_name: <design>
tool: <primary tool>
start_time: <ISO-8601>
last_stage: null
current_stage: <first stage name>
The 6-character random suffix must be lowercase hexadecimal [0-9a-f]. Update current_stage
when a stage starts, and set last_stage to the completed stage name only after successful
completion (then clear current_stage). This file lets wakeup-loop prompts and resumed
sessions identify the correct run. Create the file and parent directories if they do not exist.
Optional: claude-mem index
If mcp__plugin_ecc_memory__add_observations is available in this session, emit each
applied fix as an observation to entity chip-design-fpga-fixes after writing to
experiences.jsonl. Skip silently if the tool is absent — JSONL is the canonical record.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核