/chip-design-hls:hlsfrom chip-design-hls
Guides conversion of C/C++/SystemC algorithms to synthesizable RTL using HLS tools like Vitis HLS, Bambu, and Catapult. Covers algorithm analysis, pragma optimization, and co-simulation verification.
Ships in chip-design-hls. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
<MEM> below is the resolved memory root, never the literal memory/ directory: an
explicit --memory-root, else $CHIP_DESIGN_MEMORY_ROOT, else the central default, else
the in-repo seed (python3 plugins/infrastructure/skills/memory-keeper/memory_root.py
prints it; the orchestrator's ## Memory section is authoritative).
Before executing or advising on any stage, read the following files if they exist:
<MEM>/hls/knowledge.md — known failure patterns, successful tool flags, PDK/tool quirks.
Incorporate its guidance into every stage decision. If absent, proceed without it.<MEM>/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 <MEM>/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 <MEM>/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.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub hdl-tools/digital-chip-design-agents --plugin chip-design-hlsOther plugins' skills for the same job