High-Level Synthesis — C/C++ algorithm analysis, HLS directive optimisation, synthesis execution, and co-simulation verification.

MITAuto-check: notes

Install Hls

skills CLI
$ npx skills add hdl-tools/digital-chip-design-agents --skill hls -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hdl-tools/digital-chip-design-agents hls --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hdl-tools/digital-chip-design-agents.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/hls/skills/hls .claude/skills/hls && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
hls
GitHub stars
213
Token cost
~2.8k tokens
SKILL.md length
1,180 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
MIT

At a glance

High-Level Synthesis — C/C++ algorithm analysis, HLS directive optimisation, synthesis execution, and co-simulation verification.

  • Works in 2 steps: memory/hls/knowledge.md — known failure… → memory/hls/run_state.md — current run…
  • Converting C/C++ to synthesisable RTL
  • SKILL.md covers Invocation, Pre-run Context, Purpose and Supported EDA Tools, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Hls is an agent skill from hdl-tools/digital-chip-design-agents. 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.

Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with C++. The repository describes itself as: Digital HDL Design Full-stack Agents. The licence is MIT.

When your agent uses it

  • Converting C/C++ to synthesisable RTL
  • Optimising for latency/throughput/area targets using pragmas
  • Verifying that generated RTL matches the golden C model

Example prompts

  • “/hls”

Requirements

  • Pre-approved tools (allowed-tools): Read, Write, Bash

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. memory/hls/knowledge.md — known failure patterns, successful tool flags, PDK/tool quirks.
  2. memory/hls/run_state.md — current run identity (run_id, design_name, tool,

What it can do on your machine

Read from SKILL.md and the folder at commit 38736b1. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Bash

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are cpp and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Hls loads about 2.8k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 1,180 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~76
When it runs · the whole SKILL.md, loaded when a task matches
~2.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NotePre-approves every shell command (allowed-tools: Bash)SKILL.md
    allowed-tools: Read, Write, Bash

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from hdl-tools/digital-chip-design-agents at commit 38736b1, republished under its MIT licence (© hdl-tools). 1,180 words, ~2,780 tokens.

Download SKILL.mdSave it as .claude/skills/hls/SKILL.md (or your agent's skills folder).
name
hls
description
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.
allowed-tools
Read, Write, Bash
version
1.0.0
author
chuanseng-ng
license
MIT

Skill: High-Level Synthesis (HLS)

Invocation

  • If invoked by a user presenting an HLS task: immediately spawn the digital-chip-design-agents:hls-orchestrator agent and pass the full user request and any available context. Do not execute stages directly.
  • If invoked by the 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.

Pre-run Context

Before executing or advising on any stage, read the following files if they exist:

  1. 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.
  2. 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.

Purpose

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.


Supported EDA Tools

Open-Source
  • Bambu HLS (bambu) — open-source HLS from Politecnico di Milano
  • LegUp HLS — FPGA-targeted HLS built on LLVM
  • Calyx / Futil — infrastructure for HLS compilers (academic)
  • MLIR/CIRCT (circt-opt) — compiler infrastructure for hardware design
Proprietary
  • Xilinx Vitis HLS (vitis_hls, dialect xilinx) — C/C++ to RTL for AMD/Xilinx devices
  • Cadence Stratus (stratus, dialect cadence) — SystemC/C++ HLS for ASIC and FPGA
  • Siemens Catapult (catapult, dialect siemens) — algorithmic synthesis from C++/SystemC

Stage: algorithm_analysis

HLS-Hostile Patterns (must fix before synthesis)
  1. Dynamic memory (malloc/new) → replace with fixed-size static arrays
  2. Recursive functions → convert to iterative with explicit stack
  3. Pointer aliasing → use restrict keyword or restructure accesses
  4. System calls (printf, file I/O) → wrap in #ifndef __SYNTHESIS__
  5. Function pointers → replace with switch/case dispatch
  6. Data-dependent loop bounds → add maximum bound + early-exit flag
  7. Floating-point → evaluate fixed-point (ap_fixed<W,I> for Vitis HLS)
Analysis Steps
  1. Identify innermost critical loop — the performance bottleneck
  2. Analyse loop-carried dependencies — limit achievable II
  3. Classify memory access: sequential (burst-able) vs random (expensive)
  4. Calculate theoretical minimum latency: trip_count × body_latency
QoR Metrics to Evaluate
  • All HLS-hostile patterns resolved
  • Critical loop identified with dependency graph
  • Theoretical II lower bound computed
Output Required
  • Algorithm analysis report
  • Fixed-point type recommendations (if applicable)
  • Critical loop dependency graph

Stage: directive_planning

Pipelining and Throughput
cpp
#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
Latency and Unrolling
cpp
#pragma HLS UNROLL factor=4        // Partial unroll (4 parallel copies)
#pragma HLS UNROLL                  // Full unroll (small trip counts only)
Memory and Interfaces
cpp
#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
Resource Binding
cpp
#pragma HLS BIND_OP op=mul impl=dsp      // Force multiply to DSP
#pragma HLS ALLOCATION operation=mul limit=4   // Cap DSP count
Strategy by Target
TargetPrimary Directives
Low latencyUNROLL + PIPELINE II=1
High throughputPIPELINE + DATAFLOW + ARRAY_PARTITION
Low areaALLOCATION limits + no UNROLL
BalancedPIPELINE II=1 inner loop + ARRAY_PARTITION
QoR Metrics to Evaluate
  • Achieved II: ≤ 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)
  • Latency: ≤ design_state.constraints.hls.target_latency_cycles cycles (one of target_ii or target_latency_cycles must be set)
  • Area: within budget
  • No directive synthesis errors
Output Required
  • Annotated source with all directives and justifications
  • Directive justification table

Stage: hls_synthesis

Domain Rules
  1. Synthesise at target clock period
  2. Check HLS report: latency, II, resource usage
  3. Compare achieved vs target — loop back to directives if miss
  4. Flag any warnings: unresolved dependencies, failed II, inferred latches
  5. Verify interface protocols match system integration requirements
QoR Metrics to Evaluate
  • II: matches or beats design_state.constraints.hls.target_ii (one of target_ii or target_latency_cycles must be set; prefer target_ii if both)
  • Latency: within design_state.constraints.hls.target_latency_cycles cycles (one of target_ii or target_latency_cycles must be set)
  • Area: within budget
  • No latch inference warnings
Output Required
  • HLS synthesis report (latency, II, resource summary)
  • Generated RTL files
  • Unresolved warnings with justification

Stage: rtl_qc

Domain Rules
  1. Run lint on HLS-generated RTL using the rtl-design skill's 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 them
  2. Verify no latches in generated RTL. With slang this requires full elaboration (slang -Weverything --ignore-unknown-modules <files>); --lint-only skips elaboration and reports zero latches on any input, so it can never fail this check
  3. Verify interface signal names match integration requirements
  4. Check all registers reset correctly
Show full SKILL.md (472 more words)Show less
QoR Metrics to Evaluate
  • Lint: 0 errors
  • No latches inferred
  • Interface ports match integration spec
Output Required
  • Lint report on HLS-generated RTL

Stage: cosimulation

Domain Rules
  1. C testbench drives RTL through HLS wrapper
  2. RTL outputs compared against C golden model automatically
  3. Measure actual latency and II — must match HLS report ±5%
  4. Exercise all code paths; test boundary conditions
Common Failures
FailureFix
Output mismatchCheck fixed-point overflow; increase bit widths
AXI handshake errorFix INTERFACE pragma configuration
Latency differsVerify loop bounds are static
X propagationInitialise all variables in C source
QoR Metrics to Evaluate
  • Co-simulation: 100% output match with C golden model
  • Latency measured: within design_state.constraints.hls.cosim_tolerance_pct% of HLS report (default: 5%)
  • II measured: matches HLS report exactly
  • No simulation errors or X propagation
Output Required
  • Co-simulation pass/fail report
  • Latency and II measurement log

Stage: hls_signoff

Sign-off Checklist
  • All HLS-hostile patterns resolved
  • Achieved II ≤ design_state.constraints.hls.target_ii (one of target_ii or target_latency_cycles must be set; prefer target_ii if both)
  • Latency ≤ design_state.constraints.hls.target_latency_cycles cycles (one of target_ii or target_latency_cycles must be set)
  • Area within budget
  • RTL QC: lint clean, no latches
  • Co-simulation: 100% output match; latency within design_state.constraints.hls.cosim_tolerance_pct% (default: 5%)
  • Interface ports match system integration spec
Output Required
  • HLS RTL package (generated .v/.sv files)
  • Co-simulation pass report
  • HLS QoR report (latency, II, area)
  • Interface documentation

Constraint Validation

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)

Memory

Write on stage completion

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.

Run state (write before first stage, update after each stage)

Write memory/hls/run_state.md as the first action before launching any tool:

markdown
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.

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-hls-fixes after writing to experiences.jsonl. Skip silently if the tool is absent — JSONL is the canonical record.

© hdl-tools, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/hls/skills/hls of hdl-tools/digital-chip-design-agents.

Open the folder on GitHubat commit 38736b1

Compare with similar skills

Hls next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Hls compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Hls this skillhdl-tools/digital-chip-design-agents213—~2.8kAutomated safety check: NotesMIT
Paddle BuildPaddlePaddle/Paddle24k—~1kAutomated safety check: PassApache-2.0
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
ONNX Runtime Shape Inference Safety Auditmicrosoft/onnxruntime22k—~3.3kAutomated safety check: PassMIT
Code Audit3stoneBrother/code-audit8921 repos~2.7kAutomated safety check: PassNone
Qt C++ Code Reviewx-tools-author/x-tools1.1k2 repos~4.3kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Paddle Build

    PaddlePaddle/Paddle

    A skill your agent uses when needing to compile, rebuild, or install Paddle from source after code changes.

    24k GitHub stars~1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Official

    Finds and fixes out-of-range output writes in ONNX Runtime operator shape-inference functions where a getNumOutputs guard admits too few outputs.

    22k GitHub stars~3.3k tokensUpdated today
    SecurityAuto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    892 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • Qt C++ Code Review

    x-tools-author/x-tools

    Read-only review of Qt6 C++ code that combines a deterministic lint script with six parallel analysis agents and reports only high-confidence issues.

    1.1k GitHub starsUsed in 2 repos~4.3k tokens
    DevelopmentAuto-check passed
  • Translation

    doxygen/doxygen

    Keeps all Doxygen and Doxywizard translations up to date across three mechanisms: translator C++ classes (src/translatorxx.h), Qt .ts locale files for the Doxywizard GUI (addon/doxywizard/i18n/)…

    6.6k GitHub stars~5.2k tokensUpdated 8 days ago
    Writing & ContentAuto-check passed

More from hdl-tools/digital-chip-design-agents

All 17 skills in this repo
  • Architecture

    hdl-tools/digital-chip-design-agents

    Microarchitecture exploration, PPA estimation, risk assessment, and architecture sign-off for digital chip design.

    213 GitHub stars~3.7k tokensUpdated 5 days ago
    Auto-check: notes
  • Compiler Toolchain

    hdl-tools/digital-chip-design-agents

    Compiler toolchain development for custom processor ISAs — LLVM/GCC backend, assembler, linker scripts, runtime libraries, and regression validation.

    213 GitHub stars~2.8k tokensUpdated 5 days ago
    Auto-check: notes
  • Dft

    hdl-tools/digital-chip-design-agents

    Design for Test — scan architecture planning, scan insertion, ATPG pattern generation, MBIST for embedded memories, and JTAG boundary scan.

    213 GitHub stars~3.3k tokensUpdated 5 days ago
    Auto-check: notes
  • Embedded Firmware

    hdl-tools/digital-chip-design-agents

    Embedded firmware and device drivers — BSP development, peripheral driver implementation (UART, SPI, I2C, GPIO, DMA, Timer), RTOS integration (FreeRTOS, Zephyr), and system validation.

    213 GitHub stars~2.6k tokensUpdated 5 days ago
    Auto-check: notes
  • Formal Verification

    hdl-tools/digital-chip-design-agents

    Formal property verification (FPV) and logical equivalence checking (LEC).

    213 GitHub stars~3.4k tokensUpdated 5 days ago
    Auto-check: notes
  • Fpga Emulation

    hdl-tools/digital-chip-design-agents

    FPGA prototyping — ASIC-to-FPGA RTL adaptation, multi-FPGA partitioning, synthesis and timing closure on FPGA, hardware bring-up, and software validation on the prototype.

    213 GitHub stars~3.4k tokensUpdated 5 days ago
    Auto-check: notes

Works with

Questions about Hls

What does Hls do?

High-Level Synthesis — C/C++ algorithm analysis, HLS directive optimisation, synthesis execution, and co-simulation verification. Hls is an agent skill from hdl-tools/digital-chip-design-agents. High-Level Synthesis — C/C++ algorithm analysis, HLS directive optimisation, synthesis execution, and co-simulation verification.

When should I use Hls?

Hls fits situations like: converting C/C++ to synthesisable RTL; optimising for latency/throughput/area targets using pragmas; verifying that generated RTL matches the golden C model.

How do I install Hls in Claude Code?

Run `npx skills add hdl-tools/digital-chip-design-agents --skill hls -a claude-code`. Or copy the skill folder (plugins/hls/skills/hls in hdl-tools/digital-chip-design-agents) into .claude/skills/hls in your project. Claude Code loads it when a task matches its description.

How do I install Hls in Codex?

Run `npx skills add hdl-tools/digital-chip-design-agents --skill hls -a codex`. Or copy the skill folder (plugins/hls/skills/hls in hdl-tools/digital-chip-design-agents) into .agents/skills/hls in your project. Codex loads it when a task matches its description.

Can I use Hls in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hdl-tools/digital-chip-design-agents --skill hls -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/hls, .gemini/skills/hls, .github/skills/hls and .opencode/skills/hls in your project.

What does Hls need to run?

SKILL.md names no scripts, command-line tools or credentials: Hls is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Write, Bash.

Does Hls access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Hls safe to install?

Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Hls use?

Hls is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Hls use?

About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Hls?

Skills that share tags, products or a category with Hls: Paddle Build (PaddlePaddle/Paddle, 24k stars), Fory Release (apache/fory, 4.6k stars), ONNX Runtime Shape Inference Safety Audit (microsoft/onnxruntime, 22k stars) and Code Audit (3stoneBrother/code-audit, 892 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Hls?

hdl-tools (a GitHub organization) maintains it in hdl-tools/digital-chip-design-agents, which has 213 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 3, 2026.

Source: hdl-tools/digital-chip-design-agents on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.