hi all, i need transfer data between SDRAM and L2 to speedding my program. as we know that we need call function CACHE_wbInvL2 before we call EDMA functions. but when i call CACHE_wbInvL2 as this CACHE_wbInvL2((void*)PixBuffer1, 0x0000ca80, CACHE_WAIT); i get a mistake from compiler: error: identifier "CACHE_WAIT" is undefined. my dsp is dm642 of ti. and the head file that i include in my project is: #include <csl.h> #include <csl_emifa.h> #include <csl_gpio.h> #include <csl_irq.h> #include <csl_chip.h> #include <csl_dat.h> lib file include in my project is: cslDM642.lib, dsp64x.lib, rts6400.lib, img64x.lib
A question about data transfer between SDRAM and L2
Started by ●April 21, 2008
Reply by ●April 21, 20082008-04-21
If you have structured the memory access patterns correctly there should be no need to call some function to "pre-load the L2 cache". For processing large data sets getting the memory access patterns correct is vital for good performance, it is by far the most important optimization. Sadly modern compilers and programming languages wash their hands of it. Anyway, if you have not read Agner Fogs information about the matter you should: http://www.agner.org/ I presume you are a c or c++ programmer. You should look into doing some assembly language. It is the best way to understand how the processor actually works and hence how to optimize well.
Reply by ●April 21, 20082008-04-21
Having said that, Agner Fog is extremely grumpy. I sent him an e-mail once and his response was curt and rude. This is written on his web site: "Please don't mail me with your programming problems. Your mail will not be answered" I guess he can have whatever personality he likes as long does good work. But that means he must do good work. We all get old you know.
Reply by ●April 24, 20082008-04-24
rbmm756@gmail.com wrote:> hi all, > i need transfer data between SDRAM and L2 to speedding my program. > as we know that we need call function CACHE_wbInvL2 before we call > EDMA functions. > > but when i call CACHE_wbInvL2 as this > CACHE_wbInvL2((void*)PixBuffer1, 0x0000ca80, CACHE_WAIT); > i get a mistake from compiler: > error: identifier "CACHE_WAIT" is undefined. > > my dsp is dm642 of ti. and the head file that i include in my > project is: > #include <csl.h> > #include <csl_emifa.h> > #include <csl_gpio.h> > #include <csl_irq.h> > #include <csl_chip.h> > #include <csl_dat.h> > > lib file include in my project is: > cslDM642.lib, dsp64x.lib, rts6400.lib, img64x.libTry including csl_cache.h.