Circular Output Buffer - Circular Output Buffer - 2026.1 English - UG1603

AI Engine-ML Kernel and Graph Programming Guide (UG1603)

Document ID
UG1603
Release Date
2026-07-08
Version
2026.1 English

Declare kernel function k1 with input stream operates on data type int32 that is named in0 and circular 1d output buffer operates on data type int32 that is named out0.

void k1(input_stream<int32> *in0, output_circular_buffer<int32, adf::extents<OUTPUT_SAMPLE_SIZE>> & out0)
{
    auto out0Iter = aie::begin_circular(out0);
    for (int ind = 0; ind < OUTPUT_SAMPLE_SIZE; ++ind)
    {
        *out0Iter++ = readincr(in0);
    }
}
Important: When kernels are on the same tile in the AI Engine, you can apply memory addressing optimizations. Some restrictions can arise due to this optimization. For example, if K1 and K2 are on the same tile and connected through an output-to-input buffer, they must use the same type of addressing. This means they can either opt for linear or circular addressing, but they cannot have a mixture of both.

This limitation is not applicable to x86 simulation because it only emulates functional aspects of AI Engine tiles and memory. For more details on x86 simulation models, refer to Limitations in AI Engine Tools and Flows User Guide (UG1076).