template class xf::dsp::aie::fir::sr_sym::fir_sr_sym_graph¶
#include "fir_sr_sym_graph.hpp"
Overview¶
fir_sr_sym is a Symmetrical Single Rate FIR filter
These are the templates to configure the Symmetric Single Rate FIR class.
Parameters:
TT_DATA | describes the type of individual data samples input to and output from the filter function. This is a typename and must be one of the following: int16, cint16, int32, cint32, float, cfloat. |
TT_COEFF | describes the type of individual coefficients of the filter taps. It must be one of the same set of types listed for TT_DATA and must also satisfy the following rules:
|
TP_FIR_LEN | is an unsigned integer which describes the number of taps in the filter. |
TP_SHIFT | describes power of 2 shift down applied to the accumulation of FIR terms before output. TP_SHIFT must be in the range 0 to 61. |
TP_RND | describes the selection of rounding to be applied during the shift down stage of processing. TP_RND must be in the range 0 to 7 where
|
TP_INPUT_WINDOW_VSIZE | describes the number of samples in the window API used for input to the filter function. The number of values in the output window will be TP_INPUT_WINDOW_VSIZE also by virtue the single rate nature of this function. Note: Margin size should not be included in TP_INPUT_WINDOW_VSIZE. |
TP_CASC_LEN | describes the number of AIE processors to split the operation over. This allows resource to be traded for higher performance. TP_CASC_LEN must be in the range 1 (default) to 9. |
TP_USE_COEFF_RELOAD | allows the user to select if runtime coefficient reloading should be used. When defining the parameter:
|
TP_NUM_OUTPUTS | sets the number of ports to broadcast the output to. Note: when used, optional port: |
TP_API | specifies if the output interface should be window-based or stream-based. The values supported are 0 (window API) or 1 (stream API). Note: due to the data buffering requirement imposed through symmetry, input interface is always set to window. Auto-infeffed DMA stream-to-window conversion is applied when FIR is connected with an input stream. |
template < typename TT_DATA, typename TT_COEFF, unsigned int TP_FIR_LEN, unsigned int TP_SHIFT, unsigned int TP_RND, unsigned int TP_INPUT_WINDOW_VSIZE, unsigned int TP_CASC_LEN = 1, unsigned int TP_USE_COEFF_RELOAD = 0, unsigned int TP_NUM_OUTPUTS = 1, unsigned int TP_API = 0 > class fir_sr_sym_graph: public xf::dsp::aie::fir::sr_sym::fir_sr_sym_base_graph public xf::dsp::aie::fir::sr_sym::conditional_out_graph public xf::dsp::aie::fir::sr_sym::conditioanl_rtp_graph
Methods¶
fir_sr_sym_graph¶
fir_sr_sym_graph overload (1)¶
fir_sr_sym_graph ()
This is the constructor function for the Symmetric Singlr Rate FIR graph. Constructor has no arguments. To be used with TP_USE_COEFF_RELOAD=1, taps needs to be passed through RTP.
fir_sr_sym_graph overload (2)¶
fir_sr_sym_graph (const std::vector <TT_COEFF>& taps)
This is the constructor function for the Symmetric Singlr Rate FIR graph. Constructor has the following arguments.
taps a reference to the std::vector array of taps values of type TT_COEFF.
The taps array need only be supplied for the first half of the filter length plus the center tap for odd lengths i.e.
taps[] = {c0, c1, c2, …, cN [, cCT]} where
N = TP_FIR_LEN/2 and cCT is the center tap where TP_FIR_LEN is odd.
For example, a 7-tap filter might use coeffs (1, 3, 2, 5, 2, 3, 1).
This could be input as taps[]= {1,3,2,5} since the context of symmetry allows the remaining coefficients to be inferred.
getKernels¶
kernel* getKernels ()
Access function to get pointer to kernel (or first kernel in a chained configuration). No arguments required.