arjun.a
rename files
6c7b14a
Ticket Name: TDA2: EVE/VCOP internal memory usage
Query Text:
Part Number: TDA2 Hi, I'm newer in VCOP programming and I try understand how to organize pipeline for VCOP -> DMA. Could you explain or where to read information and examples about usage IbufL, IbufH. 1. For memory allocation I use vcop_malloc(<location>, <size>) function. In location for buffer I have to point A/B buffer is used for Ibuf. So for pipeline have I to allocate array for each A and B? 2. I have kernel Vcop function in k. file. For pipeline I should use next sequence : loop { 2.0 Wait end start_dma_(pointerA, toOutput); 2.1 kernel_k_func(pointerA); 2.2 start_dma_(pointerA, toOutput); 2.3 Wait end start_dma_(pointerB, toOutput); 2.4 kernel_k_func(pointerB); 2.5 start_dma_(pointerB, toOutput); } Is this sequency write? 3. Vcop compiler change automaticaly takes/releas A/B banks. And DMA use this option for transfer start, is it right? 4. If for 10 kB input data algorithm produce additional 1 MB ouput data, is there additional options to control A/B switch?
Responses:
Hi Danil, Please find the attached presentation, which might find useful. Here are the answers to your question: 1. For memory allocation I use vcop_malloc(<location>, <size>) function. In location for buffer I have to point A/B buffer is used for Ibuf. So for pipeline have I to allocate array for each A and B? No, if you implement ping/pong buffering, you don't need to allocate your array in each A or B buffer because both VCOP and EDMA support alias view. Please refer to chapter 10.5 of the EVE programmer's guide titled 'Simple Block Copy of an Image using EVE in Alias View'. There is a register called EVE_MEMMAP, which controls which mode (alias or full view) is applied to EDMA to VCOP. Please refer to 10.3 "EVE Memory Views and Buffer Ownership". The function VCOP_SET_MEM_VIEW(VIEW) should be called with VIEW=ALIAS_128K_VIEW to set that register accordingly. Also before using vcop_malloc(), call the function vcop_setview(mode) with mode=VCOP_MEMALIASED. 2. I have kernel Vcop function in k. file. For pipeline I should use next sequence : ... Please refer to example code in the same paragraph 10.5 of the programmer's guide or in the EVE software package, refer to apps\apps_nonbam\src\common\eve_algo_dma_auto_incr.c, function EVELIB_algoDMAAutoIncrConcurrent() and EVELIB_algoDMAAutoIncrSequential(). 3. Vcop compiler change automaticaly takes/releas A/B banks. And DMA use this option for transfer start, is it right? Yes, the functions VCOP_BUF_SWITCH_TOGGLE() or VCOP_BUF_SWITCH_SET() takes care of that. 4. If for 10 kB input data algorithm produce additional 1 MB ouput data, is there additional options to control A/B switch? Since image buffer A or B is only 32 KB, you only have 22 KB to store the output of your processing so you need to find a way to break your processing in smaller chunks since you have a 100x size ratio between input and output. May be process divide your 10 KB in chunks of 200 bytes. Each chunk of 200 bytes will produce 20 KB bytes which can be transferred to DDR. regards, Victor 3_Implementation of an EVE App.pdf