xilinx/ross-ai-assistant/hls-architect
Claude Code and agent skill by xilinx/ross-ai-assistant
- community
Checking that the SKILL.md file is still in the repository.
Convert input code to a multi-stage HLS dataflow, validate with the other hls skills, then hand off to optimize.
Install
npx vskill@latest install xilinx/ross-ai-assistant/hls-architectSKILL.md
HLS Design Architecture
Sources: "Parallel Programming for FPGAs" (Kastner et al.) + AMD UG1399 (Vitis HLS User Guide)
Preamble — Parse Arguments and Print Summary
Vitis environment
The Step 2e g++ verification depends on $XILINX_VITIS to locate ap_fixed.h.
- When called by `/hls-matlab-to-cpp` (the normal flow): the environment was sourced
in that skill's preamble — do NOT source it again, just verify it is set.
- When called standalone: source Vitis first via
./reference/setup.mdStep 1 or ensure$XILINX_VITISis set
Verify before proceeding:
Parse arguments
Parse $ARGUMENTS at the very start:
- Everything before
part=is theTHROUGHPUT_TARGET(may be empty) part=<value>→XPARTclock=<value>→CLOCK_NS
If XPART or CLOCK_NS are missing from $ARGUMENTS, ask the user for the missing values before proceeding.
Input Discovery — Find or Create Workspace
The architect looks for an existing workspace, or creates one if needed. Detection is based solely on filesystem state (not context variables).
Step 1: Check for existing frame_based/ workspace
Step 2a: If MODE=existing (workspace found)
Proceed to Interface Selection.
Step 2b: If MODE=new (no workspace found)
- Ask user for input file paths:
- "Where is your C++ kernel source file?" →
USER_KERNEL_PATH - "Where is your testbench file?" →
USER_TESTBENCH_PATH
- Ask user for design name (or derive from kernel filename):
- "What should the design workspace be named?" →
design_name - Default suggestion: extract basename without extension from kernel path
- Create workspace and copy files:
```bash # Create frame_based/ directory mkdir -p "$design_name/frame_based"
# Copy user files into canonical locations cp "$USER_KERNEL_PATH" "$design_name/frame_based/kernel.cpp" cp "$USER_TESTBENCH_PATH" "$design_name/frame_based/testbench.cpp" ```
- Print confirmation:
`` ───────────────────────────────────────────────────── [architect] New Workspace Created Design name : <design_name> Kernel copied : <USER_KERNEL_PATH> → <design_name>/frame_based/kernel.cpp TB copied : <USER_TESTBENCH_PATH> → <design_name>/frame_based/testbench.cpp ───────────────────────────────────────────────────── ``
After Input Discovery completes (both modes):
design_name/frame_based/kernel.cppexists ← INPUT to architectdesign_name/frame_based/testbench.cppexists
Proceed to Interface Selection.
Interface Selection
In interactive mode: ask the user which top-level interface the kernel should use. Present the options clearly:
If `autoconfirm=true` is in `$ARGUMENTS`: do NOT ask — infer IFACE_TYPE automatically from the top-level function signature:
- Pointer/array arguments (
float*,int[]) with nohls::streamargs →m_axi hls::streamarguments only →axis- Mix of pointer and
hls::stream→m_axi + axis - Pointer args alongside scalar-only control args →
m_axi + s_axilite
Print the inferred choice:
Store the answer as IFACE_TYPE. Use it when writing #pragma HLS INTERFACE pragmas and when deciding whether load_input / store_output use hls::stream ports or m_axi pointer arguments.
Print confirmation:
Directory Layout
After Input Discovery, the canonical workspace structure is:
Optional directories (only present if called from /hls-matlab-to-cpp):
All directories under rearchitect/ are created via ./reference/design-layout.md — never create directories manually.
Handoff Protocol
Every step ends with a → HANDOFF block. No step may begin until the previous step's Condition is satisfied.
Flow Overview
Print this immediately after the confirmation banner so the user can track progress:
Re-print this after each step with ✓ on completed steps and ← NEXT on the upcoming one.
Workflow
Step 1 / 3 — Study Domain Patterns
Invoke ./reference/vitis-libraries.md to study coding patterns from production HLS implementations before writing any code. Do NOT include or link Vitis Library headers in user designs — study, then write your own.
Print before proceeding:
Step 2 / 3 — Generate Architecture
Apply the two paradigms when converting input code to HLS:
| Paradigm | What it means | HLS mapping | |
|---|---|---|---|
| Producer-Consumer | N tasks, each with one responsibility, communicating through channels | One static function per stage; top-level with #pragma HLS DATAFLOW | |
| Streaming Data | Tasks exchange data via FIFOs (in-order, max overlap) or PIPOs (random-order, safer) | hls::stream for sequential access; PIPO for random access; avoid wide channels |
Draw the activity timeline before coding — shows when each stage executes across multiple invocations; reveals expected parallelism and bottlenecks.
Note: Loop-level pipelining (#pragma HLS PIPELINE) is NOT applied by the architect — see Pragma Rules below. The performance pragma handles throughput targets.
Fixed Top-Level Structure
The top level always has exactly three functions connected by one #pragma HLS DATAFLOW:
load_input()— reads from AXI master port(s), writes to stream(s) or PIPO(s)compute()— all algorithmic work; see decomposition rules belowstore_output()— reads from stream(s) or PIPO(s), writes to AXI master port(s)- Channels:
hls::streamfor sequential access, local arrays (PIPO) for random access - All
#pragma HLS INTERFACEpragmas on top-level function args only
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/hls-architect/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/xilinx/ross-ai-assistant/hls-architect)