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.

Using L1 as SRAM

Other Parts Discussed in Thread: TMS320C6474

Hello,

I want to use some of L1D as SRAM to store some data in C6474 .. as well as using 16KBytes of it as Cache .. in the program start i set it as the following :

CACHE_setL1dSize((CACHE_L1Size)CACHE_L1_16KCACHE);

In the CMD file i tell the compiler to put my data into L1D :

.cData         : > L1DSRAM

The memory of my system looks like :

MEMORY{

  L1DSRAM     : o = 0x00F04000, l = 0x00003FFF

  L1PSRAM     : o = 0x00E04000, l = 0x00003FFF

  L2SRAM      : o = 0x10800000, l = 0x00100000

  DDR         : o = 0x80000000, l = 0x08000000 

}

When i execute the program, my variable starts at the address 0x00F04000, but contrains other data than it should contain .. the only possible reason is that Cache is using that same region .. how to know which 16 KBytes of L1D the Cache is using ?

Thanks

  • Hi Mounir,

    you can find this information in the datasheet of the TMS320C6474.

    L1P SRAM starts 0x00E00000 and L1D SRAM at 0x00F00000

    Kind regards,

    one and zero

     

     

  • Mounir,

    The following is from the 6474 Data Sheet.  Cache will always be in the higher portion of memory.  So, for a 50/50 split, yout SRAM will be 0x00F00000-0x00F03FFF and your cache will be 0x00F04000-0x00F07FFFF.

    So, you're right.  You should update your Linker Command file to put the SRAM in the right location.  It is currently in a location configured as Cache.

     

    Regards,

    Dan