AnsweredAssumed Answered

cache

Question asked by zhang yanming on Nov 29, 2018
Latest reply on Dec 3, 2018 by Yuri Muhin

Lately, i use i.MX RT1052 to develpe a product, i use cache to improve performance.But when i use the speed_test() function to test the cache performance,the code is executed in ITCM,i find that when i enable D-cache with the adram (0x80000000,2MB)memory default configuration cacheable/WT(no WA),the speed is the faster than i disable the cache.According to my understanding,WT is a write updates both the cache and the external memory system,enable and disable the cache does not affect data access speed,so why?when i enable the D-cache,i configure the adram (0x80000000,2MB)memory cache/WB(no WA),i find the cache/WT(no WA) and cache/WB(no WA) speed is same.so why? 

 

uint32_t AudioInData = 0;
void speed_test(void)
{
      uint32_t i = 0 , j = 0;
      for(i=0;i<30000;i++)
      {
            for(j=0;j<30000;j++)
            {
                  AudioInData += 0xA5A5;
            }
      }
}

,

Outcomes