DSPLIB User Guide
DSPLIB_cascadeBiquad_ci.cpp File Reference

Go to the source code of this file.

Macros

#define DSPLIB_CASCADEBIQUAD_IMPLEMENTED   0
 

Functions

template<typename dataType >
DSPLIB_STATUS DSPLIB_cascadeBiquad_init_ci (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsFilterCoeff, const DSPLIB_bufParams2D_t *bufParamsFilterVar, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_cascadeBiquad_InitArgs *pKerInitArgs)
 This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_cascadeBiquad_init. More...
 
template<typename dataType >
static dataType fast_recip (dataType x)
 
template DSPLIB_STATUS DSPLIB_cascadeBiquad_init_ci< float > (DSPLIB_kernelHandle handle, const DSPLIB_bufParams2D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsFilterCoeff, const DSPLIB_bufParams2D_t *bufParamsFilterVar, const DSPLIB_bufParams2D_t *bufParamsOut, const DSPLIB_cascadeBiquad_InitArgs *pKerInitArgs)
 
template<typename dataType >
DSPLIB_STATUS DSPLIB_cascadeBiquad_exec_ci (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pFilterCoeff, void *restrict pFilterVar, void *restrict pOut)
 This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_cascadeBiquad_exec. More...
 
template DSPLIB_STATUS DSPLIB_cascadeBiquad_exec_ci< float > (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pFilterCoeff, void *restrict pFilterVar, void *restrict pOut)
 

Macro Definition Documentation

◆ DSPLIB_CASCADEBIQUAD_IMPLEMENTED

#define DSPLIB_CASCADEBIQUAD_IMPLEMENTED   0

Definition at line 55 of file DSPLIB_cascadeBiquad_ci.cpp.

Function Documentation

◆ DSPLIB_cascadeBiquad_init_ci()

template<typename dataType >
DSPLIB_STATUS DSPLIB_cascadeBiquad_init_ci ( DSPLIB_kernelHandle  handle,
const DSPLIB_bufParams2D_t bufParamsIn,
const DSPLIB_bufParams1D_t bufParamsFilterCoeff,
const DSPLIB_bufParams2D_t bufParamsFilterVar,
const DSPLIB_bufParams2D_t bufParamsOut,
const DSPLIB_cascadeBiquad_InitArgs pKerInitArgs 
)

This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_cascadeBiquad_init.

This function determines the configuration for the streaming engine and MMA hardware resources based on the function call parameters, and the configuration is saved in bufPBlock array. In the kernel call sequence, DSPLIB_cascadeBiquad_exec_ci would be called later independently by the application. When DSPLIB_cascadeBiquad_exec_ci runs, it merely retrieves the configuration from the bufPBlock and uses it to set up the hardware resources. This arrangement is so that DSPLIB_cascadeBiquad_exec_ci does not lose cycles to determine the hardware configuration.

Parameters
[in]handle: Active handle to the kernel
[in]bufParamsIn: Pointer to the structure containing dimensional information of input buffer
[in]bufParamsFilterCoeff: Pointer to the structure containing dimensional information of filter coefficient buffer
[in/out]bufParamsFilterVar : Pointer to the structure containing dimensional information of filter variable buffer
[out]bufParamsOut: Pointer to the structure containing dimensional information of ouput buffer
[in]pKerInitArgs: Pointer to the structure holding init parameters
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.

Definition at line 58 of file DSPLIB_cascadeBiquad_ci.cpp.

◆ fast_recip()

template<typename dataType >
static dataType fast_recip ( dataType  x)
inlinestatic

Definition at line 174 of file DSPLIB_cascadeBiquad_ci.cpp.

◆ DSPLIB_cascadeBiquad_init_ci< float >()

template DSPLIB_STATUS DSPLIB_cascadeBiquad_init_ci< float > ( DSPLIB_kernelHandle  handle,
const DSPLIB_bufParams2D_t bufParamsIn,
const DSPLIB_bufParams1D_t bufParamsFilterCoeff,
const DSPLIB_bufParams2D_t bufParamsFilterVar,
const DSPLIB_bufParams2D_t bufParamsOut,
const DSPLIB_cascadeBiquad_InitArgs pKerInitArgs 
)

◆ DSPLIB_cascadeBiquad_exec_ci()

template<typename dataType >
DSPLIB_STATUS DSPLIB_cascadeBiquad_exec_ci ( DSPLIB_kernelHandle  handle,
void *restrict  pIn,
void *restrict  pFilterCoeff,
void *restrict  pFilterVar,
void *restrict  pOut 
)

This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_cascadeBiquad_exec.

The function uses MMA hardware accelerator to perform the convolution computation. Filter data is loaded into B panel of the MMA from memory using one streaming engine, while the input data is loaded into A vectors of the MMA using the other streaming engine. Result of the compute from MMA C panel is stored into memory using a stream address generator.

Parameters
[in]handle: Active handle to the kernel
[in]pIn: Pointer to buffer holding the input data
[in]pFilter: Pointer to buffer holding the filter data
[out]pOut: Pointer to buffer holding the output data
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.
Performance Considerations:
For best performance,
  • the input and output data buffers are expected to be in L2 memory
  • the buffer pointers are assumed to be 64-byte aligned

Definition at line 200 of file DSPLIB_cascadeBiquad_ci.cpp.

◆ DSPLIB_cascadeBiquad_exec_ci< float >()

template DSPLIB_STATUS DSPLIB_cascadeBiquad_exec_ci< float > ( DSPLIB_kernelHandle  handle,
void *restrict  pIn,
void *restrict  pFilterCoeff,
void *restrict  pFilterVar,
void *restrict  pOut 
)