Test case 2 - 2025.2 English - XD100

Vitis Tutorials: AI Engine Development (XD100)

Document ID
XD100
Release Date
2025-12-05
Version
2025.2 English

Replacing 16 by 12 is not a good solution as all the data is not processed.

There are many ways to overcome this limitation. The simplest one is to consider the data as a 2D data set of size 8x(8x4x4) = 8x128.

The write access is identical, but now the read access is slightly different as it considers only 2 dimensions:

  adf::read_access(mtxin.out[0]) = adf::tiling({
       .buffer_dimension = {Dim0, Dim1*D23},           // 8x128
       .tiling_dimension = {(Dim0 / 2), (Dim1 / 2)}, // 4x4
       .offset = {0, 0},
       .tile_traversal = {
           {.dimension = 0, .stride = Dim0 / 2, .wrap = 2},
           {.dimension = 1, .stride = Dim1 / 2, .wrap = 2*D23}
       }});

Let’s compile and simulate this test case:

make SECTION=memtile T2 aie aiesim

Let’s have a look to the data written to the output bythe kernel:

Utils/GetTiles.py memtile_aiesimulator_output/data/NoStamps_Output_0.txt 2D 4 4 0 7
Tile: 0
 0  1  2  3
10 11 12 13
20 21 22 23
30 31 32 33
------------------------------------------------------------
Tile: 1
 4  5  6  7
14 15 16 17
24 25 26 27
34 35 36 37
------------------------------------------------------------
Tile: 2
40 41 42 43
50 51 52 53
60 61 62 63
70 71 72 73
------------------------------------------------------------
Tile: 3
44 45 46 47
54 55 56 57
64 65 66 67
74 75 76 77
------------------------------------------------------------
Tile: 4
100 101 102 103
110 111 112 113
120 121 122 123
130 131 132 133
------------------------------------------------------------
Tile: 5
104 105 106 107
114 115 116 117
124 125 126 127
134 135 136 137
------------------------------------------------------------
Tile: 6
140 141 142 143
150 151 152 153
160 161 162 163
170 171 172 173
------------------------------------------------------------
Tile: 7
144 145 146 147
154 155 156 157
164 165 166 167
174 175 176 177
------------------------------------------------------------

The 4 first tiles are the 4 quarters of the first layer of the first image, the following 4 tiles are the 4 quarters of the second layer of the first image and so on. This is what we expected.