arjun.a
rename files
6c7b14a
Ticket Name: CCS/TDA2: biasDmaAutoIncrement_DMA_in_Init Execution time anomaly
Query Text:
Part Number: TDA2 Tool/software: Code Composer Studio In my project, there were 5 places that used EDMA. I found an anomaly in one place. I find that the EDMA configuration function in this place has a lot of time to use 1MS, and I think it should be a very small time, where the function of the configuration function is not included in the functions that actually carry the data. static int32_t biasDmaAutoIncrement_conv3x3short_ti_multi_DMA_in_Init( uint8_t *dmaAutoContextInOut, short *inBufExt, short *inBufInt[2], int16_t in_width, int16_t in_height, int16_t width, int16_t height, int channels) { int32_t status = 1; EDMA_UTILS_autoIncrement_initParam_v2 initParamV2; initParamV2.pingPongOffset[0] = (uint32_t)inBufInt[1] - (uint32_t)inBufInt[0]; initParamV2.pingPongOffset[1] = initParamV2.pingPongOffset[0]; initParamV2.initParams.numInTransfers = 1; initParamV2.initParams.numOutTransfers = 0; //parameters for ping transfer from external to internal memory and vice versa initParamV2.initParams.transferType = EDMA_UTILS_TRANSFER_IN; //parameters for out transfer - ping initParamV2.initParams.transferProp[0].roiWidth = width * 2; initParamV2.initParams.transferProp[0].roiHeight = height * channels; initParamV2.initParams.transferProp[0].roiOffset = 0; initParamV2.initParams.transferProp[0].blkWidth = width * 2; initParamV2.initParams.transferProp[0].blkHeight = height; initParamV2.initParams.transferProp[0].blkOffset = 0; initParamV2.initParams.transferProp[0].extBlkIncrementX = 0; initParamV2.initParams.transferProp[0].extBlkIncrementY = height; initParamV2.initParams.transferProp[0].intBlkIncrementX = 0; initParamV2.initParams.transferProp[0].intBlkIncrementY = 0; initParamV2.initParams.transferProp[0].extMemPtrStride = width * 2; initParamV2.initParams.transferProp[0].interMemPtrStride = in_width * 2; initParamV2.initParams.transferProp[0].extMemPtr = (uint8_t *)(inBufExt); initParamV2.initParams.transferProp[0].interMemPtr = (uint8_t *)(inBufInt[0]); initParamV2.initParams.transferProp[0].dmaQueNo = 1; //configure EDMA for ping set both Ext -> Int and Int -> Ext EDMA_UTILS_autoIncrement_init_v2(dmaAutoContextInOut,&initParamV2); status = EDMA_UTILS_autoIncrement_configure_v2(dmaAutoContextInOut,EDMA_UTILS_TRANSFER_IN); return status; } unsigned long long WH_time[10]; double WH_cost[10]; TSCH = 0; TSCL = 0; WH_time[0] = _itoll(TSCH,TSCL); int status = biasDmaAutoIncrement_conv3x3short_ti_multi_DMA_in_Init( dmaAutoContextInOut, indata, pInBufInt, in_width, in_height, width, height, channels); WH_time[1] = _itoll(TSCH,TSCL); WH_cost[0] = (double)(WH_time[1] - WH_time[0]) / 1000000.0; printf("biasDmaAutoIncrement_conv3x3short_ti_multi_DMA_in_Init= %f ms\n",WH_cost[0]);
Responses:
Hi Shuai, If I understood your question correctly, you mean biasDmaAutoIncrement_conv3x3short_ti_multi_DMA_in_Init function is taking 1ms of time. Looking at your code you are using _itoll(TSCH,TSCL) instruction to read the counters. These counters only gives you the cycles consumed and doesnt give you time directly. To measure the time you need to divide this number by the frequency at which the DSP core is running. Regards, Anshu
Hi Shuai, I am hoping that this resolved your issue and hence I am closing this thread. You can revisit it if you have more question. Regards, Anshu
HI Anshu C66 of TDA2X frequency is 500MHZ you mean actual time is like this ??? WH_time[1] = _itoll(TSCH,TSCL); WH_cost[0] = (double)(WH_time[1] - WH_time[0])*1000 / (1000000.0*500); printf("biasDmaAutoIncrement_conv3x3short_ti_multi_DMA_in_Init= %f ms\n",WH_cost[0]); shuai
HI Anshu so biasDmaAutoIncrement_conv3x3short_ti_multi_DMA_in_Init function is taking 2ms of time , i think is too big ,i think it should be 0.01MS shuai
Hi Shuai, Can you profile inside of the function to figure out which part is taking more time? Regards, Anshu
Hi Shuai, Were you able to make progress in this issue? If yes kindly close this thread. Regards, Anshu