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.

SK-AM64B: Processing Time Measurement Method

Part Number: SK-AM64B

Tool/software:

Hello TI team!

I will investigate SK-AM64B CORE to CORE dispatch time and task to task dispatch time.
I will use the IPC notify evcho application.
Please let me know how to measure it.

Environment:
  CCS12.7.0
  AM64x MCU+ SDK 09.02.01
  SK-AM64B

I believe ClockP_getTimeUsec() can be used within the same CORE.
Q1: Is ClockP_getTimeUsec() the elapsed time since the CPU reset?

Q2. How do you measure the difference time between COREs?
  t1 = RCV0-1 - SND0-0
  t2 = RCV0-0 - RCV0-1

Q3 If return value of ClockP_getTimeUsec() returns the elapsed time since CPU reset
 I think it is possible to measure the time by calculating the difference time based on the first RESET CORE.
 Since I think I know the timing of CPU reset for SBL OSPI multipartition, I think I can calculate the difference time between COREs.

 For SBL OSPI, I do not know the CPU reset timing. Please tell me how to measure it.

Q4.In case of Linux, cpu occupancy can be checked with the top command.
 In case of MCU+SDK, how can I measure cpu occupancy?

Regards,
Yoshiki Koide

  • Hello Yoshiki,

    Is ClockP_getTimeUsec() the elapsed time since the CPU reset?

    Yes you are correct. Have you experimented this?

    Allow me sometime to comment on your other questions.

    Regards,

    Vaibhav

  • Hello Vaibhav,


    Just what I suspected.
    Thank you.
    Regards,
    Yoshiki

  • Hi,

    Q4.In case of Linux, cpu occupancy can be checked with the top command.
     In case of MCU+SDK, how can I measure cpu occupancy?

    To address this there is a recently created FAQ: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1392509/faq-how-to-profile-cpu-usage-with-mcu-sdk

    Regards,

    Vaibhav

  • Hello Vaibhav,

    As always, thank you!!!! I will check it out.

    Regards,
    Yoshiki

  • Hello,

    Q2. How do you measure the difference time between COREs?
      t1 = RCV0-1 - SND0-0
      t2 = RCV0-0 - RCV0-1

    Q3 If return value of ClockP_getTimeUsec() returns the elapsed time since CPU reset

    I have discussed this internally and the logic can be as follows.

    So lets say there are two cores on which NOTIFY has been used to make sure operations are synced between the two cores.

    On this note, you can try to perform the following:

    Core 1 application:

    Note timestamp here t1 = lets say 1 s

    NOTIFY call

    Note timestamp here t2 = lets say 10 s

    Core 2 application:

    Note timestamp here t3 = lets say 4 s

    NOTIFY call

    So the time taken would be simply, t2 - t3 = 10 - 4 = 6 seconds.

    Let me know if this makes sense.

    Regards,

    Vaibhav

  • Hello Vaibhav,

    I have plotted t2 - t3. Is my understanding correct?

  • Hi Yoshiki,

    The expert is currently out of office for a week. Responses to this thread will be delayed.

    Thanks for your patience.

    Regards,

    Tushar

  • Hello Tushar,

    Thank you for contacting us.

    Regards,

    Yoshiki

  • I have plotted t2 - t3. Is my understanding correct?

    Yes the understanding is correct. You can proceed with it. Let me know in case of any other doubts.

  • Thank you, Kumar.

    I used the IPC notify evcho application to measure the processing time.
    I believe the time returned by ClockP_getTimeUsec() is incorrect.
    I believe that the time retrieved by the A53 core and the time retrieved by the R5F core are incorrect.

    I would like to post the processing times here.

    Regards,

    Yoshiki

  • Hello,

    I believe that the time retrieved by the A53 core and the time retrieved by the R5F core are incorrect.

    I would like to post the processing times here.

    Can you post the timings here?

    Do you see inconsistent values?

    Regards,

    Vaibhav

  • Hello Kumar.
    Sorry I'm late.

    PROT 1017-1.

    This chart assumes that the pon time is simultaneous.
    I don't think they are exactly simultaneous.

    1017-Q1.

      Can I find out the blank time?
      How long does it take for the blank time?

      A53==>R5F communication interval
        The communication interval for A53 was approximately 30 usec.
        R5F also had a communication interval of about 30 usec.

        I am not sure about the communication interval of A53 ==> R5F. Maybe it is about 15 usec.

    Below is a detailed explanation.
    My IPC notify echo project has a main core of A53.

    TABLE. ClockP_getTimeUsec

    PROT 1017-1."t2 - t3 = 10 - 4 = 6"
      Using this formula, it is 114511(usec).
      A53=>R5F communication interval of 114511 (usec) is incorrect.

      A53=>R5F Communication Interval:
        echo3(t3) ==> echo2(t2)      114511(usec)

      A53=>A53 Communication Interval:.
        echo2(t2) ==> echo4(t4)    29(usec)
        29/2 = 14.5(usec)          A53=>R5F communication interval

    TABLE. ClockP_getTimeUsec "sync"
      The completion time of SyncAll() for R5F is 129062 (usec).
      The completion time of SyncAll() for A53 is 18816 (usec).

      If SyncAll() completes at the same time for both A53 and R5F, then the time returned by ClockP_getTimeUsec() is not correct.

    1017-Q2.
      If the time returned by ClockP_getTimeUsec() is correct, then IpcNotify_SyncAll() in R5F should complete before A53.
      A53=>R5F notification latency is 4273usec.
      TABLE. ClockP_getTimeUsec "sync ==> t1"

     R5F SyncAll() => A53 SyncAll() => A53 sendMsg() => R5F echo1
        The first IpcNotify_sendMsg() “t0” in A53 is executed immediately after SyncAll().
         A53 IpcNotify_sendMsg() is delayed because SyncAll() completes later than R5F.
         In R5F, after SyncAll, wait for reception.
         The receive latency is 4273 usec.

      Probably the first R5F application was launched after the SBL was completed.
      Then, after about 4000usec, I believe the A53 application was launched.
      Is this conjecture correct?

    1017-Q3.
      What is the order in which applications are launched?
      OSPI Boot Loader:                 R5F 0-0 => R5F 0-1 => R5F 1-0 => R5F 1-1 => M4F 0-0 => A53 0-0 => A53 0-1 ?
      OSPI multi-partition boot loader: R5F 0-0 => R5F 0-1 => R5F 1-0 => R5F 1-1 => M4F 0-0 => A53 0-0 => A53 0-1 ?

    Regards,
    Yoshiki

  • Hello Yoshiki,

    Thanks for your patience.

    This thread has been assigned to the correct expert.

    Please expect responses in few business days.

    Regards,

    Vaibhav

  • Hi Yoshiki,

      Can I find out the blank time?
      How long does it take for the blank time?

    Apologies for the delay here. You can use the GTC timer to get the processing time.

    Please refer GTC API for details.

      What is the order in which applications are launched?

    You can refer to the SBL example to see this flow. 

    for OSPI = M4F0-0 ->  R5F1-0 -> R5F1-1 -> A530-0 -> A530-1 -> R5F0-0 -> R5F0-1.

    For OSPI-Multipart = R5F1-0 -> R5F1-1 -> M4F0-0 -> A530-0 -> R5F0-0 -> R5F0-1

    Regards,

    Tushar