xWRL6432 MMWAVE-L-SDK  05.05.00.00
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 
92 
94  SemaphoreP_Object edmaDoneSemaHandle;
95 
97  SemaphoreP_Object hwaDoneSemaHandleDopp;
98 
100  SemaphoreP_Object hwaDoneSemaHandleAoA;
101 
104 
106  cmplx16ImRe_t *radarCubebuf;
107 
109  cmplx16ImRe_t *angleMatBuf;
110 
112  uint32_t hwaMemBankAddr[SOC_HWA_NUM_MEM_BANKS];
113 
115  bool inProgress;
116 
118  uint32_t numProcess;
119 
121  uint8_t hwaDmaTriggerDoppPing;
122 
124  uint8_t hwaDmaTriggerDoppPong;
125 
127  uint8_t hwaDmaTriggerAoAPing;
128 
130  uint8_t hwaDmaTriggerAoAPong;
131 
133  uint16_t hwaDoppNumLoops;
134 
136  uint16_t hwaDoppNumLoops1;
137 
139  uint16_t *hwaAoANumLoops;
140 
142  uint8_t hwaParamStartIdxDopp;
143 
145  uint8_t hwaParamStopIdxDopp;
146 
148  uint8_t hwaParamStartIdxAoA;
149 
151  uint8_t hwaParamStopIdxAoA;
152 
154  uint16_t *rangeGatesCount;
155 
157  uint16_t *range_idx_arr;
158 
161 
163  int16_t *doppler_idx_arr;//Pointer to array of size [MAX_NUM_RANGE_BINS][MAX_NUM_POINTS];
164 
166  cmplx32ImRe_t *antenna_array;
167 
169  uint8_t numTxAntennas;
170 
172  uint8_t doppFFT_is16b;
173 
176 
178  uint8_t max_num_points;
179 
182 
186 
187 #ifdef __cplusplus
188 }
189 #endif
190 
191 #endif
aoaProcHWAObj::max_num_points
uint8_t max_num_points
Number of max points under consideration.
Definition: aoaproc_internal.h:178
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:163
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:103
aoaProcHWAObj::isDopplerPhaseCompensationEnabled
uint8_t * isDopplerPhaseCompensationEnabled
Flag to check Doppler compensations is enabled or not.
Definition: aoaproc_internal.h:184
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:160
aoaProcHWAObj::hwaAoANumLoops
uint16_t * hwaAoANumLoops
HWA number of loops for AoA and max of Elevation-Azimuth FFT.
Definition: aoaproc_internal.h:139
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:172
aoaProcHWAObj::numVirtualAntennas
uint8_t numVirtualAntennas
Number of virtual antennas.
Definition: aoaproc_internal.h:175
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:157
aoaProcHWAObj::numTxAntennas
uint8_t numTxAntennas
Number of transmit antennas.
Definition: aoaproc_internal.h:169
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:166
aoaProcHWAObj::angleMatBuf
cmplx16ImRe_t * angleMatBuf
Pointer to Angle Matrix buffer.
Definition: aoaproc_internal.h:109
aoaProcHWAObj::antenna_array_elements
uint8_t antenna_array_elements
Number of max points under consideration.
Definition: aoaproc_internal.h:181
aoaProcHWAObj::edmaOut_maxAoA
DPU_AoAProc_Edma edmaOut_maxAoA
aoaProc EDMA configuration AoA FFT's are applied
Definition: aoaproc_internal.h:91
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:612
DPU_AoAProc_Edma
AoAProc DPU EDMA configuration parameters.
Definition: aoaproc_common.h:110