mixed_radix_fft is a single-channel, decimation-in-time, FFT including radix3 or radix5 *stages.
These are the templates to configure the single-channel decimation-in-time class.
Parameters:
TT_DATA | describes the type of individual data samples input to and output from the transform function. This is a typename and must be one of the following: cint16, cint32, cfloat. |
TT_TWIDDLE | describes the type of twiddle factors of the transform. It must be one of the following: cint16, cint32, cfloat and must also satisfy the following rules:
|
TP_POINT_SIZE | is an unsigned integer which describes the number of samples in the transform. This values must factorize to powers of 2, 3 and 5. When TP_DYN_PT_SIZE is set, TP_POINT_SIZE describes the maximum point size possible. |
TP_FFT_NIFFT | selects whether the transform to perform is an FFT (1) or IFFT (0). |
TP_SHIFT | selects the power of 2 to scale the result by prior to output. |
TP_RND | selects the rounding mode.
|
TP_SAT | describes the selection of saturation to be applied during the shift down stage of processing. TP_SAT accepts unsigned integer values, where:
|
TP_WINDOW_VSIZE | is an unsigned integer which describes the number of samples to be processed in each call to the function. By default, TP_WINDOW_SIZE is set to match TP_POINT_SIZE. TP_WINDOW_SIZE may be set to be an integer multiple of the TP_POINT_SIZE, in which case multiple FFT operations will be performed on a given input window, one calculation per frame of data in the iobuffer, resulting in multiple output frames. This feature of packing multiple frames of data into a single call of the function reduces the number of kernel calls and as a result, reduces the losses due to overheads in the kernel call mechanism. As a result, overall performance is increased. |
TP_CASC_LEN | selects the number of kernels the FFT will be divided over in series to improve throughput |
TP_API | is an unsigned integer to select window (0) or stream (1) interfaces. When stream I/O is selected, one sample is taken from, or output to, a stream and the next sample from or two the next stream. Two streams minimum are used. In this example, even samples are read from input stream[0] and odd samples from input stream[1]. |
TP_DYN_PT_SIZE | is an unsigned int to select static point size (0) or dynamic (1) point size. With TP_DYN_PT_SIZE set to 1, there are two input ports. For the first, the user must provide a header input *that indicates the point size of frame(s) to be processed in this iteration. The header is a 256 bit size, which is considered to be 8 fields each of int32 type. The first field selects the direction of the transform to perform (1= forward, 0 = inverse). The third field determines the power of 2 factor of the point size. e.g. 1536 decomposes to 3* 2^9 so in this case the value would be 9. The fourth field describes the power of 3 of the point size The fifth field describes the power of 5 of the point size. For example, a point size of 240 is 2^4 * 3^1 * 5^1 so the values for the power of 2, 3 and 5 would be 4, 1 and 1 respectively. The last (8th) field is an error indication. This is ignored on input, but set for the output header if the input header is determined to be invalid (e.g. because the point size described is too large or too small. The second (data) input, contains one or more frames of data to be processed. Each frame will start at index n*TP_POINT_SIZE in this iobuffer Similarly, when using the dynamic point size feature there will be two output ports. The first holds the *output header which is a copy of the input header, but with the error field set to 0 (valid point size) or 1 (invalid point *size). The second output port will contain the processed data arranged in the same manner as the input data port. *That is, there may be one or more frames of data, as determined by TP_WINDOW_VSIZE/TP_POINT_SIZE. The first frame will *begin at index 0. The second will begin at index TP_POINT_VSIZE, the third at 2*TP_POINT_SIZE and so on. Note that TP_WINDOW_SIZE still describes the number of samples to be processed and does not include the header. |
template < typename TT_DATA, typename TT_TWIDDLE, unsigned int TP_POINT_SIZE, unsigned int TP_FFT_NIFFT, unsigned int TP_SHIFT, unsigned int TP_RND = 4, unsigned int TP_SAT = 1, unsigned int TP_WINDOW_VSIZE = TP_POINT_SIZE, unsigned int TP_CASC_LEN = 1, unsigned int TP_API = 0, unsigned int TP_DYN_PT_SIZE = 0 > class mixed_radix_fft_graph: public graph // typedefs typedef std::conditional <std::is_same <TT_DATA, cint16>::value, cint32_t, TT_DATA>::type T_internalDataType // fields kernel m_mixed_radix_fftKernels[TP_CASC_LEN] port_array <input, m_kNumPorts> in port_array <output, m_kNumPorts> out static constexpr int kStreamsPerTile static constexpr int m_kNumPorts static constexpr int m_kR5Stages static constexpr int m_kR3Stages static constexpr int m_kR4Stages static constexpr int m_kR2Stages static constexpr int m_kR5factor static constexpr int m_kR3factor static constexpr int m_kR4factor static constexpr int m_kR2factor static constexpr int m_kTotalStages static constexpr int m_ktwiddleTableSize