You can constrain shared buffers location by relative constraints or absolute constraints. Following is an example piece of code to constrain shared buffer to absolute locations:
adf::shared_buffer<int32> mtxA,mtxB;
......
adf::location<adf::buffer>(mtxA)=adf::address(/*COL*/6,/*ROW*/0,/*Address*/0);
adf::num_buffers(mtxB)=2;
adf::location<adf::buffer>(mtxB)={adf::address(7,0,0),adf::address(7,0,0x8000)};
Starting with the 2025.2 release, shared ping-pong buffers can now span two
adjacent memory tiles. This is an improvement over the previous limitation of a single
memory tile. This increases the combined buffer capacity to 1 MB. You must set both
offset arguments to 0. The two memory tiles share the
routing.
data = shared_buffer<int>::create( 128*1024 /*4B*128K=512KB*/, 1, 1);
adf::num_buffers(data) = 2; // ping-pong needs to be 1MB
location<adf::buffer>(data) = {address(6, 0, 0), address(7,0,0)}; // col,row,offset=0
Figure 1. Shared Ping-Pong Buffer in Two Memory Tiles