Xilinx / Xilinx/Vitis-Tutorials

How to implement sliding window with persistent line buffers using input_buffer in AI Engine?

Open
#472 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
1.6k
Forks
627
PR merge metrics
No merged PRs in 30d

Description

Hello,

I’m working on a stencil-based AI Engine kernel where I want to implement a sliding window using local memory. My goal is to reuse previously loaded rows and update only one row per iteration. Here's the scenario:

Suppose I have 5 rows of data:
ROW 1
ROW 2
ROW 3
ROW 4
ROW 5

In the first iteration, I load ROW 1, ROW 2, ROW 3 into local memory (e.g., using input_buffer).

In the next iteration, I want to load only ROW 4, discard ROW 1, and align memory to now contain ROW 2, ROW 3, ROW 4.

The same logic continues: shift, reuse, update only the latest row.

However, when I use a plio with input_buffer, it seems the entire buffer gets overwritten with new data in each iteration.
This prevents me from preserving previous rows in local memory across iterations.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name a repository file or test. Start by locating the AI Engine stencil examples and documentation for input_buffer and plio, then verify how buffer contents are replaced across iterations. Done means identifying and documenting a supported way to retain prior rows while loading only the next row, or clearly establishing the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.