The example host program is in ./host/host_krnl_aurora_test.cpp. It use XRT Native API to load XCLBIN file, transfer data to and from the card, and control the start and finish of strm_dump and strm_issue. For krnl_aurora, since it is an always-run kernel, so the host only use the API read_register function to check the status of Aurora.
To compile the host program just enter:
make host
This will all GNU g++ tool to compile the host program and generate the executable host_krnl_aurora_test. To run it, use 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 will compare the received data and sent data, and report the data transfer throughput and data verification result. With the 10Gbps x 4 lanes configuration, the measured Aurora data transfer throughput is about 4.6GB/s. Refer to below example running log:
$ ./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