xWRL6432 MMWAVE-L-SDK  05.04.00.01
cfarprochwa.h File Reference

Introduction

Implements CFARCA DPU using HWA.

NOTE: (C) Copyright 2018-2021 Texas Instruments, Inc.

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)
 

Macro Definition Documentation

◆ DPU_CFARPROCHWA_SHIFT_Q8

#define DPU_CFARPROCHWA_SHIFT_Q8   8

Number HWA params used.

◆ DPU_CFARPROCHWA_ONE_Q8

#define DPU_CFARPROCHWA_ONE_Q8   (1<<DPU_CFARPROCHWA_SHIFT_Q8)

◆ DPU_CFARPROCHWA_MAX_NUM_HWA_PARAMSET

#define DPU_CFARPROCHWA_MAX_NUM_HWA_PARAMSET   2

Number HWA params used.

Typedef Documentation

◆ DPU_CFARProcHWA_Handle

typedef void* DPU_CFARProcHWA_Handle

CFARHwa DPU Handle.

Enumeration Type Documentation

◆ DPU_CFARProcHWA_Cmd

cfarProc control command

The enum defines the cfarProc supported run time command

Enumerator
DPU_CFARProcHWA_Cmd_CfarCfg 

Command to update CFAR configuration in range domain.

DPU_CFARProcHWA_Cmd_FovRangeCfg 

Command to update field of view in range domain, minimum and maximum range limits.

DPU_CFARProcHWA_Cmd_FovAoaCfg 

Command to update field of view in angle domain, minimum and maximum angle limits (for azimuth and elevation)

Function Documentation

◆ DPU_CFARProcHWA_init()

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.

Parameters
[in]initCfgPointer to initialization configuration
[in]errCodePointer to errCode generates from the API
Return values
Success- valid CFARCAProcHWA handle
Error- NULL

◆ DPU_CFARProcHWA_config()

int32_t DPU_CFARProcHWA_config ( DPU_CFARProcHWA_Handle  handle,
DPU_CFARProcHWA_Config cfarHwaCfg 
)

Description
The function is CFARCAProcHWA DPU configuration function.

Precondition
DPU_CFARProcHWA_init() has been called
Parameters
[in]handleCFARCAProcHWA DPU handle
[in]cfarHwaCfgPointer to CFARCAProcHWA configuration data structure
Return values
Success- 0
Error- <0

◆ DPU_CFARProcHWA_process()

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

Precondition
DPU_CFARProcHWA_init() has been called
Parameters
[in]handleCFARCAProcHWA DPU handle
[in]detMatrixDetection matrix
[in]inputParamsRuntime input parameters
[out]outParamsDPU output parameters
Return values
Success= 0
Error!= 0

◆ DPU_CFARProcHWA_control()

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.

Precondition
DPU_CFARProcHWA_init() has been called
Parameters
[in]handleCFARCAProcHWA DPU handle
[in]cmdCFARCAProcHWA DPU control command
[in]argCFARCAProcHWA DPU control argument pointer
[in]argSizeCFARCAProcHWA DPU control argument size
Return values
Success- 0
Error- <0

◆ DPU_CFARProcHWA_deinit()

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.

Precondition
DPU_CFARProcHWA_init() has been called
Parameters
[in]handleCFARCAProcHWA DPU handle
Return values
Success- 0
Error- <0

◆ DPU_CFARProcHWA_GetNumUsedHwaParamSets()

int32_t DPU_CFARProcHWA_GetNumUsedHwaParamSets ( DPU_CFARProcHWA_Handle  handle,
uint8_t *  numUsedHwaParamSets 
)

Description
The function returns number of allocated HWA PARAM Sets.

Precondition
DPU_CFARProcHWA_config() has been called
Parameters
[in]handleCFARCAProcHWA DPU handle
[out]numUsedHwaParamSetsNumber of allocated HWA PARAM Sets
Return values
Success- 0
Error- <0