3. Receiving the data using receive_data_with_size API(expected_data_size) - 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.receive_data_with_size(data_out_cls, 1024)

This API is a blocking API and it will wait till specified data i.e. total 4096 bytes is received in four iterations at the output port. Once received the specified data size, out_data_cls byte array. You can convert the byte array into user data type using the conversion APIs. For conversion APIs, refer Writing Traffic Generators in C++

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 classifier is validated against the golden output (classifier_golden.txt).