TI-radar AWR1843 C674x DSP core  1
dss_data_path.h File Reference

This is the data path processing header. More...

#include "common/detected_obj.h"
#include "common/mrr_config.h"
#include "common/app_cfg.h"
#include <ti/sysbios/knl/Semaphore.h>
#include <ti/common/sys_common.h>
#include <ti/common/mmwave_error.h>
#include <ti/drivers/adcbuf/ADCBuf.h>
#include <ti/drivers/edma/edma.h>
#include "EKF_XYZ_Consts.h"
Include dependency graph for dss_data_path.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  cycleLog_t_
 DSP cycle profiling structure to accumulate different processing times in chirp and frame processing periods. More...
 
struct  maxVelEnhStruct_t_
 pre-computed parameters of the max-velocity-enhancement. More...
 
struct  MmwDemo_objRaw1D
 Parameters of CFAR detected object during the first round of CFAR detections. More...
 
struct  MmwDemo_objRaw2D
 Parameters of CFAR detected object during the second round of CFAR detections. More...
 
struct  MmwDemo_detectedObjActual_t
 Detected object estimated parameters. More...
 
struct  clusteringDBscanReportForTx_t
 Structure for each cluster information report . More...
 
struct  trackingReportForTx_t
 Structure for tracking report. More...
 
struct  MmwDemo_detectedObjForTx_t
 Detected object estimated parameters to be transmitted out. More...
 
struct  SNRThresholds
 These parameters allow the SNR requirements to be varied as a function of range. More...
 
struct  MmwDemo_1D_DopplerLines
 Active Doppler lines, lines (bins) on which the CFAR detector detected objects during the detections in Doppler direction. More...
 
struct  MmwDemo_timingInfo
 Timing information. More...
 
struct  clusteringDBscanInstance
 error code for clusteringDBscan. More...
 
struct  clusteringDBscanConfig
 Structure element of the list of descriptors for clusteringDBscan configuration. More...
 
struct  clusteringDBscanReport
 Structure for each cluster information report . More...
 
struct  trackingInputReport
 Input to tracking from the clustering output. More...
 
struct  clusteringDBscanOutput
 Structure of clustering output. More...
 
struct  KFtrackerInstance
 Struct for the tracker configuration, and pointers to scratch buffers. More...
 
struct  KFstate
 Kalman filter state. More...
 
struct  DSS_DataPathObj_t
 Millimeter Wave Demo Data Path Information. More...
 

Macros

#define BYTES_PER_SAMP_1D   (2*sizeof(int16_t)) /*16 bit real, 16 bit imaginary => 4 bytes */
 
#define BYTES_PER_SAMP_2D   (2*sizeof(int32_t)) /*32 bit real, 32 bit imaginary => 8 bytes */
 
#define BYTES_PER_SAMP_DET   sizeof(uint16_t) /*pre-detection matrix is 16 bit unsigned =>2 bytes*/
 
#define DET_THRESH_MULT   25
 
#define DET_THRESH_SHIFT   5
 
#define DET_GUARD_LEN   4
 
#define DET_NOISE_LEN   16
 
#define PI_   3.1415926535897
 
#define ONE_Q15   (1 << 15)
 
#define ONE_Q19   (1 << 19)
 
#define ONE_Q8   (1 << 8)
 
#define MMWDEMO_MEMORY_ALLOC_DOUBLE_WORD_ALIGN   8
 
#define MMWDEMO_MEMORY_ALLOC_MAX_STRUCT_ALIGN   sizeof(uint64_t)
 
#define MMW_PEAK_GROUPING_DET_MATRIX_BASED   1
 
#define MMW_PEAK_GROUPING_CFAR_PEAK_BASED   2
 
#define MMW_NOISE_AVG_MODE_CFAR_CA   ((uint8_t)0U)
 
#define MMW_NOISE_AVG_MODE_CFAR_CAGO   ((uint8_t)1U)
 
#define MMW_NOISE_AVG_MODE_CFAR_CASO   ((uint8_t)2U)
 
#define DBSCAN_ERROR_CODE_OFFSET   100
 
#define TRACKER_SCRATCHPAD_FLT_SIZE
 
#define TRACKER_SCRATCHPAD_SHORT_SIZE   (MRR_MAX_OBJ_OUT + 2*MAX_TRK_OBJs)
 
#define MMWDEMO_OUTPUT_MSG_CLUSTERS   2
 Message ID for the custom messages from the MRR demo. More...
 
#define MMWDEMO_OUTPUT_MSG_TRACKED_OBJECTS   3
 
#define MMWDEMO_OUTPUT_MSG_PARKING_ASSIST   4
 

Typedefs

typedef struct cycleLog_t_ cycleLog_t
 DSP cycle profiling structure to accumulate different processing times in chirp and frame processing periods. More...
 
typedef struct maxVelEnhStruct_t_ maxVelEnhStruct_t
 pre-computed parameters of the max-velocity-enhancement. More...
 
typedef struct MmwDemo_objRaw1D MmwDemo_objRaw1D_t
 Parameters of CFAR detected object during the first round of CFAR detections. More...
 
typedef struct MmwDemo_objRaw2D MmwDemo_objRaw2D_t
 Parameters of CFAR detected object during the second round of CFAR detections. More...
 
typedef struct MmwDemo_detectedObjActual_t MmwDemo_detectedObjActual
 Detected object estimated parameters. More...
 
typedef struct clusteringDBscanReportForTx_t clusteringDBscanReportForTx
 Structure for each cluster information report . More...
 
typedef struct trackingReportForTx_t trackingReportForTx
 Structure for tracking report. More...
 
typedef struct MmwDemo_detectedObjForTx_t MmwDemo_detectedObjForTx
 Detected object estimated parameters to be transmitted out. More...
 
typedef struct SNRThresholds RangeDependantThresh_t
 These parameters allow the SNR requirements to be varied as a function of range. More...
 
typedef struct MmwDemo_1D_DopplerLines MmwDemo_1D_DopplerLines_t
 Active Doppler lines, lines (bins) on which the CFAR detector detected objects during the detections in Doppler direction. More...
 
typedef struct MmwDemo_timingInfo MmwDemo_timingInfo_t
 Timing information. More...
 
typedef struct clusteringDBscanInstance clusteringDBscanInstance_t
 error code for clusteringDBscan. More...
 
typedef struct clusteringDBscanConfig clusteringDBscanConfig_t
 Structure element of the list of descriptors for clusteringDBscan configuration. More...
 
typedef struct clusteringDBscanReport clusteringDBscanReport_t
 Structure for each cluster information report . More...
 
typedef struct trackingInputReport trackingInputReport_t
 Input to tracking from the clustering output. More...
 
typedef struct clusteringDBscanOutput clusteringDBscanOutput_t
 Structure of clustering output. More...
 
typedef struct KFtrackerInstance KFtrackerInstance_t
 Struct for the tracker configuration, and pointers to scratch buffers. More...
 
typedef struct KFstate KFstate_t
 Kalman filter state. More...
 
typedef struct DSS_DataPathObj_t DSS_DataPathObj
 Millimeter Wave Demo Data Path Information. More...
 

Enumerations

enum  clusteringDBscanErrorCodes { DBSCAN_OK = 0, DBSCAN_ERROR_MEMORY_ALLOC_FAILED = DBSCAN_ERROR_CODE_OFFSET, DBSCAN_ERROR_NOT_SUPPORTED, DBSCAN_ERROR_CLUSTER_LIMIT_REACHED }
 error code for clusteringDBscan. More...
 

Functions

void MmwDemo_dataPathInit1Dstate (DSS_DataPathObj *obj)
 
void MmwDemo_dataPathDeleteSemaphore (DSS_DataPathObj *obj)
 
int32_t MmwDemo_dataPathInitEdma (DSS_DataPathObj *obj)
 
int32_t MmwDemo_dataPathCopyEdmaHandle (DSS_DataPathObj *objOutput, DSS_DataPathObj *objInput)
 
int32_t MmwDemo_dataPathConfigEdma (DSS_DataPathObj *obj)
 
void MmwDemo_dataPathConfigBuffers (DSS_DataPathObj *obj, uint32_t adcBufAddress)
 
void MmwDemo_dataPathConfigAzimuthHeatMap (DSS_DataPathObj *obj)
 
void MmwDemo_dataPathConfigFFTs (DSS_DataPathObj *obj)
 
void MmwDemo_waitEndOfChirps (DSS_DataPathObj *obj, uint8_t subframeIdx)
 
void MmwDemo_processChirp (DSS_DataPathObj *obj, uint8_t subframeIdx)
 
void MmwDemo_interFrameProcessing (DSS_DataPathObj *obj, uint8_t subframeIdx)
 
uint32_t MmwDemo_pow2roundup (uint32_t x)
 
float convertSNRdBToVar (uint16_t SNRdB, uint16_t bitW, uint16_t n_samples, float resolution)
 
float convertSNRLinToVar (uint16_t SNRLin, uint16_t bitW, uint16_t n_samples, float resolution)
 
void populateOutputs (DSS_DataPathObj *obj)
 
uint32_t pruneTrackingInput (trackingInputReport_t *trackingInput, uint32_t numCluster)
 
float quadraticInterpFltPeakLoc (float *restrict y, int32_t len, int32_t indx)
 
void MmwDemo_addDopplerCompensation (int32_t dopplerIdx, int32_t numDopplerBins, uint32_t *azimuthModCoefs, uint32_t *azimuthModCoefsThirdBin, uint32_t *azimuthModCoefsTwoThirdBin, int64_t *azimuthIn, uint32_t numAnt, uint32_t numTxAnt, uint16_t txAntIdx)
 Function Name : MmwDemo_DopplerCompensation. More...
 
void MmwDemo_XYcalc (DSS_DataPathObj *obj, uint32_t objIndex, uint16_t azimIdx, float *azimuthMagSqr)
 
void MmwDemo_XYZcalc (DSS_DataPathObj *obj, uint32_t objIndex, uint16_t azimIdx, float *azimuthMagSqr)
 
void parkingAssistInit (DSS_DataPathObj *obj)
 

Detailed Description

This is the data path processing header.

NOTE: (C) Copyright 2018 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.

Definition in file dss_data_path.h.

Macro Definition Documentation

◆ BYTES_PER_SAMP_1D

#define BYTES_PER_SAMP_1D   (2*sizeof(int16_t)) /*16 bit real, 16 bit imaginary => 4 bytes */

Definition at line 58 of file dss_data_path.h.

◆ BYTES_PER_SAMP_2D

#define BYTES_PER_SAMP_2D   (2*sizeof(int32_t)) /*32 bit real, 32 bit imaginary => 8 bytes */

Definition at line 59 of file dss_data_path.h.

◆ BYTES_PER_SAMP_DET

#define BYTES_PER_SAMP_DET   sizeof(uint16_t) /*pre-detection matrix is 16 bit unsigned =>2 bytes*/

Definition at line 60 of file dss_data_path.h.

◆ DBSCAN_ERROR_CODE_OFFSET

#define DBSCAN_ERROR_CODE_OFFSET   100

Definition at line 294 of file dss_data_path.h.

◆ DET_GUARD_LEN

#define DET_GUARD_LEN   4

Definition at line 65 of file dss_data_path.h.

◆ DET_NOISE_LEN

#define DET_NOISE_LEN   16

Definition at line 66 of file dss_data_path.h.

◆ DET_THRESH_MULT

#define DET_THRESH_MULT   25

Definition at line 63 of file dss_data_path.h.

◆ DET_THRESH_SHIFT

#define DET_THRESH_SHIFT   5

Definition at line 64 of file dss_data_path.h.

◆ MMW_NOISE_AVG_MODE_CFAR_CA

#define MMW_NOISE_AVG_MODE_CFAR_CA   ((uint8_t)0U)

cumulative average of the side (left or right) that is greater

Definition at line 83 of file dss_data_path.h.

◆ MMW_NOISE_AVG_MODE_CFAR_CAGO

#define MMW_NOISE_AVG_MODE_CFAR_CAGO   ((uint8_t)1U)

cumulative average of the side (left or right) that is smaller

Definition at line 86 of file dss_data_path.h.

◆ MMW_NOISE_AVG_MODE_CFAR_CASO

#define MMW_NOISE_AVG_MODE_CFAR_CASO   ((uint8_t)2U)

Definition at line 89 of file dss_data_path.h.

◆ MMW_PEAK_GROUPING_CFAR_PEAK_BASED

#define MMW_PEAK_GROUPING_CFAR_PEAK_BASED   2

cumulative average of left+right

Definition at line 80 of file dss_data_path.h.

◆ MMW_PEAK_GROUPING_DET_MATRIX_BASED

#define MMW_PEAK_GROUPING_DET_MATRIX_BASED   1

Peak grouping scheme of CFAR detected objects based only on peaks of neighboring cells that are already detected by CFAR

Definition at line 77 of file dss_data_path.h.

◆ MMWDEMO_MEMORY_ALLOC_DOUBLE_WORD_ALIGN

#define MMWDEMO_MEMORY_ALLOC_DOUBLE_WORD_ALIGN   8

Definition at line 73 of file dss_data_path.h.

◆ MMWDEMO_MEMORY_ALLOC_MAX_STRUCT_ALIGN

#define MMWDEMO_MEMORY_ALLOC_MAX_STRUCT_ALIGN   sizeof(uint64_t)

Peak grouping scheme of CFAR detected objects based on peaks of neighboring cells taken from detection matrix

Definition at line 74 of file dss_data_path.h.

◆ MMWDEMO_OUTPUT_MSG_CLUSTERS

#define MMWDEMO_OUTPUT_MSG_CLUSTERS   2

Message ID for the custom messages from the MRR demo.

Definition at line 92 of file dss_data_path.h.

◆ MMWDEMO_OUTPUT_MSG_PARKING_ASSIST

#define MMWDEMO_OUTPUT_MSG_PARKING_ASSIST   4

Definition at line 94 of file dss_data_path.h.

◆ MMWDEMO_OUTPUT_MSG_TRACKED_OBJECTS

#define MMWDEMO_OUTPUT_MSG_TRACKED_OBJECTS   3

Definition at line 93 of file dss_data_path.h.

◆ ONE_Q15

#define ONE_Q15   (1 << 15)

Definition at line 69 of file dss_data_path.h.

◆ ONE_Q19

#define ONE_Q19   (1 << 19)

Definition at line 70 of file dss_data_path.h.

◆ ONE_Q8

#define ONE_Q8   (1 << 8)

Definition at line 71 of file dss_data_path.h.

◆ PI_

#define PI_   3.1415926535897

Definition at line 68 of file dss_data_path.h.

◆ TRACKER_SCRATCHPAD_FLT_SIZE

#define TRACKER_SCRATCHPAD_FLT_SIZE
Value:
N_UNIQ_ELEM_IN_SYM_RESIDCOVMAT + \
N_UNIQ_ELEM_IN_SYM_RESIDCOVMAT + \
N_UNIQ_ELEM_IN_HMAT + \

Definition at line 376 of file dss_data_path.h.

◆ TRACKER_SCRATCHPAD_SHORT_SIZE

#define TRACKER_SCRATCHPAD_SHORT_SIZE   (MRR_MAX_OBJ_OUT + 2*MAX_TRK_OBJs)

Definition at line 386 of file dss_data_path.h.

Typedef Documentation

◆ clusteringDBscanConfig_t

Structure element of the list of descriptors for clusteringDBscan configuration.

◆ clusteringDBscanInstance_t

error code for clusteringDBscan.

◆ clusteringDBscanOutput_t

Structure of clustering output.

◆ clusteringDBscanReport_t

Structure for each cluster information report .

◆ clusteringDBscanReportForTx

Structure for each cluster information report .

◆ cycleLog_t

typedef struct cycleLog_t_ cycleLog_t

DSP cycle profiling structure to accumulate different processing times in chirp and frame processing periods.

◆ DSS_DataPathObj

Millimeter Wave Demo Data Path Information.

The structure is used to hold all the relevant information for the data path.

◆ KFstate_t

typedef struct KFstate KFstate_t

Kalman filter state.

◆ KFtrackerInstance_t

Struct for the tracker configuration, and pointers to scratch buffers.

◆ maxVelEnhStruct_t

pre-computed parameters of the max-velocity-enhancement.

◆ MmwDemo_1D_DopplerLines_t

Active Doppler lines, lines (bins) on which the CFAR detector detected objects during the detections in Doppler direction.

◆ MmwDemo_detectedObjActual

Detected object estimated parameters.

◆ MmwDemo_detectedObjForTx

Detected object estimated parameters to be transmitted out.

◆ MmwDemo_objRaw1D_t

Parameters of CFAR detected object during the first round of CFAR detections.

◆ MmwDemo_objRaw2D_t

Parameters of CFAR detected object during the second round of CFAR detections.

◆ MmwDemo_timingInfo_t

Timing information.

◆ RangeDependantThresh_t

These parameters allow the SNR requirements to be varied as a function of range.

◆ trackingInputReport_t

Input to tracking from the clustering output.

◆ trackingReportForTx

Structure for tracking report.

Enumeration Type Documentation

◆ clusteringDBscanErrorCodes

error code for clusteringDBscan.

Enumerator
DBSCAN_OK 

To be added

DBSCAN_ERROR_MEMORY_ALLOC_FAILED 

To be added

DBSCAN_ERROR_NOT_SUPPORTED 

To be added

DBSCAN_ERROR_CLUSTER_LIMIT_REACHED 

To be added

Definition at line 297 of file dss_data_path.h.

Function Documentation

◆ convertSNRdBToVar()

float convertSNRdBToVar ( uint16_t  SNRdB,
uint16_t  bitW,
uint16_t  n_samples,
float  resolution 
)

Description
The function computes the CRLB of the given estimate given an SNR input (dB) and the number of samples used in the estimate, and the resolution of the estimate.

Parameters
[in]SNRdB16 bit input with specified bitwidth.
[in]bitWinput fractional bitwidth.
[in]n_samplesnumber of samples per chirp.
[in]rangeResolutionrange resolution in meters.
Return values
2^(input/(2^fracBitIn))

Description
The function computes the CRLB of the given estimate given an SNR input (dB) and the number of samples used in the estimate, and the resolution of the estimate.

Parameters
[in]SNRdB16 bit input with specified bitwidth.
[in]bitWinput fractional bitwidth (for SNR in dB).
[in]n_samplesnumber of samples per chirp.
[in]resolutionrange resolution in meters.
Return values
CRLBin the specified resolution (with some lower bounds).

Definition at line 3971 of file dss_data_path.c.

◆ convertSNRLinToVar()

float convertSNRLinToVar ( uint16_t  SNRLin,
uint16_t  bitW,
uint16_t  n_samples,
float  resolution 
)

Description
The function computes the CRLB of the given estimate given an SNR input (linear) and the number of samples used in the estimate, and the resolution of the estimate.

The CRLB is lower bounded by the resolution.

Parameters
[in]SNRLin16 bit input with specified bitwidth.
[in]bitWinput fractional bitwidth.
[in]n_samplesnumber of samples per chirp.
[in]resolutionresolution in meters.
Return values
2^(input/(2^fracBitIn))

Description
The function computes the CRLB of the given estimate given an SNR input (linear) and the number of samples used in the estimate, and the resolution of the estimate.

The CRLB is lower bounded by the resolution.

Parameters
[in]SNRdB16 bit input with specified bitwidth.
[in]bitWinput fractional bitwidth.
[in]n_samplesnumber of samples per chirp.
[in]resolutionresolution in meters.
Return values
2^(input/(2^fracBitIn))

Definition at line 4008 of file dss_data_path.c.

◆ MmwDemo_addDopplerCompensation()

void MmwDemo_addDopplerCompensation ( int32_t  dopplerIdx,
int32_t  numDopplerBins,
uint32_t *  azimuthModCoefs,
uint32_t *  azimuthModCoefsThirdBin,
uint32_t *  azimuthModCoefsTwoThirdBin,
int64_t *  azimuthIn,
uint32_t  numAnt,
uint32_t  numTxAnt,
uint16_t  txAntIdx 
)

Function Name : MmwDemo_DopplerCompensation.


Description : Compensation of Doppler phase shift in the virtual antennas, (corresponding to second Tx antenna chirps). Symbols corresponding to virtual antennas, are rotated by half of the Doppler phase shift measured by Doppler FFT. The phase shift read from the table using half of the object Doppler index value. If the Doppler index is odd, an extra half of the bin phase shift is added.
Parameters
[in]dopplerIdx: Doppler index of the object
[in]numDopplerBins: Number of Doppler bins
[in]azimuthModCoefsTable with cos/sin values SIN in even position, COS in odd position exp(1j*2*pi*k/N) for k=0,...,N-1 where N is number of Doppler bins.
[out]azimuthModCoefsHalfBin: exp(1j*2*pi* 0.5 /N)
[in,out]azimuthIn:Pointer to antenna symbols to be Doppler compensated
[in]numAnt: Number of antenna symbols to be Doppler compensated
[in]numTxAnt: Number of Tx antenna
[in]txAntIdx: Tx Antenna index (Tx1:0 Tx2:1 Tx3:2)
Returns
void

Description : Compensation of Doppler phase shift in the virtual antennas, (corresponding to second Tx antenna chirps). Symbols corresponding to virtual antennas, are rotated by half of the Doppler phase shift measured by Doppler FFT. The phase shift read from the table using half of the object Doppler index value. If the Doppler index is odd, an extra half of the bin phase shift is added.
Parameters
[in]dopplerIdx: Doppler index of the object
[in]numDopplerBins: Number of Doppler bins
[in]azimuthModCoefsTable with cos/sin values SIN in even position, COS in odd position exp(1j*2*pi*k/N) for k=0,...,N-1 where N is number of Doppler bins.
[out]azimuthModCoefsHalfBin: exp(1j*2*pi* 0.5 /N) //TODO change to 1/3 instead of 1/2 for the correction.
[in,out]azimuthIn:Pointer to antenna symbols to be Doppler compensated
[in]numAnt: Number of antenna symbols to be Doppler compensated
Returns
void

Definition at line 4866 of file dss_data_path.c.

◆ MmwDemo_dataPathConfigAzimuthHeatMap()

void MmwDemo_dataPathConfigAzimuthHeatMap ( DSS_DataPathObj obj)

Description
Configures azimuth heat map related processing.

Return values
NotApplicable.

◆ MmwDemo_dataPathConfigBuffers()

void MmwDemo_dataPathConfigBuffers ( DSS_DataPathObj obj,
uint32_t  adcBufAddress 
)

Description
Creates heap in L2 and L3 and allocates data path buffers, The heap is destroyed at the end of the function.

Return values
NotApplicable.

Definition at line 2331 of file dss_data_path.c.

◆ MmwDemo_dataPathConfigEdma()

int32_t MmwDemo_dataPathConfigEdma ( DSS_DataPathObj obj)

Description
Configures EDMA driver for all of the data path processing.

Return values
NotApplicable.

Description
Configures all EDMA channels and param sets used in data path processing

This function is very similar to the dataPathConfigEDMA from the OOB demo, but with the difference that we have two subframes, and one subframe can support the maximum velocity enhancement modification. In this method , the 2nd dimension has two kinds of chirps and each chirp is repeated 'numDopplerBins' times, and each chirp has the same number of adc samples.

We would also like to ensure that when the data is transferred to L3 RAM, a range gate (i.e. doppler bins corresponding to a range bin) of each 'chirptype' is contiguous, so that a single EDMA can pull them both out in the 2nd dimension processing.

Hence the EDMAs corresponding to the transfer of 1D data to L3 and the transfer of data from L3 to L2 are modified.

Parameters
[in]objPointer to data path object array.
Return values
-1if error, 0 for no error

Definition at line 936 of file dss_data_path.c.

References DSS_DataPathObj_t::ADCdataBuf, DSS_DataPathObj_t::adcDataIn, BYTES_PER_SAMP_1D, BYTES_PER_SAMP_DET, EDMA_INSTANCE_DSS, DSS_DataPathObj_t::edmaHandle, EDMAutil_configType1(), EDMAutil_configType2a(), EDMAutil_configType3(), MAX, MAX_VEL_ENH_PROCESSING, MRR_SF0_EDMA_CH_1D_IN_PING, MRR_SF0_EDMA_CH_1D_IN_PONG, MRR_SF0_EDMA_CH_1D_OUT_PING, MRR_SF0_EDMA_CH_1D_OUT_PONG, MRR_SF0_EDMA_CH_2D_IN_PING, MRR_SF0_EDMA_CH_2D_IN_PONG, MRR_SF0_EDMA_CH_3D_IN_PING, MRR_SF0_EDMA_CH_3D_IN_PONG, MRR_SF0_EDMA_CH_DET_MATRIX, MRR_SF0_EDMA_CH_DET_MATRIX2, NUM_SUBFRAMES, DSS_DataPathObj_t::numAdcSamples, DSS_DataPathObj_t::numRxAntennas, and DSS_DataPathObj_t::processingPath.

Here is the call graph for this function:

◆ MmwDemo_dataPathConfigFFTs()

void MmwDemo_dataPathConfigFFTs ( DSS_DataPathObj obj)

Description
Configures FFTs (twiddle tables etc) involved in 1D, 2D and Azimuth processing.

Return values
NotApplicable.

Description
Function to populate the twiddle factors for FFTS needed for the data path object.

Parameters
[in,out]objdata path object.
Return values
waitingTime.

Definition at line 2746 of file dss_data_path.c.

◆ MmwDemo_dataPathCopyEdmaHandle()

int32_t MmwDemo_dataPathCopyEdmaHandle ( DSS_DataPathObj objOutput,
DSS_DataPathObj objInput 
)

Description
Since there may be multiple subframes, we keep a copy of the handle for each data path object.

Return values
NotApplicable.

Description
This function copies the EDMA handles to all of the remaining data path objects.

Parameters
[in,out]objdata path object.
Return values
success.

Definition at line 2272 of file dss_data_path.c.

◆ MmwDemo_dataPathDeleteSemaphore()

void MmwDemo_dataPathDeleteSemaphore ( DSS_DataPathObj obj)

Description
Delete Semaphores which are created in MmwDemo_dataPathInitEdma().

Return values
NotApplicable.

◆ MmwDemo_dataPathInit1Dstate()

void MmwDemo_dataPathInit1Dstate ( DSS_DataPathObj obj)

Description
Initializes data path state variables for 1D processing.

Return values
NotApplicable.

Description
This function initializes some of the states (counters) used for 1D processing.

Parameters
[in,out]objdata path object.
Return values
success/failure.

Definition at line 2198 of file dss_data_path.c.

◆ MmwDemo_dataPathInitEdma()

int32_t MmwDemo_dataPathInitEdma ( DSS_DataPathObj obj)

Description
Initializes EDMA driver.

Return values
NotApplicable.

Description
This function copies the EDMA handles to all of the remaining data path objects.

Parameters
[in,out]objdata path object.
Return values
success/failure.

Definition at line 2223 of file dss_data_path.c.

◆ MmwDemo_interFrameProcessing()

void MmwDemo_interFrameProcessing ( DSS_DataPathObj obj,
uint8_t  subframeIndx 
)

Description
Interframe processing. It is called from MmwDemo_dssDataPathProcessEvents after all chirps of the frame have been received and 1D FFT processing on them has been completed.

Return values
NotApplicable.

Definition at line 1633 of file dss_data_path.c.

◆ MmwDemo_pow2roundup()

uint32_t MmwDemo_pow2roundup ( uint32_t  x)

Description
Power of 2 round up function.

Definition at line 404 of file dss_data_path.c.

◆ MmwDemo_processChirp()

void MmwDemo_processChirp ( DSS_DataPathObj obj,
uint8_t  subframeIndx 
)

Description
Chirp processing. It is called from MmwDemo_dssDataPathProcessEvents. It is executed per chirp

Return values
NotApplicable.

Description
Chirp processing. It is called from MmwDemo_dssDataPathProcessEvents. It is executed per chirp.

The range FFT output is transferred in a transpose manner to L3 using an EDMA. This is done so that the 2nd FFT data can be pulled out using a non-transpose EDMA (which is more efficient)

The EDMA transfer requires a destination offset (radarCubeOffset) that is proportional with the chirp number.

For the MAX_VEL_ENH chirp, there are two chirp types (fast and slow), they are stored consecutively ( for e.g. chirp 1 of the fast chirp is directly followed by chirp 1 of the slow chirp.

Return values
NotApplicable.
  1. Book keeping.
  2. Range processing.

Definition at line 1974 of file dss_data_path.c.

References DSS_DataPathObj_t::chirpCount, DSS_DataPathObj_t::chirpTypeCount, DSS_DataPathObj_t::dopplerBinCount, EDMA_INSTANCE_DSS, DSS_DataPathObj_t::edmaHandle, EDMAutil_triggerType3(), gCycleLog, cycleLog_t_::interChirpWaitTime, isPong, MAX_VEL_ENH_PROCESSING, MmwDemo_dataPathWait1DOutputData(), MmwDemo_interChirpProcessing(), MRR_EDMA_TRIGGER_ENABLE, MRR_SF0_EDMA_CH_1D_OUT_PING, MRR_SF0_EDMA_CH_1D_OUT_PONG, DSS_DataPathObj_t::numDopplerBins, DSS_DataPathObj_t::numRxAntennas, DSS_DataPathObj_t::numTxAntennas, pingPongId, DSS_DataPathObj_t::processingPath, DSS_DataPathObj_t::radarCube, and DSS_DataPathObj_t::txAntennaCount.

Here is the call graph for this function:

◆ MmwDemo_waitEndOfChirps()

void MmwDemo_waitEndOfChirps ( DSS_DataPathObj obj,
uint8_t  subframeIndx 
)

Description
Wait for transfer of data corresponding to the last 2 chirps (ping/pong) to the radarCube matrix before starting interframe processing.

Return values
NotApplicable.

Definition at line 2079 of file dss_data_path.c.

◆ MmwDemo_XYcalc()

void MmwDemo_XYcalc ( DSS_DataPathObj obj,
uint32_t  objIndex,
uint16_t  azimIdx,
float *  azimuthMagSqr 
)

Description
Calculates X/Y coordinates in meters based on the maximum position in the magnitude square of the azimuth FFT output. The function is called per detected object.

Parameters
[in]objPointer to data path object
[in]objIndexDetected object index
[in]azimIdxIndex of the peak position in Azimuth FFT output
[in]azimuthMagSqrazimuth energy array
Return values
NONE

Definition at line 4982 of file dss_data_path.c.

Referenced by MmwDemo_XYestimation().

Here is the caller graph for this function:

◆ MmwDemo_XYZcalc()

void MmwDemo_XYZcalc ( DSS_DataPathObj obj,
uint32_t  objIndex,
uint16_t  azimIdx,
float *  azimuthMagSqr 
)

Description
Calculates X/Y/Z coordinates in meters based on the maximum position in the magnitude square of the azimuth FFT output. The function is called per detected object.

Parameters
[in]objPointer to data path object
[in]objIndexDetected object index
[in]azimIdxIndex of the peak position in Azimuth FFT output
[in]azimuthMagSqrazimuth energy array
Return values
NONEDescription
Calculates X/Y coordinates in meters based on the maximum position in the magnitude square of the azimuth FFT output. The function is called per detected object.
Parameters
[in]objPointer to data path object
[in]objIndexDetected object index
[in]azimIdxIndex of the peak position in Azimuth FFT output
[in]azimuthMagSqrazimuth energy array
Return values
NONE

Definition at line 5052 of file dss_data_path.c.

Referenced by MmwDemo_XYZestimation().

Here is the caller graph for this function:

◆ parkingAssistInit()

void parkingAssistInit ( DSS_DataPathObj obj)

Description
Initialize the 'parking assist bins' state which is essentially the closest obstruction upper bounded by an initial value

Parameters
[in]objPointer to data path object
Return values
NONEDescription
Initialize the 'parking assist bins' state which is essentially the closest obstruction upper bounded by its maximum value.
Parameters
[in]objPointer to data path object
Return values
NONE

Definition at line 5146 of file dss_data_path.c.

◆ populateOutputs()

void populateOutputs ( DSS_DataPathObj obj)

◆ pruneTrackingInput()

uint32_t pruneTrackingInput ( trackingInputReport_t trackingInput,
uint32_t  numCluster 
)

Description
The function removes objects from extreme angles and with poor angle SNR from the tracking input.

Parameters
[in]trackinginputList of tracking inputs.
[in]numClustersnumber of tracking inputs (from the clustering output).
Return values
numberof tracking inputs after pruning.

Definition at line 4706 of file dss_data_path.c.

◆ quadraticInterpFltPeakLoc()

float quadraticInterpFltPeakLoc ( float *restrict  y,
int32_t  len,
int32_t  indx 
)

Description
The function performs a quadractic peak interpolation to compute the fractional offset of the 'true' peak location. It is primarily intended to be used in oversampled FFTs.

Parameters
[in]yInput array.
[in]lenlength of the input array.
[in]indxindx of the peak location.
Return values
interpolatedoffset.

Description
The function performs a quadractic peak interpolation to compute the fractional offset of the peak location. It is primarily intended to be used in oversampled FFTs.

Parameters
[in]ythe array of data.
[in]lenlength of the array.
[in]indxcoarse peak location.
Return values
interpolatedpeak location (varies from -1 to +1).

Definition at line 4741 of file dss_data_path.c.

N_STATES
#define N_STATES
Definition: EKF_XYZ_Consts.h:61
N_UNIQ_ELEM_IN_SYM_COVMAT
#define N_UNIQ_ELEM_IN_SYM_COVMAT
Definition: EKF_XYZ_Consts.h:88
N_MEASUREMENTS
#define N_MEASUREMENTS
Definition: EKF_XYZ_Consts.h:62