Vitis Model Composer lets you import C or C++ code to create new blocks. You can add these to a library for use in models alongside other HLS Library blocks. This feature lets you build custom block libraries for use in Model Composer.
Vitis Model Composer provides two options
for importing C or C++ code as an HLS block: xmcImportFunction and the HLS Kernel block. These options differ in capability
available and in how they define function interfaces.
- The
xmcImportFunctionallows you to import any HLS function with any supported HLS interfaces.xmcImportFunctioncreates from the function a block that can be connected to other HLS blocks. Vitis Model Composer can simulate the created block alongside other blocks and generate RTL code for synthesis. To create an IP for integration into a larger Vivado or Vitis design, you must enclose the HLS function in a subsystem. You can also enclose other HLS blocks. Then use the Interface Spec block to designate streaming ports for the subsystem. - The HLS Kernel block allows you to import an HLS Kernel. This is an RTL component suitable for use in the Vitis embedded system development flow. HLS Kernels are proper IPs on their own. HLS Kernels must have AXI streaming interfaces. In Vitis Model Composer, you can interface the HLS Kernel block with other HLS or AI Engine blocks and run through the Hardware Validation Flow.
If you want to use Vitis Model Composer to
interface the HLS design with an AI Engine design in a heterogeneous system, or validate the HLS design on
hardware using Vitis Model Composer, use the HLS Kernel flow
instead of the xmcImportFunction flow. Connecting AI Engine and Non-AI Engine Blocks covers the HLS Kernel flow.
The remainder of this chapter focuses on the xmcImportFunction flow.