DSPLIB User Guide
DSPLIB_cascadeBiquad_priv.h
Go to the documentation of this file.
1 /******************************************************************************
2  * *
3  * module name :DSPLIB *
4  * *
5  * module descripton :Matrix Multiply Accelerator Library module for C7x+MMA *
6  * *
7  * Copyright (C) 2017-2018 Texas Instruments Incorporated - https://www.ti.com/ *
8  * ALL RIGHTS RESERVED *
9  * *
10  ******************************************************************************/
11 
12 /********************************************************************************
13  * @file DSPLIB_cascadeBiquad_priv.h
14  *
15  * @brief File to hold private parameter of function DSPLIB_cascadeBiquad
16  *
17  * @version 0.1 - Mar 2022 : Initial Version
18  *
19  ********************************************************************************/
20 
21 #ifndef DSPLIB_CASCADEBIQUAD_PRIV_H_
22 #define DSPLIB_CASCADEBIQUAD_PRIV_H_
23 
24 #include "../common/DSPLIB_utility.h"
25 #include "DSPLIB_cascadeBiquad.h"
26 
38 #define DSPLIB_CASCADEBIQUAD_PBLOCK_SIZE (6 * SE_PARAM_SIZE + 1 * DSPLIB_PARAM_SIZE + 2 * sizeof(int32_t))
39 /*******************************************************************************
40  *
41  * DEFINES
42  *
43  ******************************************************************************/
44 #define SE_PARAM_BASE (0x0000)
45 #define SE_SE0_PARAM_OFFSET (SE_PARAM_BASE)
46 #define SE_SE1_PARAM_OFFSET (SE_SE0_PARAM_OFFSET + SE_PARAM_SIZE)
47 #define SE_SA0_PARAM_OFFSET (SE_SE1_PARAM_OFFSET + SE_PARAM_SIZE)
48 #define SE_SA1_PARAM_OFFSET (SE_SA0_PARAM_OFFSET + SE_PARAM_SIZE)
49 #define SE_SA2_PARAM_OFFSET (SE_SA1_PARAM_OFFSET + SE_PARAM_SIZE)
50 #define SE_SA3_PARAM_OFFSET (SE_SA2_PARAM_OFFSET + SE_PARAM_SIZE)
57  void *restrict pIn,
58  void *restrict pFilterCoeff,
59  void *restrict pFilterVar,
60  void *restrict pOut);
61 
92 template <typename dataType>
94  const DSPLIB_bufParams2D_t *bufParamsIn,
95  const DSPLIB_bufParams1D_t *bufParamsFilterCoeff,
96  const DSPLIB_bufParams2D_t *bufParamsFilterVar,
97  const DSPLIB_bufParams2D_t *bufParamsOut,
98  const DSPLIB_cascadeBiquad_InitArgs *pKerInitArgs);
99 
130 template <typename dataType>
132  const DSPLIB_bufParams2D_t *bufParamsIn,
133  const DSPLIB_bufParams1D_t *bufParamsFilterCoeff,
134  const DSPLIB_bufParams2D_t *bufParamsFilterVar,
135  const DSPLIB_bufParams2D_t *bufParamsOut,
136  const DSPLIB_cascadeBiquad_InitArgs *pKerInitArgs);
137 
163 template <typename dataType>
165  void *restrict pIn,
166  void *restrict pFilterCoeff,
167  void *restrict pFilterVar,
168  void *restrict pOut);
169 
196 template <typename dataType>
198  void *restrict pIn,
199  void *restrict pFilterCoeff,
200  void *restrict pFilterVar,
201  void *restrict pOut);
218 template <typename dataType>
220  void *restrict pIn,
221  void *restrict pFilterCoeff,
222  void *restrict pFilterVar,
223  void *restrict pOut);
224 
228 typedef struct {
246  uint32_t filterVarPitch;
248  uint32_t filterCoeff;
251  uint32_t filterCoeffOffset = 0;
254  float outGain;
255 
258 
281  DSPLIB_bufParams2D_t *bufParamsIn,
282  DSPLIB_bufParams1D_t *bufParamsFilterCoeff,
283  DSPLIB_bufParams2D_t *bufParamsFilterVar,
284  DSPLIB_bufParams2D_t *bufParamsOut,
285  DSPLIB_cascadeBiquad_InitArgs *pKerInitArgs);
286 
287 #endif /* DSPLIB_CASCADEBIQUAD_PRIV_H_ */
288 
289 /* ======================================================================== */
290 /* End of file: DSPLIB_cascadeBiquad.h */
291 /* ======================================================================== */
#define DSPLIB_CASCADEBIQUAD_PBLOCK_SIZE
Macro to define the size of bufPblock array of DSPLIB_cascadeBiquad_PrivArgs structure.
DSPLIB_STATUS(* pFxnDSPLIB_cascadeBiquad_exec)(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pFilterCoeff, void *restrict pFilterVar, void *restrict pOut)
This is a function pointer type that conforms to the declaration of DSPLIB_cascadeBiquad_exec_ci and ...
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....
DSPLIB_STATUS DSPLIB_cascadeBiquad_exec_cn(DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pFilterCoeff, void *restrict pFilterVar, void *restrict pOut)
This function is the main execution function for the natural C implementation of the kernel....
DSPLIB_STATUS DSPLIB_cascadeBiquad7Stage_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....
DSPLIB_STATUS DSPLIB_cascadeBiquad7Stage_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....
DSPLIB_STATUS DSPLIB_cascadeBiquad_init_cn(DSPLIB_kernelHandle handle, DSPLIB_bufParams2D_t *bufParamsIn, DSPLIB_bufParams1D_t *bufParamsFilterCoeff, DSPLIB_bufParams2D_t *bufParamsFilterVar, DSPLIB_bufParams2D_t *bufParamsOut, DSPLIB_cascadeBiquad_InitArgs *pKerInitArgs)
This function is the initialization function for the natural C implementation of the kernel....
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....
DSPLIB_STATUS_NAME DSPLIB_STATUS
Return value for DSPLIB functions.
Definition: DSPLIB_types.h:170
DSPLIB_STATUS_NAME
The enumeration of all status codes.
Definition: DSPLIB_types.h:151
void * DSPLIB_kernelHandle
Handle type for DSPLIB operations.
Definition: DSPLIB_types.h:172
A structure for a 1 dimensional buffer descriptor.
A structure for a 2 dimensional buffer descriptor.
Structure containing the parameters to initialize the kernel.
Structure that is reserved for internal use by the kernel.
uint32_t filterCoeff
number of filter coefficients for all stages
uint32_t filterVarPitch
Pitch of filter Variable buffer for different channels DSPLIB_cascadeBiquad_init that will be retriev...
uint32_t dataBufferOutPitch
Pitch of output buffer for different batches DSPLIB_cascadeBiquad_init that will be retrieved and use...
DSPLIB_cascadeBiquad_InitArgs initArgs
Structure holding initialization parameters
uint32_t dataBufferInPitch
Pitch of input buffer for different batches DSPLIB_cascadeBiquad_init that will be retrieved and used...
float outGain
b10*b20*b30*... Gain a11, a12 coefficients
pFxnDSPLIB_cascadeBiquad_exec execute
Function pointer to point to the right execution variant between DSPLIB_cascadeBiquad_exec_cn and DSP...