Analyzes C/C++ code for Vitis HLS array-to-stream conversion compliance, checking stream and interface pragma usage, variable scope, and dataflow region constraints.
Ships in AMD Ross Agentic AI Assistant. 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.
Read when SKILL.md points to them.
You are focused on analyzing whether code follows the recommended coding style for array-to-stream conversion.
#pragma HLS stream variable=A type=T depth=D#pragma HLS interface [mode=ap_fifo|axis] port=A (mode is optional; for example, mode=ap_fifo or just ap_fifo)<TOP_FUNCTION>, if not provided, call /hls-component-basic-info skill to get top_function which is the top-level function name<TOP_FUNCTION> value which is the top-level function name (e.g. Kernel)1. Pragma Presence Validate that the code contains at least one of the following two array-to-stream pragmas:
#pragma HLS stream variable=A type=T depth=D#pragma HLS interface [mode=ap_fifo|axis] port=A (mode is optional; for example, mode=ap_fifo or just ap_fifo)2. Stream Pragma Rules (check if #pragma HLS stream variable=<VAR> [type=<T>] [depth=<D>] is used)
#pragma HLS stream variable=<VAR> [type=<T>] [depth=<D>]<VAR> can be:
<VAR> must be a local variable or a global variable<VAR> must be passed within the dataflow region<VAR> cannot be a top-level function argumenttype=<T> is optional:
<T> must be "fifo"depth=<D> is optional:
<D> must be a positive integer literal or const expression that evaluates to a positive integer3. Interface Pragma Rules (check if #pragma HLS interface [mode=ap_fifo|axis] port=A is used; mode is optional; for example, mode=ap_fifo or just ap_fifo)
A must be an array (possibly multi-dimensional) or a scalarA must be passed within the dataflow regionA must be a top function argumentmode must be either ap_fifo or axis4. Struct Element Type Rules (skip if array element type is not a struct type) If the array element type is a struct type, ensure that the whole struct is prepared in a separate struct variable and then stored at once in the array.
5. Struct Copy Assignment Rules (skip if array element type is not a struct type)
If the array element type is a struct type, ensure that no custom copy assignment operator is defined (such as A& operator=(const A& a)) except mark it as default (such as A& operator=(const A& a) = default) for that struct type.
6. Stream Pragma Access Pattern Rules (check only if stream pragma #pragma HLS stream variable=A type=T depth=D is used)
Ensure that each accessed array element is read exactly once, written exactly once, and that the read/write order is consistent:
If all applicable criteria are met, the code follows the recommended coding style for array-to-stream conversion. Otherwise, it does not follow the recommended coding style.
If the user asks you to fix code so it follows the recommended array-to-stream style:
```cpp
// fixed code here
```
What SKILL.md sets; muted values are Claude Code's defaults
/amd-ross-agentic-ai-assistant:hls-array-to-stream [<TOP_FUNCTION — top-level HLS function name e.g. 'Kernel'>]from AMD Ross Agentic AI Assistant
npx claudepluginhub xilinx/ross-ai-assistant --plugin amd-ross-agentic-ai-assistant50 skills in this plugin
/hls-architectConvert input code to a multi-stage HLS dataflow, validate with the other hls skills, then hand off to optimize./hls-burst-inferenceAnalyze whether burst inference optimization can be applied to a given C/C++ code snippet in Vitis HLS. Keywords: burst, HLS, pragma, m_axi, AXI, memory, optimization/hls-component-basic-infoGet Vitis HLS component basic informations for a given HLS component. The basic informations includes component name, source files, testbench files, include paths and top functionOther plugins' skills for the same job