]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/fftc/test/src/test_singlecore_dftlist.c
fftc-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / fftc / test / src / test_singlecore_dftlist.c
1 /** \r
2  *   @file  test_singlecore_dftlist.c\r
3  *\r
4  *   @brief  \r
5  *          Tests FFTC functionality on any single core using FFTC, CPPI, QMSS\r
6  *          libraries.\r
7  *\r
8  *          Tests using data consisting of mixed size DFT samples.\r
9  * \r
10  *  \par\r
11  *  ============================================================================\r
12  *  @n   (C) Copyright 2009, Texas Instruments, Inc.\r
13  * \r
14  *  Redistribution and use in source and binary forms, with or without \r
15  *  modification, are permitted provided that the following conditions \r
16  *  are met:\r
17  *\r
18  *    Redistributions of source code must retain the above copyright \r
19  *    notice, this list of conditions and the following disclaimer.\r
20  *\r
21  *    Redistributions in binary form must reproduce the above copyright\r
22  *    notice, this list of conditions and the following disclaimer in the \r
23  *    documentation and/or other materials provided with the   \r
24  *    distribution.\r
25  *\r
26  *    Neither the name of Texas Instruments Incorporated nor the names of\r
27  *    its contributors may be used to endorse or promote products derived\r
28  *    from this software without specific prior written permission.\r
29  *\r
30  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \r
31  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT \r
32  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
33  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT \r
34  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, \r
35  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT \r
36  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
37  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
38  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
39  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
40  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
41  *\r
42 */\r
43 /* FFTC test application include */\r
44 #include "fftc_test.h"\r
45 \r
46 /**************************************************************\r
47 ************************* GLOBAL VARIABLES ********************\r
48 ***************************************************************/\r
49 extern UInt32               totalNumTestsPass, totalNumTestsFail;\r
50 \r
51 /**************************************************************\r
52 ************************* TEST FUNCTIONS **********************\r
53 ***************************************************************/\r
54 \r
55 /* ============================================================================\r
56  *  @n@b register_rx_interrupts\r
57  *\r
58  *  @b  brief\r
59  *  @n  Utility function to register interrupts using BIOS APIs.\r
60  *\r
61  *  @param[in]\r
62  *  @n fftcInstNum          FFTC instance corresponding to this handle\r
63  *\r
64  *  @param[in]\r
65  *  @n hRxObj               Rx object handle \r
66  *\r
67  *  @return     Int32\r
68  *              -1      -   FFTC Rx test failed.\r
69  *              0       -   FFTC Rx test successful.\r
70  * ============================================================================\r
71  */\r
72 static void register_rx_interrupts \r
73 (\r
74     UInt8               fftcInstNum,\r
75     Fftc_RxHandle               hRxObj\r
76 )\r
77 {\r
78     Int16               eventId;\r
79 \r
80     /* Map the FFTC system event number corresponding to the FFTC instance\r
81      * we are using here to a interrupt vector to hook up interrupts on.\r
82      */\r
83     if (fftcInstNum == CSL_FFTC_0)\r
84     {\r
85         eventId     =   49;\r
86     }\r
87     else \r
88     {\r
89         eventId     =   51;\r
90     }\r
91 \r
92     /* Register the FFTC driver's high priority ISR handle for this event */\r
93     EventCombiner_dispatchPlug (eventId, (EventCombiner_FuncPtr)Fftc_rxHiPriorityRxISR, (UArg)hRxObj, TRUE);\r
94         EventCombiner_enableEvent(eventId);\r
95 \r
96     return;\r
97 }\r
98 \r
99 /**\r
100  * ============================================================================\r
101  *  @n@b fftc_test_core\r
102  *\r
103  *  @b  brief\r
104  *  @n  This API sets up the FFTC transmit, receive objects required for\r
105  *      running the Mixed Size DFT configuration test on a given core.\r
106  *\r
107  *  @param[in]  \r
108  *  @n  hFFTC               FFTC Driver handle\r
109  *\r
110  *  @param[in]  \r
111  *  @n  txQNum              Tx queue number to run test on\r
112  *\r
113  *  @return     Int32\r
114  *              -1      -   FFTC test failed.\r
115  *              0       -   FFTC test successful.\r
116  * ============================================================================\r
117  */\r
118 static Int32 fftc_test_core (Fftc_DrvHandle hFFTC, UInt32 txQNum)\r
119 {\r
120     Fftc_RequestHandle          hRequestInfo;\r
121     Fftc_ResultHandle           hResultInfo;\r
122     Fftc_TxHandle               hTxObj  =       NULL;\r
123     Fftc_RxHandle               hRxObj  =       NULL;\r
124     Fftc_TxCfg                  txCfg;    \r
125     Fftc_RxCfg                  rxCfg;    \r
126     UInt32                      blockExpVal, clipping;\r
127     Fftc_BlockInfo              blockInfo;\r
128     UInt8                       *pReqBuffer, *pResultBuffer, *pResultPSInfo, rxFlowId, rxSrcId;\r
129     UInt32                      maxReqBufferLen, reqBufferLen, resultLen, rxPSInfoLen, txPSInfoLen = 0;\r
130     Fftc_Result*                pFFTResult = NULL;\r
131     Cplx16                      *xout, *xoutread;\r
132     UInt16                      i, j, pktCounter = 0, rxDestnTagInfo;\r
133     Int32                       retVal;\r
134     UInt32                      bIsTestFailed = 0;\r
135     FFT_TestCfg*                pFFTTestCfg = NULL;\r
136     UInt32                      blockDataOffset = 0;\r
137     UInt8                       coreNum = CSL_chipReadReg (CSL_CHIP_DNUM);\r
138 \r
139     /* Allocate memory for the test configuration */\r
140     if (!(pFFTTestCfg = (FFT_TestCfg *) Fftc_osalMalloc (sizeof (FFT_TestCfg), FALSE)))\r
141     {\r
142         Fftc_osalLog ("[Core %d]: Error allocating memory for test configuration \n", coreNum);\r
143         return -1;\r
144     }\r
145 \r
146     /* Read the FFT input vector and configuration for this test \r
147      * from the corresponding input configuration file.\r
148      * Mixed size DFT list testcaseId is 5\r
149      */\r
150     if (fftc_parse_testCfg (5, pFFTTestCfg, &blockInfo) < 0)\r
151     {\r
152         return -1;         \r
153     }\r
154 \r
155     Fftc_osalLog ("--------------------------------------------\n");        \r
156     Fftc_osalLog ("FFTC-CPPI MIXED SIZE DFT Test START on Core %d \n", coreNum);\r
157     Fftc_osalLog ("Number of Blocks:        %d \n", pFFTTestCfg->numBlocks);\r
158     Fftc_osalLog ("Tx Queue:                %d \n", txQNum);\r
159     Fftc_osalLog ("Descriptor Type:         Host \n");\r
160     Fftc_osalLog ("--------------------------------------------\n");   \r
161     \r
162     /* Setup a Rx flow. This flow will be used to retrieve FFT results\r
163      * from a destination queue.\r
164      *\r
165      * Rx flow Configuration Params:\r
166      * -----------------------------\r
167      *      -   Use Host descriptors\r
168      *      -   No PS Info (bPSInfoPresent = 0)\r
169      *      -   Setup Rx object for interrupts + blocking mode\r
170      *      -   Let FFTC driver pick the destination queue by\r
171      *          calling Fftc_getDeviceAccumulatorConfig()\r
172      *      -   Pick a buffer size big enough to hold the error information and\r
173      *          FFT result itself.\r
174      */\r
175     memset (&rxCfg, 0, sizeof (rxCfg));\r
176     rxCfg.useFlowId                                         =   -1;\r
177     rxCfg.bManageRxFlowCfg                  =   1;\r
178     rxCfg.rxFlowCfg.drvCfg.cppiNumDesc      =   2;\r
179     /* Allocate result buffers big enough to hold:\r
180      *\r
181      * Per block result =   Per block error info (block exp val + clipping detect + srcId + flowId) (16 bytes) +\r
182      *                      block output data (number of samples * sample size)\r
183      */\r
184     for (i = 0; i < pFFTTestCfg->numBlocks; i++)  \r
185     {\r
186         rxCfg.rxFlowCfg.drvCfg.bufferSize   +=   (pFFTTestCfg->numOutputSamples[i] * FFTC_TEST_SAMPLE_SIZE + 16);\r
187     }\r
188     rxCfg.rxFlowCfg.drvCfg.bufferSize       +=  4;  \r
189     rxCfg.rxFlowCfg.drvCfg.bPSInfoPresent   =   0; \r
190     rxCfg.rxFlowCfg.drvCfg.psLocation       =   Cppi_PSLoc_PS_IN_DESC;\r
191     rxCfg.cppiRxQNum                        =   -1;\r
192     rxCfg.bBlockOnResult                    =   1;\r
193     rxCfg.bUseInterrupts                    =   1;\r
194     rxCfg.bManageAccumList                  =   1;      /* Let driver do the Accum Management */          \r
195         rxCfg.accumCfg.drvCfg.bEnablePacing         =   0;              /* Disable pacing */\r
196         rxCfg.accumCfg.drvCfg.intThreshold              =       1;              /* Set interrupt threshold to 1 */\r
197     Fftc_getDeviceAccumulatorConfig (CSL_FFTC_0, &rxCfg.accumCfg.drvCfg.accChannelNum, (UInt32*)&rxCfg.cppiRxQNum);\r
198 \r
199     /* Get a Rx Object Handle */\r
200     if ((hRxObj = Fftc_rxOpen (hFFTC, &rxCfg)) == NULL)\r
201     {\r
202         Fftc_osalLog ("[Core %d]: Rx flow open failed \n", coreNum);\r
203         goto error;\r
204     }\r
205     else\r
206     {\r
207         Fftc_osalLog ("[Core %d]: Rx Flow %d opened successfully using Rx queue %d \n", coreNum, \r
208                         Fftc_rxGetFlowId (hRxObj), Fftc_rxGetRxQueueNumber (hRxObj));\r
209     }  \r
210    \r
211     register_rx_interrupts (CSL_FFTC_0, hRxObj);\r
212 \r
213     /* Setup a Tx Object. This object will be used to submit FFT requests.\r
214      *\r
215      * Tx object Configuration Params:\r
216      * -----------------------------\r
217      *      -   Pre-alloc Tx Free Desc (bManageReqBuffers = 1)\r
218      *      -   Use Host descriptors\r
219      *      -   Pick a buffer size big enough to hold all the\r
220      *          FFT request blocks.\r
221      *      -   No PS Info (bPSInfoPresent = 0)\r
222      *      -   Enable mixed size DFTs (bEnableDftSizeListCfg = 1)\r
223      *      -   Open queue in shared mode (bSharedMode = 1). \r
224      *          Enables re-programming queue using CPPI.\r
225      */\r
226     memset (&txCfg, 0, sizeof (txCfg));\r
227     txCfg.txQNum                =   (Fftc_QueueId) txQNum; \r
228     txCfg.bManageReqBuffers     =   1; \r
229     txCfg.bEnableDftSizeListCfg =   1; \r
230     txCfg.maxDftSizeListLen             =       pFFTTestCfg->numBlocks;\r
231     txCfg.fftQCfg               =   pFFTTestCfg->fftcQCfg;\r
232     txCfg.bSharedMode           =   1;\r
233     txCfg.descType              =   Cppi_DescType_HOST; \r
234     txCfg.cppiNumDesc           =   1; \r
235         for (i = 0; i < pFFTTestCfg->numBlocks; i++)\r
236     {\r
237         txCfg.bufferSize        +=   pFFTTestCfg->numInputSamples[i] * FFTC_TEST_SAMPLE_SIZE;  \r
238     }\r
239     txCfg.bPSInfoPresent        =   0; \r
240 \r
241     /* Get a Tx Object Handle */\r
242     if ((hTxObj = Fftc_txOpen (hFFTC, &txCfg)) == NULL)\r
243     {\r
244         Fftc_osalLog ("[Core %d]: Tx open failed \n", coreNum);\r
245         goto error;\r
246     }\r
247 \r
248     /* -------------------------------------\r
249      * Submit FFT request \r
250      * -------------------------------------\r
251      */\r
252 \r
253     /* Run the test in a loop for the number of packets specified */\r
254         while (pktCounter != NUM_TEST_PACKETS)\r
255         {\r
256                 /* No PS info */\r
257         txPSInfoLen     =   0;\r
258         /* Initialize the request buffer offset */\r
259         blockDataOffset =       0;\r
260 \r
261         /* Get a request buffer */\r
262         if (Fftc_txGetRequestBuffer (hTxObj, \r
263                                     &blockInfo, \r
264                                     &pFFTTestCfg->fftcQCfg, \r
265                                     txPSInfoLen,     \r
266                                     Fftc_rxGetFlowId (hRxObj),                            \r
267                                     pktCounter,\r
268                                     &hRequestInfo, \r
269                                     &pReqBuffer, \r
270                                     &maxReqBufferLen) < 0)\r
271         {\r
272             Fftc_osalLog ("[Core %d]: Unable to get request buffer \n", coreNum);\r
273             goto error;\r
274         }\r
275 \r
276         /* Initialize the whole FFT request buffer */\r
277         memset (pReqBuffer, 0, maxReqBufferLen);\r
278 \r
279         /* The request buffer MUST be populated in the following order:\r
280          *\r
281          * <PS Info to be passed to receiver> then followed by <FFT request data>\r
282          */\r
283         /* We have no Protocol Specific Pass through data to pass to receiver in this test.\r
284          * So just copy the FFT request data itself into the request buffer, block by block \r
285          */\r
286         for (i = 0; i < pFFTTestCfg->numBlocks; i ++)\r
287         {\r
288             /* Copy the FFT request block \r
289              * Each block size = number of samples * size of each sample\r
290              *                 = pFFTTestCfg->numInputSamples * FFTC_TEST_SAMPLE_SIZE\r
291              */                \r
292             memcpy ((Ptr) (pReqBuffer + blockDataOffset), \r
293                     (Ptr) pFFTTestCfg->pFftInputData [i], \r
294                     pFFTTestCfg->numInputSamples[i] * FFTC_TEST_SAMPLE_SIZE);\r
295         \r
296             /* Increment the data offset so that the next block data can \r
297              * be copied to the correct location in request buffer.\r
298              */\r
299             blockDataOffset +=  (pFFTTestCfg->numInputSamples[i] * FFTC_TEST_SAMPLE_SIZE);\r
300         }\r
301         reqBufferLen = blockDataOffset;\r
302 \r
303 #ifdef FFTC_TEST_DEBUG\r
304         Fftc_osalLog ("\n[Core %d]: Submitting FFT Request ... \n", coreNum);\r
305 #endif\r
306 \r
307         /* Submit the FFT request for processing */\r
308         if (Fftc_txSubmitRequest (hTxObj, \r
309                                   hRequestInfo, \r
310                                   reqBufferLen) < 0)\r
311         {\r
312             Fftc_osalLog ("[Core %d]: Unable to submit request \n", coreNum);\r
313             goto error;\r
314         }\r
315         else\r
316         {\r
317 #ifdef FFTC_TEST_DEBUG\r
318             Fftc_osalLog ("Submitted request %d successfully \n", pktCounter);       \r
319 #endif\r
320         }\r
321 \r
322         /* -------------------------------------\r
323          * Wait on FFT result and verify Result\r
324          * -------------------------------------\r
325          */\r
326 #ifdef FFTC_TEST_DEBUG\r
327         Fftc_osalLog ("\n[Core %d]: Waiting for Result ... \n", coreNum);\r
328 #endif\r
329 \r
330         /* Get the raw result from the engine. */   \r
331         if ((retVal = Fftc_rxGetResult (hRxObj, \r
332                                         &hResultInfo,\r
333                                         &pResultBuffer, \r
334                                         &resultLen, \r
335                                         &pResultPSInfo, \r
336                                         &rxPSInfoLen,\r
337                                         &rxFlowId,\r
338                                         &rxSrcId,\r
339                                         &rxDestnTagInfo\r
340                                         )) != FFTC_RETVAL_SUCCESS)\r
341         {\r
342             Fftc_osalLog ("[Core %d]: Invalid FFT result : %d \n", coreNum, retVal);\r
343             goto error;\r
344         }\r
345 \r
346         /* Allocate memory to hold the formatted result */\r
347         pFFTResult = (Fftc_Result *) Fftc_osalMalloc (sizeof (Fftc_Result), FALSE);\r
348     \r
349         /* Get the formatted result. */\r
350         if ((retVal = Fftc_rxParseResult (hRxObj, \r
351                                           hResultInfo, \r
352                                             pResultBuffer, \r
353                                             resultLen, \r
354                                             &blockInfo,\r
355                                             pFFTTestCfg->fftcQCfg.controlRegConfig.bSupressSideInfo,\r
356                                             pFFTTestCfg->fftcQCfg.cyclicPrefixRegConfig.cyclicPrefixAddNum,\r
357                                           pFFTResult)) != FFTC_RETVAL_SUCCESS)\r
358         {\r
359             Fftc_osalLog ("[Core %d]: Error parsing result, error: %d \n", coreNum, retVal);\r
360             goto error;\r
361         }\r
362         \r
363         /* verify result */\r
364 #ifdef FFTC_TEST_DEBUG\r
365             Fftc_osalLog("[Core %d]: Result Info:: DestnTag: %d Error detected: %d Number of FFTC Result Blocks: %d \n", coreNum, \r
366                         pFFTResult->destnTagInfo, pFFTResult->bErrorDetected, pFFTResult->numFFTCBlocks);\r
367 #endif\r
368 \r
369         /* Get the per block result and compare against the expected values\r
370          * to see if the FFT operation succeeded.\r
371          */\r
372         for (j = 0; j < pFFTResult->numFFTCBlocks; j++)\r
373         {\r
374 #ifdef FFTC_TEST_DEBUG\r
375             Fftc_osalLog ("\n[Core %d]: ********* Block %d Result *********\n", coreNum, j);\r
376 #endif\r
377 \r
378             /* Results got */                \r
379             xout            =   (Cplx16 *) pFFTResult->fftBlockResult [j].pBuffer;\r
380             blockExpVal     =   pFFTResult->fftBlockResult [j].blockExponentVal;\r
381             clipping        =   pFFTResult->bClippingDetected;\r
382 \r
383             /* Expected result */\r
384             xoutread        =   (Cplx16 *) pFFTTestCfg->pFftOutputData [j];\r
385 \r
386 #ifdef FFTC_TEST_DEBUG\r
387             Fftc_osalLog ("\n[Core %d]: FFT Result details: blockExp: %d Clipping: %d Result buffer len: %d \n", coreNum, \r
388                             blockExpVal, clipping, pFFTResult->fftBlockResult [j].bufferLen);\r
389 \r
390             Fftc_osalLog ("\n[Core %d]: Comparing FFT Result from engine against expected ... \n", coreNum);\r
391 #endif\r
392 \r
393             /* Compare the FFT result data block against expected */\r
394                 for (i = 0; i < pFFTTestCfg->numOutputSamples[j]; i++)\r
395                 {\r
396                 /* Ignore LSB comparison. \r
397                  *\r
398                  * Since the reference data is generated using\r
399                  * MATLAB, there could be an error margin of +/-1 between the\r
400                  * reference and actual received FFTC output.\r
401                  *\r
402                  * For now, mask off the LSB and compare for\r
403                  * correctness of the FFT processing.\r
404                  */\r
405                 if (((xout[i].real != xoutread[i].real) && \r
406                     ((xout[i].real - xoutread[i].real != -1) && (xout[i].real - xoutread[i].real != 1))) ||\r
407                     ((xout[i].imag != xoutread[i].imag) && \r
408                     ((xout[i].imag - xoutread[i].imag != -1) && (xout[i].imag - xoutread[i].imag != 1))))\r
409                 {\r
410 #ifdef FFTC_TEST_DEBUG\r
411                     Fftc_osalLog ("[Core %d]: Real data sample %d: test failed, read: %d actual: %d \n", coreNum\r
412                                     , i, xout[i].real, xoutread[i].real);\r
413                     Fftc_osalLog ("[Core %d]: Imag data sample %d: test failed, read: %d actual: %d \n", coreNum\r
414                                     , i, xout[i].imag, xoutread[i].imag);\r
415 #endif\r
416                     \r
417                     bIsTestFailed ++;\r
418                 }\r
419             }\r
420 \r
421 #ifdef FFTC_TEST_DEBUG\r
422             if (!bIsTestFailed)\r
423                 Fftc_osalLog ("[Core %d]: FFT Result Correct !! \n", coreNum);\r
424             else\r
425                 Fftc_osalLog ("[Core %d]: FFT Result Wrong !! \n", coreNum);                                    \r
426 #endif\r
427 \r
428             /* Compare the block exponent value got against expected value */\r
429             if (!pFFTTestCfg->fftcQCfg.controlRegConfig.bSupressSideInfo && blockExpVal != pFFTTestCfg->blockExpVal [j])\r
430             {\r
431 #ifdef FFTC_TEST_DEBUG\r
432                 Fftc_osalLog("[Core %d]: Block Exponent mismatch: test failed, read: %d actual: %d \n", coreNum\r
433                             , blockExpVal, pFFTTestCfg->blockExpVal [j]);\r
434 #endif\r
435                 bIsTestFailed ++;\r
436             }\r
437             else\r
438             {\r
439 #ifdef FFTC_TEST_DEBUG\r
440                 Fftc_osalLog ("[Core %d]: Block Exponent Value Correct !! \n", coreNum);\r
441 #endif\r
442             }\r
443 \r
444             /* Compare the clipping detected value got against expected value */\r
445             if (!pFFTTestCfg->fftcQCfg.controlRegConfig.bSupressSideInfo && clipping != pFFTTestCfg->bClippingDetected [j])\r
446             {\r
447 #ifdef FFTC_TEST_DEBUG\r
448                 Fftc_osalLog("[Core %d]: Clipping Detect mismatch: test failed, read: %d actual: %d \n", coreNum\r
449                                 ,clipping, pFFTTestCfg->bClippingDetected [j]);\r
450 #endif\r
451                 bIsTestFailed ++;\r
452             }\r
453             else\r
454             {\r
455 #ifdef FFTC_TEST_DEBUG\r
456                 Fftc_osalLog ("[Core %d]: Clipping Detect Value Correct !! \n", coreNum);\r
457 #endif\r
458             }\r
459         }\r
460 \r
461         /* Done using the result buffer, return it to the FFTC driver for recycling */\r
462         if (Fftc_rxFreeResult (hRxObj, \r
463                                hResultInfo\r
464                                ) < 0)\r
465         {\r
466             Fftc_osalLog ("[Core %d]: Error freeing result : %d \n", coreNum, i);\r
467             goto error;\r
468         }\r
469 \r
470                 /* Free the formatted FFT result info memory */\r
471                 if (pFFTResult)\r
472         {\r
473                         Fftc_osalFree (pFFTResult, sizeof (Fftc_Result), FALSE);\r
474             pFFTResult = NULL;\r
475         }\r
476                         \r
477             pktCounter ++;\r
478         }\r
479         \r
480         if (bIsTestFailed == 0)\r
481         {\r
482                 Fftc_osalLog ("\n[Core %d]: FFTC Test PASS !! Processed FFT Requests = %d \n", coreNum, pktCounter);                \r
483         }\r
484         else\r
485         {\r
486                 Fftc_osalLog ("\n[Core %d]: FFTC Test FAILED !! Num Tests Failed = %d \n", coreNum, bIsTestFailed);                \r
487         }\r
488 \r
489     /* Free the FFT input, output data and test configuration memory allocated */\r
490     fftc_clean_testCfg (pFFTTestCfg, &blockInfo);\r
491 \r
492     /* Close all FFTC handles */\r
493     if (hRxObj)\r
494         Fftc_rxClose (hRxObj);\r
495 \r
496         if (hTxObj)     \r
497         Fftc_txClose (hTxObj);\r
498 \r
499         /* Return success. */\r
500         return 0;        \r
501 \r
502 error:\r
503     /* Free the FFT result info memory */\r
504     if (pFFTResult)\r
505         Fftc_osalFree (pFFTResult, sizeof (Fftc_Result), FALSE);\r
506 \r
507     /* Free the FFT input, output data and test configuration memory allocated */\r
508     fftc_clean_testCfg (pFFTTestCfg, &blockInfo);\r
509 \r
510     /* Close all FFTC handles */\r
511     if (hRxObj)\r
512         Fftc_rxClose (hRxObj);\r
513 \r
514         if (hTxObj)     \r
515         Fftc_txClose (hTxObj);\r
516 \r
517     /* Return error */\r
518     return -1;\r
519 }\r
520 \r
521 \r
522 /**\r
523  * ============================================================================\r
524  *  @n@b test_singlecore_dftlist\r
525  *\r
526  *  @b  brief\r
527  *  @n  This API sets up the test environment, test parameters, calls the test \r
528  *      core API to actually run the test and finally de-initializes the system.\r
529  *\r
530  *  @return     \r
531  *  @n  None\r
532  * ============================================================================\r
533  */\r
534 Void test_singlecore_dftlist \r
535 (\r
536     Fftc_DrvHandle          hFFTC\r
537 )\r
538 {\r
539     UInt32                  queueNum = 0;\r
540 \r
541         /* Run the test on queue 0 */\r
542         if (fftc_test_core (hFFTC, queueNum) < 0)\r
543         {\r
544                 totalNumTestsFail ++;                    \r
545         }\r
546         else\r
547         {\r
548                 totalNumTestsPass ++;                    \r
549         }\r
550     \r
551     Fftc_osalLog ("--------------------------------------------\n");        \r
552     Fftc_osalLog ("FFTC-CPPI MIXED SIZE DFT Test END\n");\r
553     Fftc_osalLog ("--------------------------------------------\n");        \r
554 \r
555     return;\r
556 }\r