xWRL6432 MMWAVE-L-SDK  05.04.00.01
aoaproc_internal.h
Go to the documentation of this file.
1 /*
2  * NOTE:
3  * (C) Copyright 2023 Texas Instruments, Inc.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the
15  * distribution.
16  *
17  * Neither the name of Texas Instruments Incorporated nor the names of
18  * its contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
40 /**************************************************************************
41  *************************** Include Files ********************************
42  **************************************************************************/
43 #ifndef DPU_AoAPROC_INTERNAL_H
44 #define DPU_AoAPROC_INTERNAL_H
45 
46 /* Standard Include Files. */
47 #include <stdint.h>
48 #include <stdlib.h>
49 #include <stddef.h>
50 #include <string.h>
51 #include <stdio.h>
52 #include <math.h>
53 
54 /* mmwave SDK include files */
57 
58 #ifdef __cplusplus
59 extern "C" {
60 #endif
61 
71 typedef struct aoaProcHWAObj_t
72 {
73  DPU_AoAProcHWA_InitParams initParms;
74 
76  HWA_Handle hwaHandle;
77 
79  EDMA_Handle edmaHandle;
80 
82  DPU_AoAProcHWA_HwaCfg hwaCfg;
83 
85  DPU_AoAProc_Edma edmaIn_rangeFFT;
86 
88  DPU_AoAProc_Edma edmaIn_dopplerFFT;
89 
91  SemaphoreP_Object edmaDoneSemaHandle;
92 
94  SemaphoreP_Object hwaDoneSemaHandleDopp;
95 
97  SemaphoreP_Object hwaDoneSemaHandleAoA;
98 
101 
103  cmplx16ImRe_t *radarCubebuf;
104 
106  cmplx16ImRe_t *angleMatBuf;
107 
109  uint32_t hwaMemBankAddr[SOC_HWA_NUM_MEM_BANKS];
110 
112  bool inProgress;
113 
115  uint32_t numProcess;
116 
118  uint8_t hwaDmaTriggerDoppPing;
119 
121  uint8_t hwaDmaTriggerDoppPong;
122 
124  uint8_t hwaDmaTriggerAoAPing;
125 
127  uint8_t hwaDmaTriggerAoAPong;
128 
130  uint16_t hwaDoppNumLoops;
131 
133  uint16_t hwaDoppNumLoops1;
134 
136  uint16_t hwaAoANumLoops;
137 
139  uint8_t hwaParamStartIdxDopp;
140 
142  uint8_t hwaParamStopIdxDopp;
143 
145  uint8_t hwaParamStartIdxAoA;
146 
148  uint8_t hwaParamStopIdxAoA;
149 
151  uint16_t *rangeGatesCount;
152 
154  uint16_t *range_idx_arr;
155 
158 
160  int16_t *doppler_idx_arr;//Pointer to array of size [MAX_NUM_RANGE_BINS][MAX_NUM_POINTS];
161 
163  cmplx32ImRe_t *antenna_array;
164 
166  uint8_t numTxAntennas;
167 
169  uint8_t doppFFT_is16b;
170 
173 
175  uint8_t max_num_points;
176 
180 
181 #ifdef __cplusplus
182 }
183 #endif
184 
185 #endif
aoaProcHWAObj::max_num_points
uint8_t max_num_points
Number of max points under consideration.
Definition: aoaproc_internal.h:175
DPU_AoAProcHWA_HwaCfg
AoAProc DPU HWA configuration parameters.
Definition: aoaprochwa.h:211
aoaProcHWAObj::doppler_idx_arr
int16_t * doppler_idx_arr
Array to store Doppler index corresponding to range index for which Angle FFT is to be applied.
Definition: aoaproc_internal.h:160
SOC_HWA_NUM_MEM_BANKS
#define SOC_HWA_NUM_MEM_BANKS
number of HWA memory banks
Definition: cslr_soc_defines.h:281
aoaProcHWAObj::hwaSemaHandleParamset
SemaphoreP_Object hwaSemaHandleParamset
HWA Paramset Done semaphore Handle for ping/pong in Doppler use case.
Definition: aoaproc_internal.h:100
aoaProcHWAObj::angle_idx_doppler_count_arr
uint16_t * angle_idx_doppler_count_arr
Array to store Doppler index corresponding to range index for which Angle FFT is to be applied.
Definition: aoaproc_internal.h:157
aoaprochwa.h
Implements Datapath Angle of Arrival processing functionality using the HWA. Based on the RF paramete...
aoaProcHWAObj::doppFFT_is16b
uint8_t doppFFT_is16b
Flag to set Doppler FFT to 16-bit(1-True)/32-bit(0-False)
Definition: aoaproc_internal.h:169
aoaProcHWAObj::numVirtualAntennas
uint8_t numVirtualAntennas
Number of virtual antennas.
Definition: aoaproc_internal.h:172
aoaProcHWAObj::range_idx_arr
uint16_t * range_idx_arr
Array to store range index for which Doppler FFT is to be applied.
Definition: aoaproc_internal.h:154
aoaProcHWAObj::numTxAntennas
uint8_t numTxAntennas
Number of transmit antennas.
Definition: aoaproc_internal.h:166
aoaProcHWAObj
AoAProcHWA DPU Object.
Definition: aoaprochwa_internal.h:73
aoaProcHWAObj::antenna_array
cmplx32ImRe_t * antenna_array
Antenna array to store elements before applying elevation-azimuth FFT.
Definition: aoaproc_internal.h:163
aoaProcHWAObj::angleMatBuf
cmplx16ImRe_t * angleMatBuf
Pointer to Angle Matrix buffer.
Definition: aoaproc_internal.h:106
aoaProcHWAObj::antenna_array_elements
uint8_t antenna_array_elements
Number of max points under consideration.
Definition: aoaproc_internal.h:178
aoaproc_common.h
Implements Common definition across AoAProc DPU.
DPU_AoAProcHWA_InitParams
AoAProc DPU initial configuration parameters.
Definition: aoaprochwa.h:194
EDMA_Handle
void * EDMA_Handle
A handle that is returned from a EDMA_open() call.
Definition: edma/v0/edma.h:471
SemaphoreP_Object
Opaque semaphore object used with the semaphore APIs.
Definition: SemaphoreP.h:59
HWA_Handle
void * HWA_Handle
A handle that is returned from a HWA_open() call.
Definition: hwa/v0/hwa.h:620
DPU_AoAProc_Edma
AoAProc DPU EDMA configuration parameters.
Definition: aoaproc_common.h:110