streamNToOne overload (5) - 2023.1 English

Vitis Libraries

Release Date
2023-12-20
Version
2023.1 English
#include "xf_utils_hw/stream_n_to_one/tag_select.hpp"
template <
    int _WInStrm,
    int _WTagStrm
    >
void streamNToOne (
    hls::stream <ap_uint <_WInStrm>> data_istrms [PowerOf2< _WTagStrm >::value],
    hls::stream <bool> e_data_istrms [PowerOf2< _WTagStrm >::value],
    hls::stream <ap_uint <_WTagStrm>>& tag_istrm,
    hls::stream <bool>& e_tag_istrm,
    hls::stream <ap_uint <_WInStrm>>& data_ostrm,
    hls::stream <bool>& e_data_ostrm,
    TagSelectT alg
    )

This function selects from input streams based on tags.

In this primitive, each tag decides the source of the output. It is assumed that input element has a corresponding channel-selection tag. The output data in data_ostrms only contains the input data. The tag stream is expected to pass the exactly number of tags to distribute the input data elements.

Parameters:

_WInStrm the width of input data
_WTagStrm the width of tag, pow(2, _WTagStrm) is the number of input streams.
data_istrms the input streams
e_data_istrms the end flag of input streams
tag_istrm the tag stream.
e_tag_istrm the end signal of tag stream.
data_ostrm the output stream.
e_data_ostrm the end signals of data_ostrm.
alg algorithm selector