2. Running original (non-p2p) version of the design - 2022.2 English

Vitis Tutorials: Hardware Acceleration (XD099)

Document ID
XD099
Release Date
2022-12-01
Version
2022.2 English

Host code change to pick the devices

This tutorial host code picks two devices by their BDF.

30  auto device1_bdf= "0000:65:00.1"; // Device1 BDF, P2P should be enabled for this device
31  auto device2_bdf= "0000:b3:00.1"; // Device2 BDF, This device doing DMA-READ or DMA-WRITE, P2P enablement is not required

You must change the above lines to pick the right devices as per your setup. You may use xbutil examine which shows bdf of the devices.

Load pre-built XCLBIN for destination device

For the destination device, we are just transferring the data without doing any operation, but we need to load a kernel so that one or more memory banks become visible by runtime.

You can run xbutil validate memory bandwidth test that loads a pre-built kernel so that all memory banks become visible by XRT

xbutil validate --device 0000:b3:00.1 -r mem-bw

Compile and Run

Compile the XCLBIN containing increment kernel for the source device

make xclbin

Compile the host-code

make exe

Execute the host-code

./host.exe

You will see an output like below

Execution of the kernel on source device
Buffer = 16384 Iterations = 1024
Throughput= 0.39GB/s
TEST PASSED