Host Program - 2023.2 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
XD099
Release Date
2023-11-13
Version
2023.2 English

The example host program is in ./host/host_krnl_aurora_test.cpp. It uses XRT Native API to load XCLBIN file, transfers data to and from the card, and controls the start and finish of strm_dump and strm_issue. For krnl_aurora, since it is an always-run kernel, so the host only uses the API read_register function to check the status of Aurora.

To compile the host program, enter:

make host

This is an all GNU g++ tool to compile the host program and generates the executable host_krnl_aurora_test. To run it, use the following command:

host_krnl_aurora_test [-m MEGABYTES]

MEGABYTES is the size of data block you want to transfer, and the default value is 100.

The host program compares the received data and sent data, and reports the data transfer throughput and data verification result. With the 10Gbps x 4 lanes configuration, the measured Aurora data transfer throughput is about 4.6Gbpss. Refer to the example running log below:

$ ./host_krnl_aurora_test 

------------------------ krnl_aurora loopback test ------------------------
Transfer size: 100 MB

Generate TX data block.
Program running in hardware mode
Load krnl_aurora_test_hw.xclbin
Create kernels
Create TX and RX device buffer
Transfer TX data into device buffer
Check whether startup status of Aurora kernel is ready...
Aurora kernel startup status is GOOD: 1000111111111
[12]channel_up [11]soft_err [10]hard_err [9]mmcm_not_locked_out [8]gt_pll_lock [7:4]line_up [3:0]gt_powergood
Begin data loopback transfer
Data loopback transfer finish
Transfer time = 21.805 ms
Fetch RX data from device buffer and verification
Data loopback transfer throughput = 4586.1 MB/s
Aurora Error Status:
SOFT_ERR: 0
HARD_ERR: 0

Data verfication SUCCEED