1D Linear With Zero Pre and Post-padding with buffer boundary setting - 2025.1 English - XD100

Vitis Tutorials: AI Engine Development (XD100)

Document ID
XD100
Release Date
2025-08-25
Version
2025.1 English

In this example, the input data is transferred from the source to the destination with zero pre and post-padding. The input data is read in two tiles. As the stride is larger that the tile width, some data inside the buffer won’t be transmitted. The new parameter here is the boundary that restrict the buffer area that is read and transmitted:

adf::read_access(mtxin.out[0]) = adf::tiling(
    {.buffer_dimension = {256},
     .tiling_dimension = {128},
     .offset = {-16},
     .tile_traversal = {{.dimension = 0, .stride = 144, .wrap = 2}},
     .boundary_dimension = {96}});

In this case the offset is set to -16, so the DMA will prepend 16 zeros before the data is transferred. As the tiling dimension is 128, 16 zeros will be transferred after the buffer. The boundary being set at 96, zeros will be transmitted at the end of the first tile ( tile width (128) - boundary (96) + offset (-16) = 16 zeors at the end). The second tile is only zeros:

1D Linear Transferring Prepend

We can display the output data for the 2 iterations (4 ouput tiles):

Utils/GetTiles.py doc_x86simulator_output/data/Output_15.txt 1Do 128 0 3

The output is:

------------------------------------------------------

filename: doc_x86simulator_output/data/Output_15.txt
NCols: 128
NRows: 1
NLayers: 1

------------------------------------------------------

Static Tile Selection

Tile: 0
 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  2  3    ...    92 93 94 95  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
------------------------------------------------------------
Tile: 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0    ...    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
------------------------------------------------------------
Tile: 2
   0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0 1000 1001 1002 1003    ...    1092 1093 1094 1095    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
------------------------------------------------------------
Tile: 3
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0    ...    0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
------------------------------------------------------------