This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cache 问题



各位专家:


       我之前把数据放在ddr中,1024点fft需要40万个周期,后来放在L2中,只需要10000左右的周期。但是还有其他的数据较大,只能放在ddr中,那请问怎么才能cache到  ddr里面的数据呢?还是数据自动cache到L1D里面呢?能不能详细解释一下cache的工作原理!期待您的答复!谢谢!

  • 你是在什么什么环境下测试的?在emulator下测试有没有初始化好DDR?如果存放的DDR数据段enable cache,则数据会在访问后自动load到cache中,不需要软件load,但是由于最开始的时候地址没有映射到cache中,所以第一次的耗时会大,所以建议测试多次求平均得到一个cycle。关于cache原理参考文档:http://www.ti.com/litv/pdf/sprugy8

  • 谢谢Andy Yin1!我是在开发板上运行的。您的意思是第一次是从ddr里面读的,以后就是cache里面,但是cache总共就那么大,数据量大于cache怎么办呢?还有ddr数据段怎么enable cache呢?是调用cache_enable()函数么?十分感谢!