.. index:: pair: class; xf::dsp::aie::widget::api_cast::widget_api_cast_graph .. _doxid-classxf_1_1dsp_1_1aie_1_1widget_1_1api__cast_1_1widget__api__cast__graph: .. _cid-xf::dsp::aie::widget::api_cast::widget_api_cast_graph: template class xf::dsp::aie::widget::api_cast::widget_api_cast_graph ==================================================================== .. toctree:: :hidden: .. code-block:: cpp :class: overview-code-block #include "widget_api_cast_graph.hpp" Overview ~~~~~~~~ widget_api_cast is a design to change the interface between connected components. This component is able to change the stream interface to window interface and vice-versa. In addition, multiple input stream ports may be defined, as well as multiple copies of the window output. These are the templates to configure the Widget API Cast class. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - TT_DATA - describes the type of individual data samples input to and output from the function. This is a typename and must be one of the following: int16, cint16, int32, cint32, float, cfloat. * - TP_IN_API - defines the input interface type. 0 = Window, 1 = Stream * - TP_OUT_API - defines the output interface type. 0 = Window, 1 = Stream * - TP_NUM_INPUTS - describes the number of input stream interfaces to be processed. When 2 inputs are configured, whe data will be read sequentially from each. * - TP_WINDOW_VSIZE - describes the number of samples in the window API used if either input or output is a window. Note: Margin size should not be included in TP_INPUT_WINDOW_VSIZE. * - TP_NUM_OUTPUT_CLONES - sets the number of output ports to write the input data to. Note that while input data from multiple ports is independent, data out is not. * - TP_PATTERN - sets the interleave or deinterleave pattern for configurations using dual streams, since streams are not considered clones for input nor for output. The patterns supported are: 0 (default) : 128bits are taken from each input, concatenated to 256b and output to window. or one 256b window read is split into upper and lower 128b cunks for output. 1 : kSampleIntlv. One TT_DATA sample is taken from each stream and written to window or vice versa. 2 : kSplit. The window is split into 2 halves with each half going to a stream. .. ref-code-block:: cpp :class: overview-code-block template < typename TT_DATA, unsigned int TP_IN_API, unsigned int TP_OUT_API, unsigned int TP_NUM_INPUTS, unsigned int TP_WINDOW_VSIZE, unsigned int TP_NUM_OUTPUT_CLONES = 1, unsigned int TP_PATTERN = 0 > class widget_api_cast_graph: public graph // fields port :ref:`in`[TP_NUM_INPUTS] port :ref:`out`[TP_NUM_OUTPUT_CLONES] Fields ------ .. _doxid-classxf_1_1dsp_1_1aie_1_1widget_1_1api__cast_1_1widget__api__cast__graph_1a47e8bc0208d022993ecd46375fb00b1c: .. _cid-xf::dsp::aie::widget::api_cast::widget_api_cast_graph::in: .. ref-code-block:: cpp :class: title-code-block port in [TP_NUM_INPUTS] The input data to the function. This input may be stream or window. Data is read from here and written directly to output. When there are multiple input streams, a read from each will occur of the maximum size supported (32 bits) with these 2 being concatenated, before being written to the output(s). Multiple input windows is not supported .. _doxid-classxf_1_1dsp_1_1aie_1_1widget_1_1api__cast_1_1widget__api__cast__graph_1a509eee5291a504cc92a9341df3743363: .. _cid-xf::dsp::aie::widget::api_cast::widget_api_cast_graph::out: .. ref-code-block:: cpp :class: title-code-block port out [TP_NUM_OUTPUT_CLONES] An API of TT_DATA type. Methods ~~~~~~~ .. FunctionSection .. _doxid-classxf_1_1dsp_1_1aie_1_1widget_1_1api__cast_1_1widget__api__cast__graph_1af17957f0ea2370ac9e8ede234490f33d: .. _cid-xf::dsp::aie::widget::api_cast::widget_api_cast_graph::getkernels: getKernels ---------- .. ref-code-block:: cpp :class: title-code-block kernel* getKernels () Access function to get pointer to kernel (or first kernel in a chained configuration). .. _doxid-classxf_1_1dsp_1_1aie_1_1widget_1_1api__cast_1_1widget__api__cast__graph_1ad993ab1d3c4f22f1ffab28adb73d8ae1: .. _cid-xf::dsp::aie::widget::api_cast::widget_api_cast_graph::widget_api_cast_graph: widget_api_cast_graph --------------------- .. ref-code-block:: cpp :class: title-code-block widget_api_cast_graph () This is the constructor function for the Widget API Cast graph.