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.

AM5716: about Perfomance Unit

Part Number: AM5716

I have a question about the performance unit in the PDK (hereafter path) provided by your company.
c:\ti\pdk_am57xx_1_0_9\packages\ti\csl\arch\a15\v1\performance_unit.asm

I am trying to incorporate a program that constantly measures program performance using this function into a product.

Do you have any concerns about performance degradation, program hangs, or inability to sleep due to using this function?

  • Hi,

    Apologies for delay in response.
    As such, I don't see any concerns in using these function.

    Can you please share more details on how you are using these functions in your code?

    Regards,
    Parth

  • Hi,Parth

    Thank you for answering.

    You answered, "There is no concern about using this function." Is it correct to understand that the microcomputer enters the power saving mode even in the Enable state?

     

    To explain how to use the code,

    Here is our implementation.

     

    1.Setup Function

    static void ARM_CCNT_Reset ( void )

    {

        __asm__ __volatile__ (

        "   mrc p15, #0, r0, c9, c12, #0    @Read Performance Monitor Control Register  \n"

        "   orr r0, r0, #0x000000000D       @PMCCNTR counts once every 64 clock cycles  \n"

        "   mcr p15, #0, r0, c9, c12, #0    @Reset Cycle count register                 \n"

        "   mov r1, #0x80000000                                                         \n"

        "   mcr p15, #0, r1, c9, c12, #1    @Enable the cycle count                     \n"

        );

    }

     

    2.Measure Function

    static uint32_t ARM_CCNT_Read ( void )

    {

        uint32_t    timeVal;

        __asm__ __volatile__ (

        "   MRC p15, 0, %0, c9, c13, 0  \n": "=r"(timeVal)

        );

        return timeVal;

    }

     

    void sample_func(void){

       uint32_t time1,time2;

       time1 = ARM_CCNT_Read();

       test_funcA();

      time2 = ARM_CCNT_Read();

      printf(“funcA time = %d”,time2-time1);

    }

  • Hi,

    You answered, "There is no concern about using this function." Is it correct to understand that the microcomputer enters the power saving mode even in the Enable state?

    I am not exactly getting this query, can you please elaborate?

    Regards,
    Parth

  • Hi Parth,

    Customer will use peroformacne measurement function in their application and their application enters power saving mode, is there any concern ?  

    For example, performance measurement does not work correctly? or

    performacne measurement function prevents customer's application from entering power saving mode etc. ?

    Customer would like to know the side effect when using peroformacne measurement function. 

    if you need more information, please let me know.

    Thank you.

  • Hi,

    There should not be any issue in entering the power saving mode with this. Need to confirm if there is any effect on PMU counters in power saving mode. I am looping in our SoC experts here to confirm this.

    Regards,
    Parth

  • Tetsuro-san,

    Can you explain exactly what you mean by power saving mode?  The function you're pointing to is just c-code...it will perform exactly like any other function running on the ARM core.

    Thanks,

    Kyle

  • n exa

    Hi Kyle,

    I confirmed with customer. It is power saving mode is the status when CpuIdleTest() is called.

    Is this information enough for you?

    Thank you.

  • Hello,

    It should work as expected.

    Regards,

    Kyle