Continuously running kernels are a type of hardware kernel designed to run indefinitely until a reset event occurs. Unlike traditional software acceleration kernels that are called, execute, and return.
In SW acceleration kernels parameters can only be changed at the time the kernel is invoked or when the kernel is idle. However, with continuously running kernels, you cannot modify their arguments during execution in the usual way because they are always running. To dynamically modify kernel arguments (scalars and memory offsets) for continuously running kernels, AMD Vitis™ HLS provides the Direct I/O class, offering a convenient solution for updating these arguments on the fly.
Dynamic Parameter Adjustment using Direct I/O
AMD Vitis™ HLS offers a C++ template class hls::direct_io
specifically for modifying the kernel’s
scalar/ Memory offset arguments during execution.
Features of hls::direct_io
-
hls::direct_io
streams can be used only on the top-level functions - This class supports all the port-level protocols. The class supports the
following port protocols:
ap_none
,ap_ack
,ap_vld
, andap_hs
. - Direct I/O streams use blocking and non-blocking calls for read and writes.
- Direct I/O streams are coded similar to HLS Streams. However, they are implemented as wires based on the port protocols. Note: They are not implemented/synthesized as FIFO.