With the RTL-based kernel added and host code updated, build the application, targeting hardware emulation through the updated makefile in the run2
directory. The makefile has been updated to add both the CPP and RTL-based kernels to the hardware platform file (xclbin
).
Navigate to the
./02-mixing-c-rtl-kernels/reference-files
directory.To build the application targeting hardware emulation, run the following makefile from the
./reference-files
directory.make all TARGET=hw_emu LAB=run2
As before, run emulation, and generate and review the Application Timeline by running the following commands from within the
./reference-files
directory.Set XCL_EMULATION_MODE environment variable for hardware emulation, and run the application.
export XCL_EMULATION_MODE=hw_emu ./host krnl_vadd.hw_emu.xilinx_u200_gen3x16_xdma_2_202110_1.xclbin
View the Application Timeline report in the Vitis analyzer.
vitis_analyzer xclbin.run_summary
Under Device>Binary Container, traverse along the timeline and zoom in.
You will now see both CUs, krnl_vadd_1 and rtl_kernel_wizard_0_1, show as running.After reviewing, close the Application Timeline, and exit Vitis analyzer.
Vitis core development kit applications can use any combination of kernels, regardless of the language they were developed in.
Because a CPP emulation file was packaged with the RTL Kernel (through the RTL Wizard), you can also run software emulation. To run software emulation, you can use the following steps:
# Build the application
make all TARGET=sw_emu
# Set XCL_EMULATION_MODE environment variable for software emulation
export XCL_EMULATION_MODE=sw_emu
# Run software emulation
./host krnl_vadd.sw_emu.xilinx_u200_gen3x16_xdma_2_202110_1.xclbin
# Open Vitis analyzer and view the timeline waveform
vitis_analyzer xrt.run_summary