streamReorder - 2024.1 English

Vitis Libraries

Release Date
2024-05-30
Version
2024.1 English
#include "xf_utils_hw/stream_reorder.hpp"
template <
    typename _TIn,
    int _WindowSize
    >
void streamReorder (
    hls::stream <int>& order_cfg,
    hls::stream <_TIn>& istrm,
    hls::stream <bool>& e_istrm,
    hls::stream <_TIn>& ostrm,
    hls::stream <bool>& e_ostrm
    )

Window-reorder in a stream.

Suppose 8bit RGB values are multiplexed into one stream in R-G-B order, and a process module expects channel values in B-G-R order, then the data needs to be reordered in a window with size 3, and the configuration would be 2, 1, 0 .

It is assumed that the total number of elements passed through this module is multiple of window-size . Otherwise, the module may hang in execution.

The configuration is load once in one invocation, and reused until the end. Totally _WindowSize index integers will be read.

Parameters:

_TIn input type.
_WindowSize size of reorder window.
order_cfg the new order within the window, indexed from 0.
istrm input data stream.
e_istrm end flags for input.
ostrm output data stream.
e_ostrm end flag for output.