AI Engine APIs provide access
methods to read and write data from data memory, streaming data ports, and cascade
streaming ports which can be used by AI Engine
kernels. For additional details on the window and stream APIs, see
Window and Streaming Data
API in the AI Engine Documentation flow of the Vitis Unified Software Platform
Documentation (UG1416). In the
following example, the window readincr
(window_readincr_v8(din)
) API is used to read a window
of complex int16 data into the data vector. Similarly, readincr_v8(cin)
is used to read a sample of int16 data from the
cin
stream. writeincr_v4 (cas_out, v)
is used to write data to a cascade stream
output.
void func(input_window_cint16 *din,
input_stream_int16 *cin,
output_stream_cacc48 *cas_out){
v8cint16 data=window_readincr_v8(din);
v8int16 coef=readincr_v8(cin);
v4cacc48 v;
…
writeincr_v4(cas_out, v);
}