By default when the project is created in the CCES for Cortex A5 core in ADSP-SC58x processor, the cache for both L1 and L2 space is enabled. If the user want to have only one enabled/disabled in the application this can be done by defining the following in the application:
/* To disable Cache */
uint32_t adi_cache_gEnable = 0;
/*To enable only L1 cache */
uint32_t adi_cache_gEnable = ADI_CACHE_ENABLE_L1;
/*To enable only L2 cache cache */
uint32_t adi_cache_gEnable = ADI_CACHE_ENABLE_L2;
/*To enable both L1 and L2 cache */
uint32_t adi_cache_gEnable = ADI_CACHE_ENABLE_ALL;
I can comment on the L1 Cache configuration
When the L1 cache is enabled, all the external memory access (L2 memory and DDR memory) will be cached. There is no need to program the address range for L1 cache .
Having said that, SHARC L1 Cache do have range register pairs which serves various special purposes. I would recommend you to go through the SHARC+ ADSP-SC58x Programming reference manual http://www.analog.com/media/en/dsp-documentation/processor-manuals/SC58x-2158x-prm.pdf L1 cache controller chapter for information on the various Range based register functionality.
If you have any queries on the L1 cache, please start a new thread and I would be happy to answer all the questions.
Thanks for your support, we are able to enable the L1 cache and make use of it.
We want to make use of the L2 cache. How to enable the L2 cache, and how to verify whether the L2 cache is enable or disabled?
How to configure the range of the L2 cache.?
Any information on this will be of great helpful.
Do you want to use L2 cache with SHARC+ core?
If this is the case, then you have to follow these two steps
2. From the SHARC core , program the REG_CMMR0_L2CC_START and REG_CMMR0_L2CC_END registers with appropriate memory address for which you need to the L2 cache enabled for SHARC+ core