This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MMWCAS-DSP-EVM: How to increase the number of zeropaddings in EVE range FFT

Part Number: MMWCAS-DSP-EVM
Other Parts Discussed in Thread: AWR2243, MMWCAS-RF-EVM,
Hi, Experts!
cascade_radar_object_detect example of PROCESSOR_SDK_RADAR_03_08_00_00 is being used, AWR2243 MMWCAS-RF-EVM and companion MMWCAS-DSP-EVM are used.
         We want to improve the range accuracy in the "cascade_radar_object_detect usecase" by applying zeropadding in the fft algorithm. And I hope to compute the fft over 512 samples (256 valid samples and 256 zeros). The same problem was raised in the following discussion, but no feasible solution was proposed in the end.
The following are my code modifications:
  • PROCESSOR_SDK_RADAR_03_08_00_00\vision_sdk\apps\src\rtos\radar\src\alg_plugins\alg_fxns\radarfft2.c
This code specifies the number of EVE horizontal fft points, in which radarWidth=numAdcSamples (set to 256). I added a 2U * at line 8 of the following code.
Before adding 2U, numHorzPoints=248, numPointsZeroPadding=8;
After adding 2U, numHorzPoints=248, numPointsZeroPadding=264;
uint32_t numZeroPoints = AlgorithmFxn_RadarFftFindNextPowerOf2(
pRadarParams->radarWidth[i]) -
pRadarParams->radarWidth[i];
pObj->numPoints[chId][i] = pRadarParams->radarWidth[i]
+ (numZeroPoints % 8U) - 8U;
......

nextPowerOf2 = 2U*AlgorithmFxn_RadarFftFindNextPowerOf2(
pObj->numPoints[chId][currProfile]);
switch(nextPowerOf2)
{
......
case FFT_TI_NUM_POINTS_512:
coeffAddr = (UInt8*) algLinkParams->algCreatePrm[0].
windowCoeffAddr[RADAR_FFT_NUM_POINTS_512];
break;
case FFT_TI_NUM_POINTS_256:
coeffAddr = (UInt8*) algLinkParams->algCreatePrm[0].
windowCoeffAddr[RADAR_FFT_NUM_POINTS_256];
break;
......
}

pInArgs = &pObj->pProcessInArgs->inAlgArgs[0].inArgs;
pInArgs->numPointsZeroPadding = nextPowerOf2 - pObj->numPoints[chId][currProfile];
......

pInArgs->bufDescription.numHorzPoints[0] = pObj->numPoints[chId][currProfile];
I noticed that the following code for implementing fft in eve also mentioned numPointsFFT=numHorzPoints+numPointsZeroPadding
PROCESSOR_SDK_RADAR_03_08_00_00\ti_components\algorithms\eve_sw_01_20_01_00\apps\fft\algo\src\fft_alg.c
numActualPoints = fftInArgs->bufDescription.numHorzPoints[0];
numPointsFFT = numActualPoints + fftInArgs->numPointsZeroPadding;
  • PROCESSOR_SDK_RADAR_03_08_00_00\vision_sdk\apps\src\rtos\radar\src\alg_plugins\alg_fxns\radardspcascademimo\radarDspCascadeMimo.c
I think after adding zeropadding, the number of rangebins should also be changed to 512 accordingly, so I made the modifications in the following code.
pObj->chObj[chId].numRangeBins[profId] = (UInt16)
(2U*AlgorithmFxn_RadarDspCascadeMimoFindNxtPower (
(UInt32)pLinkCreateParams->chCreateParams[chId].
numAdcSamples[profId]));
  • PROCESSOR_SDK_RADAR_03_08_00_00\vision_sdk\apps\src\rtos\radar\include\alg_fxns\radarDspCascadeMimo_if.h
I also noticed that a macro was defined in the following file, specifying DSP process max rangebins, which seems to be a variable used to calculate the size of the space when allocating output cache. I also changed it to 512.
#define ALGORITHMFXN_RADAR_DSP_PROCESS_MAX_RANGEBINS (512U)
         After making the above modifications, the radar seems to be stuck after opening the TFDTP connection, We are unable to perform any operations on the serial communication window, and unable to receive any data from the network.
May I ask if there are any other changes that we should make or if there are any errors in my modifications.
Thanks and Regards!
Liam
  • HI Liam,

    We will need to check this once within the team. Kindly allow us some time to check on this and get back to you on this.

    Thanks,

    Pradipta.

  • Hi Liam,

    Let's try to debug some issues here:

    1. Can you do a debug in CCS and check whether the buffer descriptor and the FFT parameters passed on to EVE are as per what changes you have made? All 4 FFT instances should be configured appropriately.
    2. Since the network link has been triggered, can you also take a binary dump of the FFT from the FFT link, plot it according to the data sizes configured and see if you are getting the expected results?
    3. Would it also be possible to halt your cores in debug and see where they are stuck in the execeution?
    4. As per what I remember, you will have to modify the FFT sizes in the chain level files where there is an option for deriving the FFT config from there or from the radar test vectors passed along with the appimage in an SD boot. Can you also confirm if this holds true?

    Regards,

    Kaushik