]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/pdk.git/blob - packages/ti/drv/udma/unit_test/udma_ut/src/udma_test.h
udma-lld: add to PDK
[processor-sdk/pdk.git] / packages / ti / drv / udma / unit_test / udma_ut / src / udma_test.h
1 /*
2  *  Copyright (c) Texas Instruments Incorporated 2018
3  *
4  *  Redistribution and use in source and binary forms, with or without
5  *  modification, are permitted provided that the following conditions
6  *  are met:
7  *
8  *    Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  *
11  *    Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the
13  *    documentation and/or other materials provided with the
14  *    distribution.
15  *
16  *    Neither the name of Texas Instruments Incorporated nor the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
33 /**
34  *  \file udma_test.h
35  *
36  *  \brief This file contains all the structures, macros, enums
37  *  used by the UDMA test application.
38  *
39  */
41 #ifndef UDMA_TEST_H_
42 #define UDMA_TEST_H_
44 /* ========================================================================== */
45 /*                             Include Files                                  */
46 /* ========================================================================== */
48 #include <stdint.h>
49 #include <stdio.h>
50 #include <string.h>
52 #include <ti/drv/udma/udma.h>
54 #include <ti/osal/SemaphoreP.h>
55 #include <ti/osal/TaskP.h>
56 #include <ti/drv/uart/UART.h>
57 #include <ti/drv/uart/UART_stdio.h>
58 #include <ti/drv/fvid2/fvid2.h>
59 #include <ti/drv/udma/examples/udma_apputils/udma_apputils.h>
61 #include "utils_mem.h"
62 #include "utils_prf.h"
63 #include "udma_test_soc.h"
65 #ifdef __cplusplus
66 extern "C" {
67 #endif
69 /* ========================================================================== */
70 /*                           Macros & Typedefs                                */
71 /* ========================================================================== */
73 /** \brief Log enable for example application. */
74 #define UdmaUtTrace                     (GT_INFO1 | GT_TraceState_Enable)
76 /* UART read timeout in msec */
77 #define UDMA_TEST_UART_TIMEOUT_MSEC     (10000U)
79 /* Application name string used in print statements */
80 #define APP_NAME                        "UDMA_TEST"
82 /* Default values */
83 #define UDMA_TEST_USE_DEF               (0xFAFAU)
84 #define UDMA_TEST_DEF_LOOP_CNT          (100U)
85 #define UDMA_TEST_DEF_QDEPTH            (1U)
86 #define UDMA_TEST_PERF_LOOP_CNT         (10000U)
87 #define UDMA_TEST_PERF_QDEPTH           (1U)
89 #define UDMA_TEST_DEF_ICNT0             (1000U)
90 #define UDMA_TEST_DEF_DICNT0            (1000U)
92 #define UDMA_TEST_PERF_ICNT0            (10000U)
93 #define UDMA_TEST_PERF_DICNT0           (10000U)
95 #define UDMA_TEST_PRINT_BUFSIZE         (0x4000U)
97 #define UDMA_TEST_MAX_TASKS             (10U)
98 #define UDMA_TEST_MAX_CH                (15U)
99 #define UDMA_TEST_MAX_QDEPTH            (5U)
101 #define UDMA_TEST_MAX_ICNT              (4U)
102 #define UDMA_TEST_MAX_DIM               (3U)
104 /* Defined the following so that it is easy to understand a particular config */
105 #define USE_DEF_LP_CNT                  (UDMA_TEST_USE_DEF)
106 #define USE_DEF_QDEPTH                  (UDMA_TEST_USE_DEF)
107 #define DEF_HEAP_ID                     (UTILS_MEM_HEAP_ID_DDR)
108 #define TEST_ENABLE                     (TRUE)
109 #define TEST_DISABLE                    (FALSE)
110 #define PRF_ENABLE                      (TRUE)
111 #define PRF_DISABLE                     (FALSE)
112 #define PRINT_ENABLE                    (TRUE)
113 #define PRINT_DISABLE                   (FALSE)
114 #define TIMEST_ENABLE                   (TRUE)
115 #define TIMEST_DISABLE                  (FALSE)
116 #define DATA_CHECK_ENABLE               (TRUE)
117 #define DATA_CHECK_DISABLE              (FALSE)
118 #define PACING_NONE                     (0U)
119 #define DEF_PACING                      (20U)
121 #define UDMA_TEST_RF_SOC_AM65XX         ((uint64_t) 0x00000001U)
122 #define UDMA_TEST_RF_SOC_J721E          ((uint64_t) 0x00000002U)
123 #define UDMA_TEST_RF_SOC_ALL            ((uint64_t) 0xFFFFFFFFU)
125 #define UDMA_TEST_RF_CORE_MPU1_0        ((uint64_t)(((uint64_t) 0x0001U) << 32U))
126 #define UDMA_TEST_RF_CORE_MCU1_0        ((uint64_t)(((uint64_t) 0x0002U) << 32U))
127 #define UDMA_TEST_RF_CORE_MCU1_1        ((uint64_t)(((uint64_t) 0x0004U) << 32U))
128 #define UDMA_TEST_RF_CORE_MCU2_0        ((uint64_t)(((uint64_t) 0x0008U) << 32U))
129 #define UDMA_TEST_RF_CORE_MCU2_1        ((uint64_t)(((uint64_t) 0x0010U) << 32U))
130 #define UDMA_TEST_RF_CORE_MCU3_0        ((uint64_t)(((uint64_t) 0x0020U) << 32U))
131 #define UDMA_TEST_RF_CORE_MCU3_1        ((uint64_t)(((uint64_t) 0x0040U) << 32U))
132 #define UDMA_TEST_RF_CORE_C7X_1         ((uint64_t)(((uint64_t) 0x0080U) << 32U))
133 #define UDMA_TEST_RF_CORE_C66X_1        ((uint64_t)(((uint64_t) 0x0100U) << 32U))
134 #define UDMA_TEST_RF_CORE_C66X_2        ((uint64_t)(((uint64_t) 0x0200U) << 32U))
135 #define UDMA_TEST_RF_CORE_ALL           ((uint64_t)(((uint64_t) 0xFFFFU) << 32U))
136 #define UDMA_TEST_RF_CORE_MCU_ALL       (UDMA_TEST_RF_CORE_MCU1_0 | UDMA_TEST_RF_CORE_MCU1_1 | \
137                                          UDMA_TEST_RF_CORE_MCU2_0 | UDMA_TEST_RF_CORE_MCU2_1 | \
138                                          UDMA_TEST_RF_CORE_MCU3_0 | UDMA_TEST_RF_CORE_MCU3_1)
140 /* For future when we have dynamic coverage testcases */
141 #define UDMA_TEST_RF_CFG_ALL            ((uint64_t)(((uint64_t) 0xFFFFU) << 48U))
143 /**
144  *  \brief Test types - based on this the different application flow will be
145  *  determined.
146  */
147 typedef enum
149     UDMA_TT_BLK_CPY,
150     UDMA_TT_DRU_DIRECT,
151     UDMA_TT_DRU_INDIRECT,
152     UDMA_TT_PDMA_UART,
153     UDMA_TT_PDMA_OSPI,
154     UDMA_TT_PDMA_MCSPI,
155     UDMA_TT_PDMA_MCASP,
156     UDMA_TT_PDMA_CRC,
157     UDMA_TT_PDMA_ADC,
158     UDMA_TT_MISC,
159     UDMA_TT_CUSTOM
160 } UdmaTestType;
162 /**
163  *  \brief Testcase types.
164  */
165 typedef enum
167     /* Category */
168     UDMA_TCT_SANITY     = 0x01U,
169     UDMA_TCT_REGRESSION = 0x02U,
170     UDMA_TCT_FULL       = 0x04U,
171     /* Adequacy */
172     UDMA_TCT_FUNCTIONAL  = 0x08U,
173     UDMA_TCT_STRESS      = 0x10U,
174     UDMA_TCT_NEGATIVE    = 0x20U,
175     UDMA_TCT_PERFORMANCE = 0x40U,
176     UDMA_TCT_MISC        = 0x80U,
177     UDMA_TCT_API         = 0x100U,
178     /* Used for Test parser dont use in test case */
179     UDMA_TCT_ALL = 0x1FFU
180 } UdmaTestCaseType;
182 /**
183  *  \brief Event types.
184  */
185 typedef enum
187     UDMA_TEST_EVENT_NONE,
188     /**< No events are used - use direct dequeue API to poll for completion */
189     UDMA_TEST_EVENT_INTR,
190     /**< Events with interrupt callback - use sempahore post for completion */
191     UDMA_TEST_EVENT_POLLED,
192     /**< Events with polled mode at IA - use IA status poll for completion */
193 } UdmaTestEventMode;
195 /**
196  *  UDMA UT TX param IDs.
197  */
198 typedef enum
200     UDMA_TEST_TXCH_PRMID_DEF,
201     UDMA_TEST_TXCH_PRMID_DMA_PRIORITY_HIGH,
202     UDMA_TEST_TXCH_PRMID_INVALID,
203 } UdmaTestTxChPrmId;
205 /**
206  *  UDMA UT RX parameter IDs.
207  */
208 typedef enum
210     UDMA_TEST_RXCH_PRMID_DEF,
211     UDMA_TEST_RXCH_PRMID_DMA_PRIORITY_HIGH,
212     UDMA_TEST_RXCH_PRMID_INVALID,
213 } UdmaTestRxChPrmId;
215 /**
216  *  UDMA UT UTC parameter IDs.
217  */
218 typedef enum
220     UDMA_TEST_UTCCH_PRMID_DEF,
221     UDMA_TEST_UTCCH_PRMID_DMA_PRIORITY_HIGH,
222     UDMA_TEST_UTCCH_PRMID_INVALID,
223 } UdmaTestUtcChPrmId;
225 /**
226  *  UDMA UT PDMA parameter IDs.
227  */
228 typedef enum
230     UDMA_TEST_PDMACH_PRMID_DEF,
231     UDMA_TEST_PDMACH_PRMID_ES_16BITS,
232     UDMA_TEST_PDMACH_PRMID_INVALID,
233 } UdmaTestPdmaChPrmId;
235 /**
236  *  UDMA UT channel param IDs.
237  */
238 typedef enum
240     UDMA_TEST_CH_PRMID_DEF,
241     UDMA_TEST_CH_PRMID_INTR_DEF,
242     UDMA_TEST_CH_PRMID_TRIGGER_GLOBAL0,
243     UDMA_TEST_CH_PRMID_TRIGGER_GLOBAL0_INTR,
244     UDMA_TEST_CH_PRMID_EVENTSIZE_ICNT1,
245     UDMA_TEST_CH_PRMID_EVENTSIZE_ICNT2,
246     UDMA_TEST_CH_PRMID_EVENTSIZE_ICNT3,
247     UDMA_TEST_CH_PRMID_DRU_DEF,
248     UDMA_TEST_CH_PRMID_DRU_INTR_DEF,
249     UDMA_TEST_CH_PRMID_BLKCPY_HC_DEF,
250     UDMA_TEST_CH_PRMID_BLKCPY_HC_INTR_DEF,
251     UDMA_TEST_CH_PRMID_BLKCPY_UHC_DEF,
252     UDMA_TEST_CH_PRMID_BLKCPY_UHC_INTR_DEF,
253     UDMA_TEST_CH_PRMID_INVALID,
254 } UdmaTestChPrmId;
256 /**
257  *  UDMA UT ring param IDs.
258  */
259 typedef enum
261     UDMA_TEST_RING_PRMID_EVENT_NONE,
262     UDMA_TEST_RING_PRMID_EVENT_INTR,
263     UDMA_TEST_RING_PRMID_EVENT_POLLED,
264     UDMA_TEST_RING_PRMID_INVALID,
265 } UdmaTestRingPrmId;
267 /* ========================================================================== */
268 /*                         Structure Declarations                             */
269 /* ========================================================================== */
271 /* Forward declaration. */
272 typedef struct UdmaTestSystemCtrl_t UdmaTestSystemCtrl;
273 typedef struct UdmaTestParams_t     UdmaTestParams;
274 typedef struct UdmaTestTaskObj_t    UdmaTestTaskObj;
275 typedef struct UdmaTestObj_t        UdmaTestObj;
277 /** \brief Typedef for test case type function pointer */
278 typedef int32_t (*UdmaTestFxnPtr)(UdmaTestTaskObj *taskObj);
280 /**
281  *  \brief Test parameters for a TX channel.
282  */
283 typedef struct
285     UdmaTestTxChPrmId       txChPrmId;
286     /**< TX Channel parameter ID. */
287     Udma_ChTxPrms           txPrms;
288     /**< TX channel parameter */
289 } UdmaTestTxChPrm;
291 /**
292  *  \brief Test parameters for a RX channel.
293  */
294 typedef struct
296     UdmaTestRxChPrmId       rxChPrmId;
297     /**< RX Channel parameter ID. */
298     Udma_ChRxPrms           rxPrms;
299     /**< RX channel parameter */
300 } UdmaTestRxChPrm;
302 /**
303  *  \brief Test parameters for a UTC channel.
304  */
305 typedef struct
307     UdmaTestUtcChPrmId      utcChPrmId;
308     /**< UTC Channel parameter ID. */
309     Udma_ChUtcPrms          utcPrms;
310     /**< UTC channel parameter */
311 } UdmaTestUtcChPrm;
313 /**
314  *  \brief Test parameters for a PDMA channel.
315  */
316 typedef struct
318     UdmaTestPdmaChPrmId     pdmaChPrmId;
319     /**< PDMA Channel parameter ID. */
320     Udma_ChPdmaPrms         pdmaPrms;
321     /**< PDMA channel parameter */
322 } UdmaTestPdmaChPrm;
324 /**
325  *  \brief Test parameters for a channel.
326  */
327 typedef struct
329     UdmaTestChPrmId         chPrmId;
330     /**< Channel parameter ID. */
331     uint32_t                chType;
332     /**< UDMA channel type. */
333     uint32_t                utcId;
334     /**< UTC ID incase of DRU/external channel. */
335     uint32_t                eventMode;
336     /**< Use no event, event with interrupt or event with polled mode.
337      *   Refer #UdmaTestEventMode */
338     uint32_t                trigger;
339     /**< Global0 or Global 1 Trigger - refer \ref CSL_UdmapTrFlagsTrigger. */
340     uint32_t                eventSize;
341     /**< Refer \ref CSL_UdmapTrFlagsEventSize. */
342     uint32_t                triggerType;
343     /**< Refer \ref CSL_UdmapTrFlagsTriggerType. */
344     UdmaTestTxChPrmId       txPrmId;
345     /**< TX Channel parameter ID. */
346     UdmaTestRxChPrmId       rxPrmId;
347     /**< RX Channel parameter ID. */
348     UdmaTestUtcChPrmId      utcPrmId;
349     /**< UTC Channel parameter ID. */
350     UdmaTestPdmaChPrmId     pdmaPrmId;
351     /**< PDMA Channel parameter ID. */
352 } UdmaTestChPrm;
354 /**
355  *  \brief Test parameters for a ring.
356  */
357 typedef struct
359     UdmaTestRingPrmId       ringPrmId;
360     /**< Ring parameter ID. */
361     uint32_t                eventMode;
362     /**< Use no event, event with interrupt or event with polled mode.
363      *   Refer #UdmaTestEventMode */
364 } UdmaTestRingPrm;
366 /**
367  *  \brief Test case parameter structure.
368  */
369 struct UdmaTestParams_t
371     bool                    enableTest;
372     /**< Whether test case should be executed or not. */
373     uint32_t                tcId;
374     /**< Test case ID. */
375     char                   *tcName;
376     /**< Test case name. */
377     char                   *disableInfo;
378     /**< Reason string for disabling a test case. */
379     bool                    printEnable;
380     /**< Enable/disable print statements, used for stress testing. */
381     bool                    prfEnable;
382     /**< Enable performance prints. */
383     uint32_t                tcType;
384     /**< Type of testcase  - like BFT, stress etc... */
385     uint32_t                dcEnable;
386     /**< Enable/disable data check - used for performance. */
387     uint32_t                loopCnt;
388     /**< Loop count for test. */
390     uint32_t                numTasks;
391     /**< Number of tasks to test. */
392     uint32_t                testType[UDMA_TEST_MAX_TASKS];
393     /**< Type of test */
394     UdmaTestFxnPtr          testFxnPtr[UDMA_TEST_MAX_TASKS];
395     /**< Type of test case to run. */
396     uint32_t                pacingTime[UDMA_TEST_MAX_TASKS];
397     /**< Pacing Interval in ms. */
398     uint32_t                numCh[UDMA_TEST_MAX_TASKS];
399     /**< Number of channels per task to test. */
400     uint32_t                instId[UDMA_TEST_MAX_CH];
401     /**< NAVSS instance ID. */
402     UdmaTestChPrmId         chPrmId[UDMA_TEST_MAX_CH];
403     /**< Channel config IDs for all the tasks.
404      *   Task 0 channel configs will be first (0 to (numCh[0] - 1)),
405      *   (numCh[0] to (numCh[1] - 1)) and so on. */
406     uint32_t                qdepth[UDMA_TEST_MAX_CH];
407     /**< Queue depth. */
408     uint32_t                icnt[UDMA_TEST_MAX_CH][UDMA_TEST_MAX_ICNT];
409     /**< Source counts. */
410     uint32_t                dicnt[UDMA_TEST_MAX_CH][UDMA_TEST_MAX_ICNT];
411     /**< Destination counts. */
412     uint32_t                dim[UDMA_TEST_MAX_CH][UDMA_TEST_MAX_DIM];
413     /**< Source dims. */
414     uint32_t                ddim[UDMA_TEST_MAX_CH][UDMA_TEST_MAX_DIM];
415     /**< Destination dims. */
416     uint32_t                heapIdSrc[UDMA_TEST_MAX_CH];
417     /**< Heap ID to allocate source buffer. */
418     uint32_t                heapIdDest[UDMA_TEST_MAX_CH];
419     /**< Heap ID to allocate destination buffer. */
420     uint32_t                srcBufSize[UDMA_TEST_MAX_CH];
421     /**< Source buffer size to allocate. */
422     uint32_t                destBufSize[UDMA_TEST_MAX_CH];
423     /**< Destination buffer size to allocate. */
424     uint64_t                runFlag;
425     /**< Flag to indicate whether the test needs to be run on a particular
426      *   SOC, CORE and other configurations. */
427     UdmaTestRingPrmId       ringPrmId;
428     /**< Ring config ID. Applicable only for ring testcases */
430     /*
431      * Below variables are initialized in code and not in table!!
432      */
433     bool                    isRun;
434     /**< Flag to indicate whether the test case is run or not. */
435     int32_t                 testResult;
436     /**< Test result. */
437 };
439 /**
440  *  \brief Structure used for UDMA UT control parameters.
441  */
442 struct UdmaTestSystemCtrl_t
444     uint32_t    loopCnt;
445     /**< Default loop count. */
446     uint32_t    qdepth;
447     /**< Default queue depth for queue and dequeue operation. */
448     uint32_t    rtPrintEnable;
449     /**< Enables runtime remote prints like VENC underflow status etc. */
450 };
452 typedef struct UdmaTestChObj_t
454     int32_t                 chIdx;
456     struct Udma_ChObj       drvChObj;
457     struct Udma_EventObj    cqEventObj;
458     struct Udma_EventObj    tdCqEventObj;
459     struct Udma_EventObj    trEventObj;
461     Udma_ChHandle           chHandle;
462     Udma_EventHandle        cqEventHandle;
463     Udma_EventHandle        tdCqEventHandle;
464     Udma_EventHandle        trEventHandle;
466     Udma_EventPrms          trEventPrms;
468     Udma_DrvHandle          drvHandle;
469     uint32_t                instId;
470     SemaphoreP_Handle       transferDoneSem;
471     /**< Semaphore to indicate transfer completion */
473     uint32_t                queueCnt;
474     uint32_t                dequeueCnt;
476     uint8_t                 *fqRingMem;
477     uint8_t                 *cqRingMem;
478     uint8_t                 *tdCqRingMem;
479     uint8_t                 *trpdMem[UDMA_TEST_MAX_QDEPTH];
481     uint8_t                 *srcBuf;
482     uint8_t                 *destBuf[UDMA_TEST_MAX_QDEPTH];
484     const UdmaTestChPrm     *chPrms;
485     const Udma_ChTxPrms     *txPrms;
486     const Udma_ChRxPrms     *rxPrms;
487     const Udma_ChUtcPrms    *utcPrms;
488     const Udma_ChPdmaPrms   *pdmaPrms;
489     uint32_t                qdepth;
490     uint32_t                icnt[UDMA_TEST_MAX_ICNT];
491     uint32_t                dicnt[UDMA_TEST_MAX_ICNT];
492     uint32_t                dim[UDMA_TEST_MAX_DIM];
493     uint32_t                ddim[UDMA_TEST_MAX_DIM];
494     uint32_t                heapIdSrc;
495     uint32_t                heapIdDest;
496     uint32_t                srcBufSize;
497     uint32_t                destBufSize;
499     uint32_t                ringMemSize;
500     uint32_t                trpdSize;
501 } UdmaTestChObj;
503 /**
504  *  \brief Structure used for UDMA UT task object parameters.
505  */
506 struct UdmaTestTaskObj_t
508     UdmaTestParams         *testPrms;
509     /**< Pointer to test params for reference. */
510     uint32_t                testType;
511     UdmaTestFxnPtr          testFxnPtr;
512     uint32_t                pacingTime;
513     /**< Pacing Interval in ms. */
514     uint32_t                numCh;
515     UdmaTestChObj          *chObj[UDMA_TEST_MAX_CH];
516     uint32_t                traceMask;
517     int32_t                 testResult;
518     uint64_t                totalTransfer;
519     /**< Total bytes transferred */
520     uint32_t                durationMs;
521     /**< Time taken in ms */
522     uint64_t                mps;
523     /**< Mega bytes per second */
524     UdmaTestObj            *testObj;
525     uint32_t                taskId;
526     TaskP_Handle            taskHandle;
527     Utils_PrfTsHndl        *prfTsHandle;
528     char                    prfTsName[15];
529     uint32_t                loopCnt;
530     const UdmaTestRingPrm  *ringPrms;
531 };
533 /**
534  *  \brief Structure used for UDMA test object common for all the tasks.
535  */
536 struct UdmaTestObj_t
538     UdmaTestSystemCtrl  sysCtrl;
539     /**< System control information. */
540     UdmaTestParams     *testPrms;
541     /**< Pointer to test params for reference. */
542     uint32_t            skipCount;
543     /**< Number of test cases skipped because of platform/user settings. */
544     uint32_t            disableCount;
545     /**< Number of test cases disabled because of any bug etc. */
546     uint32_t            traceMask;
547     /**< Masks for the debug prints. */
548     uint64_t            runFlag;
549     /**< Current run flag for a SOC, CORE and other configurations. */
551     struct Udma_DrvObj  drvObj[UDMA_INST_ID_MAX];
553     SemaphoreP_Handle   taskCompleteSem;
554     SemaphoreP_Handle   lockSem;
556     UdmaTestTaskObj     taskObj[UDMA_TEST_MAX_TASKS];
557     UdmaTestChObj       chObjs[UDMA_TEST_MAX_CH];
558 };
560 /* ========================================================================== */
561 /*                          Function Declarations                             */
562 /* ========================================================================== */
564 /*
565  * Parser functions
566  */
567 int32_t udmaTestParser(void);
568 void udmaTestPrint(const char *str, ...);
569 void udmaDrvPrint(const char *str);
571 /*
572  * UDMA block copy test case functions
573  */
574 int32_t udmaTestBlkcpyTc(UdmaTestTaskObj *taskObj);
575 int32_t udmaTestBlkcpyPauseResumeTc(UdmaTestTaskObj *taskObj);
576 /*
577  * UDMA ring test functions
578  */
579 int32_t udmaTestRingProxyTc(UdmaTestTaskObj *taskObj);
580 int32_t udmaTestRingFlushTc(UdmaTestTaskObj *taskObj);
581 int32_t udmaTestRingEventTc(UdmaTestTaskObj *taskObj);
582 int32_t udmaTestRingParamCheckTc(UdmaTestTaskObj *taskObj);
583 int32_t udmaTestRingUtilsMemSizeTc(UdmaTestTaskObj *taskObj);
584 int32_t udmaTestRingMemPtrTc(UdmaTestTaskObj *taskObj);
585 int32_t udmaTestRingAttachTc(UdmaTestTaskObj *taskObj);
586 int32_t udmaTestRingResetTc(UdmaTestTaskObj *taskObj);
587 int32_t udmaTestRingPrimeTc(UdmaTestTaskObj *taskObj);
588 /*
589  * UDMA ring monitor test functions
590  */
591 int32_t udmaTestRingMonPushPopTc(UdmaTestTaskObj *taskObj);
592 int32_t udmaTestRingMonLowThresholdTc(UdmaTestTaskObj *taskObj);
593 int32_t udmaTestRingMonHighThresholdTc(UdmaTestTaskObj *taskObj);
594 /*
595  * UDMA proxy test functions
596  */
597 int32_t udmaTestProxyPerformanceTc(UdmaTestTaskObj *taskObj);
598 /*
599  * UDMA flow test functions
600  */
601 int32_t udmaTestFlowAttachTc(UdmaTestTaskObj *taskObj);
602 int32_t udmaTestFlowAllocTc(UdmaTestTaskObj *taskObj);
603 /*
604  * UDMA event test functions
605  */
606 int32_t udmaTestEventOutOfRangeFlow(UdmaTestTaskObj *taskObj);
607 /*
608  * UDMA misc test functions
609  */
610 int32_t udmaTestPsilMacroTc(UdmaTestTaskObj *taskObj);
611 int32_t udmaTestOsalPrmsTc(UdmaTestTaskObj *taskObj);
612 int32_t udmaTestTrMakeTc(UdmaTestTaskObj *taskObj);
613 int32_t udmaTestStructSizeTc(UdmaTestTaskObj *taskObj);
614 /*
615  * UDMA bug test functions
616  */
617 int32_t udmaTestBugTcPDK_3863(UdmaTestTaskObj *taskObj);
618 int32_t udmaTestBugTcPDK_4654(UdmaTestTaskObj *taskObj);
620 /*
621  * UDMA Negative test case functions
622  */
624 /*
625  * UDMA SOC specific functions
626  */
627 int32_t udmaTestPrintPsilMacro(UdmaTestTaskObj *taskObj);
628 int32_t udmaTestPrintPdmaMacro(UdmaTestTaskObj *taskObj);
630 /*
631  * UDMA common functions
632  */
633 int32_t udmaTestInitDriver(UdmaTestObj *testObj);
634 int32_t udmaTestDeinitDriver(UdmaTestObj *testObj);
635 int32_t udmaTestInitVariables(const UdmaTestObj *testObj);
636 void udmaTestFreeVariables(const UdmaTestObj *testObj);
637 void udmaTestLogTestResult(const UdmaTestObj *testObj,
638                            int32_t            testResult,
639                            uint32_t           tcId,
640                            char              *tcInfo);
641 void udmaTestPrintTestResult(const UdmaTestObj *testObj,
642                              uint32_t           skipCount,
643                              uint32_t           disableCount);
644 void udmaTestResetTestResult(void);
645 void udmaTestCalcPerformance(UdmaTestTaskObj *taskObj, uint32_t durationMs);
646 void udmaTestCalcTotalPerformance(UdmaTestObj *testObj, uint32_t durationMs);
647 int32_t udmaTestCompareRingHwOccDriver(Udma_RingHandle ringHandle, uint32_t cnt);
649 char AppUtils_getChar(void);
650 int32_t AppUtils_getCharTimeout(char *ch, uint32_t msec);
651 int32_t AppUtils_getNum(void);
653 uint32_t AppUtils_getCurTimeInMsec(void);
654 uint32_t AppUtils_getElapsedTimeInMsec(uint32_t startTime);
656 /* ========================================================================== */
657 /*      Internal Function Declarations (Needed for other static inlines)      */
658 /* ========================================================================== */
660 /* None */
662 /* ========================================================================== */
663 /*                       Static Function Definitions                          */
664 /* ========================================================================== */
666 /* None */
668 #ifdef __cplusplus
670 #endif
672 #endif /* #ifndef UDMA_TEST_H_ */