My device is DM6446, os is win7 32bit, ccs3.3, and my work is transport X264 encoding to c64x+ DSP.
Now I face some questions about using cache to optimize my project.
1. why I cannot put code of a function on L1DSRAM, even when I set the space of L1DSRAM as code/data in dsp/bios ( by using code_section() )
2. when the input data is on L1DSRAM, is there benefit to put the relevant function on L2SRAM ?
for example, in the function
static inline void x264_macroblock_cache_ref( x264_t *h, int x, int y, int width, int height, int i_list, int ref )
{
int dy, dx;
for( dy = 0; dy < height; dy++ )
{
for( dx = 0; dx < width; dx++ )
{
h->mb.cache.ref[i_list][X264_SCAN8_0+x+dx+8*(y+dy)] = ref;
}
}
}
mb.cache.ref[] is on the L1DSRAM, but when I put the code of this function on L2SRAM instead of the DDR SDRAM, I cannot see any improvement but a worse speed.
why? Should I simultaneity put mb.cache.ref[] on L2SRAM ?
3. Is better to use data_section() than use MEM_alloc() to put the data on the specified memory section?
PS:All the functions mentioned above are used correctly
thanks