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.

DM6437: What sections to put in local memory

ALL of my sections are in external (DDR2) memory. 

Are there any sections that I should move to local memory (L1 or L2?) to get better performance?

I am using DSP/BIOS and have a multi-threaded application.  Should something from BIOS be hosted in local memory? 

Is there a document that gives this level of guidance?

Thanks,

-- B

  • Bandeg said:
    Are there any sections that I should move to local memory (L1 or L2?) to get better performance?

    This is sort of system specific, but in general the answer would be 'as many as possible' along with 'those that get the most accesses'. If your system permits you would probably want to start by placing the .bss (global variables) and .stack (local variables) into the internal memory. The default compiler sections and their descriptions are given in section 7.1.1 of SPRU187 to help you to choose what other sections you may or may not want to put in internal memory. You may also want to map some of your most commonly used code and perhaps larger data structures into a custom section using pragmas (discussed in section 6.8 of SPRU187) that you can place into internal memory.

    Bandeg said:
    Should something from BIOS be hosted in local memory? 

    The interrupt sections are probably best placed in internal memory to decrease their latency, though this is also system specific, much of the BIOS code/data is initialization and can be external.

    Bandeg said:
    Is there a document that gives this level of guidance?

    The SPRU187 document mentioned above gives some good detail on what memory sections are which should give you some idea of what should go where, though I do not know of a document that gives specific suggestions in regards to memory mapping. One resource I can suggest would be the C6000 DSP Optimization Workshop, this workshop has a couple of chapters that discuss this topic specifically.