With the host application code (host.cpp
) and the RTL kernel code (Vadd_A_B.xo
) added to the project, you are ready to build and run the project.
In the Hardware Kernel Project Settings view select the Active build Configuration: and set it to Hardware Emulation. The Hardware Emulation target is useful for:
Verifying the functionality of the logic that will go into the FPGA.
Retrieving the initial performance estimates of the accelerator and host application.
Note that the RTL kernel does not support software emulation.
IMPORTANT: You can add a C-model for software emulation to XRT-managed kernels as explained at Adding C-Models to RTL Kernels. However, this is not supported for user-managed kernels.
In the Assistant view, select the top-level system project
kernelTest_system
and click the Build command to build the active Emulation-HW build configuration.The different elements of the Vitis application project are built: the processor code (
host.cpp
), the HW link project to link the RTL kernel (.xo) to the target platform, and the top-level system project to package the design.TIP: Because the RTL kernel is imported as an
.xo
file, the kernel does not need to be compiled.In the Assistant view, select the Run button, and select Run Configurations.
Select the
System Project Debug
configuration and click the New launch configuration command to create a new configuration for the run.The
SystemDebugger_kernelTest_system
configuration is created.The host program takes the
xclbin
file as an input argument, which you must provide in the Program Arguments list.Select Edit next to
Program Arguments
.The Vitis IDE can automatically search and include the
xclbin
file when the Automatically update arguments is enabled.Click OK to add the arguments.
In the
Run Configurations
dialog box click Apply and then click Run to run the configuration, and then verify the results.
The Console window in the Vitis IDE displays TEST PASSED. You have built and run the application using your user-managed RTL kernel.