Hi all,
Sorry.. in my last mail there was a mistake.. i m sending my query again.
I am porting a codec to ADSP BF533.I am using
visualDSP++ 4.0 (december updated) and EZ-kit lite. I want to reduce
cycle count for processing each frame.Now my cache is enabled and all
code and data is placed in external memory. Now if I move my frequently
used modules from external memory to internal memory oycle count is
increasing.This is explained below:
The problem is that I have defined USECACHE macro :
#define USE_CACHE 1//not using MEM_L1_CODE_CACHE space
and cache is enabled using :
int __cplb_ctrl= CPLB_ENABLE_ICPLBS | CPLB_ENABLE_ICACHE |
CPLB_ENABLE_DCPLBS | CPLB_ENABLE_DCACHE | CPLB_ENABLE_DCACHE;
Now I have all my code mapped to SDRAM0 by the following:
program_ram
{
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS( $OBJECTS(L1_code) $LIBRARIES(L1_code))
INPUT_SECTIONS( $OBJECTS(cplb_code) $LIBRARIES(cplb_code))
INPUT_SECTIONS( $OBJECTS(cplb) $LIBRARIES(cplb))
INPUT_SECTIONS( $OBJECTS(noncache_code) $LIBRARIES
noncache_code))
INPUT_SECTIONS( $OBJECTS(program) $LIBRARIES(program))
} >MEM_SDRAM0
Now suppose I am getting X no. of cycles/frame with this configuration
___________________________________________________________________________
Now I map the frequently routines to internal memory and rest to external by the following in .ldf file:
//map critical routines to MEM_L1_CODE
program_critical
{
INPUT_SECTIONS( fft3_fx.doj(program) fft9_fx.doj(program)
basicop2.doj(program))
} >MEM_L1_CODE
//map all other to external memory
program_ram
{
INPUT_SECTION_ALIGN(4)
INPUT_SECTIONS( $OBJECTS(L1_code) $LIBRARIES(L1_code))
INPUT_SECTIONS( $OBJECTS(cplb_code) $LIBRARIES(cplb_code))
INPUT_SECTIONS( $OBJECTS(cplb) $LIBRARIES(cplb))
INPUT_SECTIONS( $OBJECTS(noncache_code) $LIBRARIES
noncache_code))
INPUT_SECTIONS( $OBJECTS(program) $LIBRARIES(program))
} >MEM_SDRAM0
If this gives Y no. of cycles then Y>X.
The cycle count should decrease when movinf routines to internal
i.e. it should be Y<X.
Can anybody tell me what could be the possible reason for this behaviour and what could be the solution.
regards
chandresh
09891020212
">http://www.dsprelated.com/groups/adsp/1.php
_____________________________________