User-managed 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 host application, in accordance with the user-defined control protocol of the kernel.
XRT-managed 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 host application using an 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, allows multiple executions of the same kernel to be overlapped and run in a pipelined fashion and thus improve the overall application throughput.
- If required, overlapping 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.