The objective of the mapper is to prevent buffer conflicts, where possible. The
mapper has different buffer optimization levels that try to increase the size of buffers
to prevent conflicts. These buffer optimization levels range from 0 (default) to 9. You
can invoke them with the Xmapper option, --Xmapper=BufferOptLevel<level num>.
At the highest buffer optimization level (9), one bank cannot contain two
buffers. However it is important to know that at the higher buffer optimization levels
it can be impossible for the mapper to find a solution. In this case it errors out. If
there are a large number of memory stalls, cycle through the BufferOptLevel options to see if fewer memory stalls are at higher bufferOptLevels.
Another possibility is to explicitly inform the mapper not to place two buffers
in the same bank. You can provide a directive to the mapper to not place buffers in the
same bank. This is useful if your analysis indicates a significant throughput
degradation caused by memory stall resulting from a bank conflict between buffer kernel_0.in[0] and kernel_1.out[0]. Use the following.
not_equal(location<buffer>(kernel_0.in[0]), location<buffer>(kernel_1.out[0]));
If DMA FIFOs are used in the design and they are placed in the same bank as
other buffers then the Xrouter option DMAFIFOsInFreeBankOnly can force the router to place these
FIFOs in free banks. This eliminates memory conflicts with the DMA FIFOs.
location<fifo>(net2) = { dma_fifo(aie_tile, 15, 0, 0x3100, 32) };