科研 Skill
FPGA时序收敛
timing-closure
Closes FPGA timing on a Vivado design via SynthPilot MCP, iterating implementation and applying the safest constraint fix until slack is non-negative. Use when a design fails timing.
SKILL.md
Timing Closure
A disciplined loop that drives a Vivado design to timing closure using the SynthPilot MCP tools. You are the conductor: measure → diagnose → classify → apply the safest fix → re-measure → repeat. Never make a number go green by hiding a real violation.
When to use
- "close timing", "fix WNS/TNS", "why doesn't this meet timing", "resolve setup violations"
- After synthesis or implementation reports negative slack.
When NOT to use
- No project open / no design to analyze → set the project up first (or use
full-flow-demo). - The user wants a one-shot report only, not iteration → just call
report_timing_summary. - Hold (min-delay) violations dominate and routing is already done → these usually need Vivado's own hold-fix; surface that rather than looping.
Prerequisites (verify first)
test_connectionsucceeds (Vivado + Tcl server up).- A project is open (
get_project_info). If only RTL exists, run synthesis first.
The loop
Step 0 — Baseline (measure, don't guess)
- Ensure a timed design exists. If none,
run_synthesis(orrun_synthesis_async+ pollget_run_statusfor large designs). Synthesis WNS is optimistic — true signoff is post-implementation, but synth WNS is a fast first signal. - Read the numbers:
report_timing_summary, thenextract_timing_metricsfor structured WNS/TNS/WHS/THS, failing-endpoint count, and per-clock breakdown. - Record the baseline (WNS, TNS, #failing endpoints, clocks involved). Every later iteration is compared against this. State it to the user.
If WNS ≥ 0 post-implementation: report closed, show the margin, stop. (Post-synth
positive is necessary but not sufficient — confirm with run_implementation.)
Step 1 — Diagnose the worst paths
analyze_critical_pathsandreport_worst_timing_paths→ the top failing paths.- For the worst path,
report_timing_path/report_datapath_delayto split delay into logic vs net vs clock-skew/uncertainty. report_high_fanout_nets→ fanout-driven net delay.get_all_clocks/analyze_clock_domain_timing/report_clock_interaction→ is the failing path intra-clock, or a cross-clock / async path that shouldn't be timed at all?
Step 2 — Classify the failure (this decides the fix)
Map the worst paths to one of these, in this priority order:
| # | Signature | Likely cause | Safe fix |
|---|---|---|---|
| A | Failing path crosses unrelated/async clocks, or is a config/quasi-static reg | Missing exception | set_false_path or set_clock_groups (async) / set_multicycle_path (multi-cycle) — only if genuinely valid |
| B | I/O path failing, no/incorrect input/output delay | Missing I/O constraint | set_input_delay / set_output_delay from the real interface spec |
| C | Big net delay, high fanout | Placement/fanout | implementation strategy (Performance_*), or recommend register duplication / max_fanout |
| D | Big logic delay, deep combinational path, intra-clock | Real logic depth | recommend RTL pipelining/retiming — do NOT fake-pass with exceptions |
| E | Small negative, close to met | Last-mile | set_implementation_strategy Performance_Explore / phys-opt; tighten nothing |
Step 3 — Apply the smallest safe change
- Constraints (A/B): apply the specific exception, then
save_constraints. Before anyset_false_path/set_multicycle_path, state the assumption ("treating CDC path reg_a→reg_b as async; valid only if a synchronizer exists") and get confirmation if the path could be real. - Strategy (C/E):
set_implementation_strategy(e.g. Performance_ExplorePostRoutePhysOpt) /set_synthesis_strategy. Cheapest lever, try before touching RTL. - RTL (D): describe the pipelining/retiming change and the expected slack gain; recommend, don't silently rewrite — hand back to the user to approve RTL edits.
- Apply one class of change per iteration so cause→effect is attributable.
Step 4 — Re-measure
- Re-run the affected stage (
run_implementationfor signoff;run_synthesisif you changed RTL/synth strategy). Use the async variants +get_run_statusfor long runs. - Re-read WNS/TNS via
extract_timing_metrics. Compare to baseline and to the previous iteration. Did it improve, regress, or stall?
Step 5 — Loop or stop
Repeat Steps 1–4 until one stop condition:
- ✅ Closed: WNS ≥ 0 (and WHS ≥ 0) post-implementation → report margin, list the changes applied, save constraints, stop.
- ⛔ No safe move left: remaining failures are class D (real logic depth) or require risky exceptions → stop, present the options + trade-offs, hand to the human.
- ⛔ Stalled: 2 consecutive iterations with no WNS improvement → stop, don't thrash.
- ⛔ Budget: a caller-specified max iterations reached.
Safety rails (do not violate)
- No fake-pass. Never apply
set_false_path/set_multicycle_path/waivers to a path that could be real just to clear a violation. If unsure it's safe, ask. - Evidence before claims. "Timing met" requires a fresh post-implementation
extract_timing_metricsshowing WNS ≥ 0 — never infer it. - Show your work. Each iteration: report what you changed, why (which class), and the before/after WNS/TNS. Keep a running summary table.
- One change class per loop so a regression is traceable.
- Hands off RTL unless the user approves the specific edit.
Output (each iteration + final)
Iter N | change: <what> (class <X>) | WNS <before> → <after> ns | TNS <before> → <after> | failing <n>→<m>
Final: closed/not-closed verdict, the ordered list of changes that worked, remaining risks, and (if not closed) the recommended RTL/architectural next step.
示例提示词
这个设计时序负裕量过不了,帮我迭代综合实现直到收敛。
所属插件
安装该插件会一并获得同领域的 63 个 Skill / MCP。
同插件的其他科研 Skill
- ANDES电力系统动态仿真Runs ANDES power-system dynamic studies via PowerMCP: power flow, eigenvalue analysis, and time-domain simulation. Use for damping, stability, or oscillation-mode questions.
- 电池选型与电源预算Builds an evidence-tagged power budget and sizes a manufacturable battery with pouch outline, seals, and derating. Use when sizing runtime, mAh, charging, or supply rails.
- FPGA比特流生成与烧录Generates a Xilinx FPGA bitstream and programs it over JTAG, or burns an MCS image into flash for power-on boot. Use when flashing a board or diagnosing boot failures.
- 硬件项目发布包组装Assembles a hardware release package (fab files, BOM/CPL, carts, assembly guide, hashed manifest) and runs a ready-to-build gate. Use before ordering prototypes.
- 时钟域交叉风险审查Audits clock-domain-crossing risk on an FPGA design and applies the smallest safe synchronizer or constraint fix. Use to resolve CDC violations before sign-off.
- 硬件产品认证合规规划Plans certifications a hardware product needs per target market (FCC, CE/RED, UKCA, battery/radio rules), with cost and lead-time estimates. Use before PCB or enclosure tooling.
- Vivado XDC时序约束编写Authors a Vivado XDC timing constraint set from scratch: clocks, I/O delays, and timing exceptions. Use first, before timing closure, on a design with no or incomplete constraints.
- N-1/N-2应急违规处置Playbook for N-1/N-2 contingency violations: ranks contingencies and proposes preventive and corrective actions. Use after a study shows voltage or thermal problems.
- 潮流计算不收敛诊断Playbook for power-flow convergence failures in PSS/E, PSLF, PowerWorld, pandapower, PyPSA, surge, or OpenDSS. Use when a case diverges or fails to solve.
- 硬件成本核算与采购Prices a hardware product at multiple volumes with one-time vs per-unit cost, landed cost per country, and sourcing leads. Use to estimate unit cost before a pitch.
- RTL仿真覆盖率收敛Measures RTL simulation code coverage and iteratively closes it toward a target by adding testbench stimulus. Use for a sign-off-grade coverage report.
- 配电网DER接纳能力治理Playbook for distribution DER hosting-capacity limits: voltage rise, reverse flow, and thermal limits from PV and storage. Use to estimate how much DER a feeder can host.
- 电子电路设计与审查Designs, audits, or corrects an electronic circuit from a brief, schematic, or netlist, checking power domains, reset sequencing, and ratings. Use for circuit review.
- 硬件可制造性红队审查Red-team audit that fix-loops a hardware project to ready-to-build, re-deriving parts, rails, battery physics, and cost. Use for a reality check before committing to a design.
- 电力系统动态稳定处置Playbook for dynamic stability problems: poor damping, angle instability, or sustained oscillations from eigenvalue or time-domain studies. Use after an unstable study result.
- Egret电力市场调度优化Runs Egret market/operations optimization (DC-OPF, AC-OPF, unit commitment) via PowerMCP. Use for cheapest dispatch, unit commitment, or congestion checks.
- 电子元器件选型核查Researches electronic components against primary sources: part numbers, datasheet limits, lifecycle, stock, and price breaks, one dossier per part. Use to verify or source a BOM.
- EMC电磁兼容预测试Plans grounding, shielding, and filtering for EMC/EMI, and runs an emissions pre-scan with a root-cause fix sequence. Use before a lab test or after a failed EMI scan.
- 产品外壳参数化建模Designs a hardware enclosure as parametric CAD with STEP/STL/GLB output, a DFM check, and Blender assembly validation. Use when designing a case or checking fit.
- 电网频率响应问题处置Playbook for frequency problems: low inertia, high RoCoF, weak primary response, or UFLS risk after loss of the largest unit. Use when a study flags frequency issues.
- FPGA RTL到比特流全流程Drives a Xilinx FPGA design end to end through RTL, simulation, synthesis, implementation, and bitstream, gated at every stage. Use to run the complete build flow in one pass.
- 硬件产品全流程总协调Leads a physical electronic product from idea to a doable design, coordinating specs, parts, battery, PCB, enclosure, render, and cost sub-skills. Use starting a hardware product.
- 硬件原理图与BOM审查Reviews hardware projects: checks schematics against datasheets, pin connections, and firmware-to-hardware alignment across KiCad/Altium files. Use for a design alignment check.
- FPGA ILA在线逻辑调试Inserts an Integrated Logic Analyzer, programs the board, arms a trigger, and reads captured waveforms on real FPGA hardware. Use when sim passes but the board fails.
常见问题
FPGA时序收敛能做什么?
Closes FPGA timing on a Vivado design via SynthPilot MCP, iterating implementation and applying the safest constraint fix until slack is non-negative. Use when a design fails timing。
如何安装FPGA时序收敛?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「FPGA时序收敛」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
FPGA时序收敛需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
FPGA时序收敛经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。