Asynchronous Scalar RTP - Asynchronous Scalar RTP - 2025.2 English - XD100

Vitis Tutorials: AI Engine Development (XD100)

Document ID
XD100
Release Date
2026-03-27
Version
2025.2 English

For asynchronous RTP input, each iteration of the kernel tries to read the newest updated RTP value, but not synchronous to the RTP update.

The test case is async_rtp.

The kernel signature is:

template<int32 NUM>
void vect_add(input_buffer<int32,extents<NUM>>& __restrict in,output_buffer<int32,extents<NUM>>& __restrict out,int32 value);

You can find the RTP specification in aie/graph.h:

using namespace adf;
adf::port<adf::direction::in> value;
adf::connect<adf::parameter>(value, async(k.in[1])); 

Note that for RTP input, the default behavior is synchronous. So, it must specify asynchronous RTP input with keyword async (equivalent to adf::async as namespace adf applies).

The RTP calls for aiesimulator are in aie/graph.cpp:

gr.run(4);
gr.update(gr.value,10);

From 2025.1 onward, the AI Engine compiler only supports compiling the test bench that is inside main() or graph.cpp. There is no need to compile the complete AI Engine graph if RTP values are further updated. The --compile-testbench-only option if used during AI Engine compilation compiles only graph.cpp with the updated values. For example, make changes in graph.cpp as

gr.update(gr.value,20);

Recompile using the compile-testbench-only option inside the Makefile (line number 21):

v++ -c --mode aie --aie.compile-testbench-only --platform=${PLATFORM} --include="./aie" --work_dir=./Work

This finishes compilation quickly. From the simulation results, you can see that the RTP port values update to 20.

Note: It requires at least one update of the RTP input. Otherwise, the kernel execution stalls. A way to bypass initial RTP update is to set following constraints in the graph code (aie/graph.h). Thus, the kernel can start execution asynchronously with the specified initial value.

initial_value(k.in[1])=10;

You can find the host code for HW and HW emulation flows in sw/host.cpp:

auto ghdl=xrt::graph(device,uuid,"gr");
const int ITERATION=4;
	
ghdl.run(ITERATION);
ghdl.update("gr.k.in[1]",10);