Implements CFARCA DPU using HWA.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of Texas Instruments Incorporated nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Go to the source code of this file.
Data Structures | |
struct | DPU_CFARProcHWA_HwaParamSaveLoc |
Structure for the HWA Params save location. More... | |
struct | DPU_CFARProcHWA_HwaCfarConfig |
CFAR HWA configuration. More... | |
struct | DPU_CFARProcHWA_CfarDetOutput |
Detected object parameters filled by HWA CFAR. More... | |
struct | DPU_CFARProcHWA_HwaMaxOutput |
Maximum peaks filled by HWA statistics block. More... | |
struct | DPU_CFARProcHWA_InitParams |
CFARCAProcHWA DPU initial configuration parameters. More... | |
struct | DPU_CFARProcHWA_HW_Resources |
CFAR Hardware resources. More... | |
struct | DPU_CFARProcHWA_DynamicConfig |
HWA CFAR dynamic configuration. More... | |
struct | DPU_CFARProcHWA_StaticConfig |
HWA CFAR static configuration. More... | |
struct | DPU_CFARProcHWA_Config |
HWA CFAR configuration. More... | |
struct | DPU_CFARProcHWA_InputParams |
Input parameters populated during Processing time. More... | |
struct | DPU_CFARProcHWA_OutParams |
Output parameters populated during Processing time. More... | |
Macros | |
#define | DPU_CFARPROCHWA_DET_MATRIX_BYTE_ALIGNMENT (sizeof(uint16_t)) |
Alignment for memory allocation purpose of detection matrix. There is CPU access of detection matrix in the implementation. More... | |
#define | DPU_CFARPROCHWA_CFAR_DET_LIST_BYTE_ALIGNMENT DPIF_CFAR_DET_LIST_CPU_BYTE_ALIGNMENT |
Alignment for memory allocation purpose. There is CPU access of this buffer in the implementation. More... | |
#define | DPU_CFARPROCHWA_HWA_MEM_OUT_DOPPLER_BYTE_ALIGNMENT (sizeof(uint32_t)) |
Alignment for memory allocation purpose. There is CPU access of this buffer in the implementation. This is the maximum field size of the DPU_CFARProcHWA_CfarDetOutput structure. More... | |
#define | DPU_CFARPROCHWA_HWA_MEM_OUT_RANGE_BYTE_ALIGNMENT (sizeof(uint32_t)) |
Alignment for memory allocation purpose. There is CPU access of thi buffers in the implementation. This is the maximum field size of the DPU_CFARProcHWA_CfarDetOutput structure. More... | |
#define | DPU_CFARPROCHWA_DOPPLER_DET_OUT_BIT_MASK_BYTE_ALIGNMENT (sizeof(uint32_t)) |
Alignment for memory allocation purpose. There is CPU access of this buffer in the implementation. More... | |
#define | DPU_CFARPROCHWA_EINVAL (DP_ERRNO_CFAR_PROC_BASE-1) |
Error Code: Invalid argument. More... | |
#define | DPU_CFARPROCHWA_EINVAL__DET_MATRIX_FORMAT (DP_ERRNO_CFAR_PROC_BASE-2) |
Error Code: Invalid detection matrix format argument. More... | |
#define | DPU_CFARPROCHWA_EINVAL__NUM_PARAM_SETS (DP_ERRNO_CFAR_PROC_BASE-3) |
Error Code: Invalid number of param sets. More... | |
#define | DPU_CFARPROCHWA_ENOMEM (DP_ERRNO_CFAR_PROC_BASE-10) |
Error Code: Out of memory when allocating using MemoryP_osal. More... | |
#define | DPU_CFARPROCHWA_ENOMEM__DET_MATRIX_EXCEEDS_HWA_INP_MEM (DP_ERRNO_CFAR_PROC_BASE-11) |
Error Code: HWA input memory for detection matrix is not sufficient. More... | |
#define | DPU_CFARPROCHWA_ENOMEMALIGN_DET_MATRIX (DP_ERRNO_CFAR_PROC_BASE-12) |
Error Code: Memory not aligned for detection matrix (detMatrix.data) More... | |
#define | DPU_CFARPROCHWA_ENOMEMALIGN_HWA_MEM_OUT_RANGE (DP_ERRNO_CFAR_PROC_BASE-15) |
Error Code: Memory not aligned for DPU_CFARProcHWA_HW_Resources::hwaMemOutDetList. More... | |
#define | DPU_CFARPROCHWA_NUM_RANGE_BINS_EXCEDED_LIMIT (DP_ERRNO_CFAR_PROC_BASE-18) |
Error Code: Memory. More... | |
#define | DPU_CFARPROCEDMA_ESEMA (DP_ERRNO_CFAR_PROC_BASE-19) |
Error Code: Semaphore. More... | |
#define | DPU_CFARPROCHWA_EINTERNAL (DP_ERRNO_CFAR_PROC_BASE-20) |
Error Code: Internal error. More... | |
#define | DPU_CFARPROCHWA_EHWA_PARAM_SAVE_LOC_SIZE (DP_ERRNO_CFAR_PROC_BASE-21) |
Error Code: Insufficient memory to save HWA param sets. More... | |
#define | DPU_CFARPROCHWA_ENOTIMPL (DP_ERRNO_CFAR_PROC_BASE-30) |
Error Code: Not implemented. More... | |
#define | DPU_CFARPROCHWA_ESEMA (DP_ERRNO_CFAR_PROC_BASE-40) |
Error Code: Semaphore error. More... | |
#define | DPU_CFARPROCHWA_SHIFT_Q8 8 |
Number HWA params used. More... | |
#define | DPU_CFARPROCHWA_ONE_Q8 (1<<DPU_CFARPROCHWA_SHIFT_Q8) |
#define | DPU_CFARPROCHWA_MAX_NUM_HWA_PARAMSET 2 |
Number HWA params used. More... | |
Typedefs | |
typedef void * | DPU_CFARProcHWA_Handle |
CFARHwa DPU Handle. More... | |
Enumerations | |
enum | DPU_CFARProcHWA_Cmd { DPU_CFARProcHWA_Cmd_CfarCfg, DPU_CFARProcHWA_Cmd_FovRangeCfg, DPU_CFARProcHWA_Cmd_FovAoaCfg } |
cfarProc control command More... | |
Functions | |
DPU_CFARProcHWA_Handle | DPU_CFARProcHWA_init (DPU_CFARProcHWA_InitParams *initCfg, int32_t *errCode) |
int32_t | DPU_CFARProcHWA_config (DPU_CFARProcHWA_Handle handle, DPU_CFARProcHWA_Config *cfarHwaCfg) |
int32_t | DPU_CFARProcHWA_process (DPU_CFARProcHWA_Handle handle, DPIF_DetMatrix *detMatrix, DPU_CFARProcHWA_InputParams *inputParams, DPU_CFARProcHWA_OutParams *outParams) |
int32_t | DPU_CFARProcHWA_control (DPU_CFARProcHWA_Handle handle, DPU_CFARProcHWA_Cmd cmd, void *arg, uint32_t argSize) |
int32_t | DPU_CFARProcHWA_deinit (DPU_CFARProcHWA_Handle handle) |
int32_t | DPU_CFARProcHWA_GetNumUsedHwaParamSets (DPU_CFARProcHWA_Handle handle, uint8_t *numUsedHwaParamSets) |
#define DPU_CFARPROCHWA_SHIFT_Q8 8 |
Number HWA params used.
#define DPU_CFARPROCHWA_ONE_Q8 (1<<DPU_CFARPROCHWA_SHIFT_Q8) |
#define DPU_CFARPROCHWA_MAX_NUM_HWA_PARAMSET 2 |
Number HWA params used.
typedef void* DPU_CFARProcHWA_Handle |
CFARHwa DPU Handle.
enum DPU_CFARProcHWA_Cmd |
cfarProc control command
The enum defines the cfarProc supported run time command
DPU_CFARProcHWA_Handle DPU_CFARProcHWA_init | ( | DPU_CFARProcHWA_InitParams * | initCfg, |
int32_t * | errCode | ||
) |
Description
The function is CFARCAProcHWA DPU initialization function. It allocates memory to store its internal data object and returns a handle if it executes successfully.
[in] | initCfg | Pointer to initialization configuration |
[in] | errCode | Pointer to errCode generates from the API |
Success | - valid CFARCAProcHWA handle |
Error | - NULL |
int32_t DPU_CFARProcHWA_config | ( | DPU_CFARProcHWA_Handle | handle, |
DPU_CFARProcHWA_Config * | cfarHwaCfg | ||
) |
Description
The function is CFARCAProcHWA DPU configuration function.
[in] | handle | CFARCAProcHWA DPU handle |
[in] | cfarHwaCfg | Pointer to CFARCAProcHWA configuration data structure |
Success | - 0 |
Error | - <0 |
int32_t DPU_CFARProcHWA_process | ( | DPU_CFARProcHWA_Handle | handle, |
DPIF_DetMatrix * | detMatrix, | ||
DPU_CFARProcHWA_InputParams * | inputParams, | ||
DPU_CFARProcHWA_OutParams * | outParams | ||
) |
Description
The function is CFARCAProcHWA DPU process function. It performs CFAR detection using HWA
[in] | handle | CFARCAProcHWA DPU handle |
[in] | detMatrix | Detection matrix |
[in] | inputParams | Runtime input parameters |
[out] | outParams | DPU output parameters |
Success | = 0 |
Error | != 0 |
int32_t DPU_CFARProcHWA_control | ( | DPU_CFARProcHWA_Handle | handle, |
DPU_CFARProcHWA_Cmd | cmd, | ||
void * | arg, | ||
uint32_t | argSize | ||
) |
Description
The function is CFARCAProcHWA DPU control function.
[in] | handle | CFARCAProcHWA DPU handle |
[in] | cmd | CFARCAProcHWA DPU control command |
[in] | arg | CFARCAProcHWA DPU control argument pointer |
[in] | argSize | CFARCAProcHWA DPU control argument size |
Success | - 0 |
Error | - <0 |
int32_t DPU_CFARProcHWA_deinit | ( | DPU_CFARProcHWA_Handle | handle | ) |
Description
The function is CFARCAProcHWA DPU deinitialization function. It frees up the resources allocated during initialization.
[in] | handle | CFARCAProcHWA DPU handle |
Success | - 0 |
Error | - <0 |
int32_t DPU_CFARProcHWA_GetNumUsedHwaParamSets | ( | DPU_CFARProcHWA_Handle | handle, |
uint8_t * | numUsedHwaParamSets | ||
) |
Description
The function returns number of allocated HWA PARAM Sets.
[in] | handle | CFARCAProcHWA DPU handle |
[out] | numUsedHwaParamSets | Number of allocated HWA PARAM Sets |
Success | - 0 |
Error | - <0 |