3. Receiving the data using receive_data_with_size () API - 2023.2 English

Vitis Tutorials: AI Engine

Document ID
XD100
Release Date
2023-11-29
Version
2023.2 English

In order to get the received data values from the classifier, use receive_data_with_size(exp_data_size) API call. This API needs expected data size (in bytes) as an argument.

out_classifier_data = out_classifier.receive_data_with_size(1024)
out_interpolator_data = out_interpolator.receive_data_with_size(1024)

This API is a blocking API and it will wait till specified data i.e. 4096 bytes is received in four iterations at the output port. Once received the specified data size, you can see the data values in the out_classifier_data and out_interpolator_data list.

Once the data is received in the list, you can dump it in a file for comparing with the golden output or you can process the data further into some other function based on the application. The output of the interpolator is dumped into a file and can be validated against the golden data(interpolator_golden.txt). The output of the classifier is validated against the golden output (classifier_golden.txt).

For more details on MATLAB APIs, refer Writing Traffic Generators in MATLAB

C++