技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
hls【数据与研究】High-Level Synthesis — C/C++ algorithm analysis, HLS directive optimisation, synthesis execution, and co-simulation verification. Use when converting C/C++ to synthesisable RTL, optimising for latency/throughput/area targets using pragmas, or verifying that generated RTL matches the golden C model.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
digital-chip-design-agents:hls-orchestrator agent and pass the full user
request and any available context. Do not execute stages directly.hls-orchestrator mid-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.
Before executing or advising on any stage, read the following files if they exist:
memory/hls/knowledge.md — known failure patterns, successful tool flags, PDK/tool quirks.
Incorporate its guidance into every stage decision. If absent, proceed without it.memory/hls/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.
Convert C/C++/SystemC algorithmic descriptions to synthesisable RTL. Covers algorithm analysis for HLS compatibility, pragma/directive optimisation, and co-simulation to verify RTL matches the golden C model.
bambu) — open-source HLS from Politecnico di Milanocirct-opt) — compiler infrastructure for hardware designvitis_hls, dialect xilinx) — C/C++ to RTL for AMD/Xilinx devicesstratus, dialect cadence) — SystemC/C++ HLS for ASIC and FPGAcatapult, dialect siemens) — algorithmic synthesis from C++/SystemCrestrict keyword or restructure accesses#ifndef __SYNTHESIS__ap_fixed<W,I> for Vitis HLS)#pragma HLS PIPELINE II=1 // Pipeline loop, target II=1
#pragma HLS DATAFLOW // Task-level pipelining
#pragma HLS LOOP_FLATTEN // Flatten nested loops
#pragma HLS LOOP_MERGE // Merge sequential loops
#pragma HLS UNROLL factor=4 // Partial unroll (4 parallel copies)
#pragma HLS UNROLL // Full unroll (small trip counts only)
#pragma HLS ARRAY_PARTITION variable=buf cyclic factor=4
#pragma HLS INTERFACE mode=axis port=data // AXI4-Stream
#pragma HLS INTERFACE mode=m_axi port=mem // AXI4 master
#pragma HLS INTERFACE mode=s_axilite port=ctrl // AXI4-Lite registers
#pragma HLS BIND_OP op=mul impl=dsp // Force multiply to DSP
#pragma HLS ALLOCATION operation=mul limit=4 // Cap DSP count
| Target | Primary Directives |
|---|---|
| Low latency | UNROLL + PIPELINE II=1 |
| High throughput | PIPELINE + DATAFLOW + ARRAY_PARTITION |
| Low area | ALLOCATION limits + no UNROLL |
| Balanced | PIPELINE II=1 inner loop + ARRAY_PARTITION |
design_state.constraints.hls.target_ii (one of target_ii or target_latency_cycles must be set; prefer target_ii if both — see Constraint Validation section)design_state.constraints.hls.target_latency_cycles cycles (one of target_ii or target_latency_cycles must be set)design_state.constraints.hls.target_ii (one of target_ii or target_latency_cycles must be set; prefer target_ii if both)design_state.constraints.hls.target_latency_cycles cycles (one of target_ii or target_latency_cycles must be set)lint_check ERROR and WARNING
levels. Generated RTL is linted for correctness — latches, multiple drivers, undriven
outputs, width truncation — not for the rtl-design naming and style rules, which a
generator will not follow; do not hand-edit generated RTL to satisfy themslang -Weverything --ignore-unknown-modules <files>); --lint-only skips elaboration and
reports zero latches on any input, so it can never fail this check| Failure | Fix |
|---|---|
| Output mismatch | Check fixed-point overflow; increase bit widths |
| AXI handshake error | Fix INTERFACE pragma configuration |
| Latency differs | Verify loop bounds are static |
| X propagation | Initialise all variables in C source |
design_state.constraints.hls.cosim_tolerance_pct% of HLS report (default: 5%)design_state.constraints.hls.target_ii (one of target_ii or target_latency_cycles must be set; prefer target_ii if both)design_state.constraints.hls.target_latency_cycles cycles (one of target_ii or target_latency_cycles must be set)design_state.constraints.hls.cosim_tolerance_pct% (default: 5%)See plugins/meta/skills/pipeline-orchestration/SKILL.md §Constraints Schema for the authoritative schema and stage-entry validation rule.
Required at entry (algorithm_analysis) — at least one must be non-null:
constraints.hls.target_ii — target initiation interval (one of target_ii or target_latency_cycles must be set; prefer target_ii if both)constraints.hls.target_latency_cycles — target latency in clock cycles (one of target_ii or target_latency_cycles must be set)Optional (schema defaults apply when absent):
constraints.hls.cosim_tolerance_pct (default: 5) — acceptable co-simulation latency deviation %constraints.clock.clk_mhz — target clock for synthesis (used if set; otherwise tool default)After each stage completes (regardless of whether an orchestrator session is active),
write or overwrite one JSON record in memory/hls/experiences.jsonl keyed by
run_id. This ensures data is persisted even if the flow is interrupted or called
without full orchestrator context.
Use run_id = hls_<YYYYMMDD>_<HHMMSS> (set once at flow start; reuse on each
stage update). Every JSON record written must include a top-level "run_id" field
whose value matches this key — this is what makes overwrites unambiguous. Set
signoff_achieved: false until the final sign-off stage completes.
Write memory/hls/run_state.md as the first action before launching any tool:
run_id: hls_<YYYYMMDD>_<HHMMSS>
design_name: <design>
tool: <primary tool>
start_time: <ISO-8601>
last_stage: <first stage name>
Update last_stage after each stage completes. This file lets wakeup-loop prompts
and resumed sessions identify the correct run without relying on in-memory state.
Create the file and parent directories if they do not exist.
If mcp__plugin_ecc_memory__add_observations is available in this session, emit each
applied fix as an observation to entity chip-design-hls-fixes after writing to
experiences.jsonl. Skip silently if the tool is absent — JSONL is the canonical record.