The kernel interfaces are used to exchange the data with the host application, other kernels, or device I/Os. HLS kernel interface requirements are listed below:
- Control interface
-
- XRT-managed or user-managed kernels: Kernels can only have a single AXI4-Lite interface.
- Data driven kernels: The AXI4-Lite interface is optional and used to pass scalar values to the kernel.
- Data interfaces
-
- XRT-managed or user-managed kernels: Any number and combination of AXI4 and AXI4-Stream interfaces.
- Data driven kernels: The kernel requires at least one AXI4-Stream interface.
- Clocks and resets
- As described in Clock and Reset Requirements.
Refer to the following table for the type of interface required based on the characteristics of the data movement in your application.
| Register (AXI4-Lite) | Memory Mapped (M_AXI) | Streaming (AXI4-Stream) |
|---|---|---|
|
|
|
User-managed PL kernels have no predefined execution mode. It is up to the kernel designer to implement the control protocol and the execution mechanism. It is the application developer's responsibility to manage the operation of the kernel by executing appropriate sequences of register reads and writes from the software application, in accordance with the user-defined control protocol of the kernel.
XRT-managed PL kernels, as described in Supported Kernel Execution Models in the XRT documentation, provide defined kernel execution modes supporting overlapping execution of the kernel, or sequential execution.
- A kernel is started by the software application using an XRT API call. When the kernel is ready for new data, it notifies the host application through bits in the control register.
- The default control protocol,
ap_ctrl_chain, supports pipelined execution enabling multiple executions of the same PL kernel to be overlapped to improve the overall application throughput. - If required, pipelined execution can be disabled by using the
ap_ctrl_hscontrol protocol which forces kernels to run sequentially, waiting until the prior run has completed before starting the next run. - Finally, a kernel can be auto-restarting, allowing it to run for a specified number of iterations, or until reset by the host application as described in Auto-Restarting Kernels in Vitis High-Level Synthesis User Guide (UG1399).