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 state verification



Hello friends

i really need a quick answer :P

I'm using DSP c674.

we're working on optimization and trying to search also the cach-SRAM area.

is there a way beside jtag to verify :L2CFG,L1CFG for example?

what's written in my cfg file is as follows:

Cache.initSize.l1pSize = Cache.L1Size_32K;
Cache.initSize.l1dSize = Cache.L1Size_32K;
Cache.initSize.l2Size = Cache.L2Size_128K;

what's the better way to improve performance? enlarging the cache ,right? by squizzing  the SRAM

Thank you!!

  • Hi Elad,

    Thanks for your post.

    May be, you shall try issuing the appropriate CSL commands to configure the L1P, L1D & L2 cache size and can be enabled in the program code as follows:

    CACHE_L1pSetSize();

    CACHE_L1dSetSize();

    CACHE_L2SetSize();

    You have privilege to control whether the external memory addresses are cacheable (being stored in L1D or L2 cache) or non-cacheable through Memory attribute register (MAR) bits (0 = noncacheable, 1 = cacheable). The memory attribute registers are documented in TMS320C674x DSP Megamodule Reference Guide (SPRUFK5). You shall enable caching for the external memory through CSL function CACHE_enableCaching. For more details. please refer Section 2.3 in the c674x cache user guide doc. as mentioned below:

    Yes, you are right, if you increase the L2 Cache size, the memory will be taken from higher memory addresses which is SRAM. May be, you shall check all possible cache configurations for C674x devices with 2048K bytes of L2 memory in Figure 2-1 of Section 2.3 in the c674x DSP cache user guide as given below:

    http://www.ti.com/lit/ug/sprug82a/sprug82a.pdf

    Also, please check sections 2.1 & 2.2 for configuring L1 & L2 Caches and also some examples 2-1 & 2-2 in the above doc.

    Please check Section 3 for optimizing the cache performance in the above doc. and you will get a better idea on the same.

    Thanks & Regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------

  •  

    Hey Sivaraj

    thank you for your reply.

    If i may ask one more question i'm trying to figure:

    I have the "C674_App.cfg" file which there i wrote down,

    Cache.initSize.l1pSize = Cache.L1Size_32K;
    Cache.initSize.l1dSize = Cache.L1Size_32K;
    Cache.initSize.l2Size = Cache.L2Size_256K;

    and it seems to work well.

    well I have one more file : Plarform.xdc

    which there is written:

    l1DMode:"32k",
    l1PMode:"32k",
    l2Mode:"0",

     

    when I’m trying to change in the Platform file the l2mode a big mess popping in my system.

    can u elaborate for me what is the difference, don't I want l2mode to be 256k cache size?

    why is it working well without the change in the platform file , and once i change l2mode to 256k or 128k

    problems happened?

     

    Thanks in advance!

     

    Elad

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

  • Hi Elad,

    Thanks for your update.

    If you have a customized platform other than ti, XDC tools won't recognize your new platform unless you create a new platform  package by the means of RTSC tools. Please check whether the platform you use is listed in the repository folder as '~:/ti/xdctools/packages/ti/platforms'

    Reg. l2 mode value in platform.xdc file, you have to choose valid values as specified in the device documentation.

    If you have more question on the same, please post your question in TI-RTOS forum so that, you would be better answered there.

    Thanks & regards,

    Sivaraj K

    ------------------------------------------------------------------------------------------------------- 
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------