Skip to main content

Function execution runtime and periodicity - Community / Test Automation - Lauterbach Support

1

Function execution runtime and periodicity Awaiting Agent

Hi, I need to find a way to monitor the function execution runtime and periodicity over a period of time.
I am using T32 version 2025.02, and my target is tc36x.
I am trying the use BMC to handle this task, let me list here what I can do now and what I am missing.
I am able to get the average execution time and average periodicity using the cmm files I am attaching, (based on the demo provided in the T32 folder)
first of all, let me get a confirmation from you regarding the execution time calculated in the attached cmm scripts, the execution time is calculated depending on this ratio (Time/X), the Time here I believe it is coming from the number of clocks used to run the function and the target frequency, and X is the number of the Alpha counter, So, my concern is:
what if the function execution interrupted (I am not talking about callees functions), will the clock counter be smart not to increment until function execution resumes?

Now, I need to use the snooper to collect the timing of these clocks and counter changes for post processing to be able to monitor the runtime and periodicity over a specific period.
I am assigning the Alpha event to "OTGSC0" counter and Beta event to "OTGSC1" counter.
here is the list of comamnds I am using:
Trace.METHOD SNOOPer
SNOOPer.Mode BMC
SNOOPer.CONFIG.Changes ON
SNOOPer.Arm

SNOOPer.OFF
SNOOPer.List
SNOOPer.List CLOCKS.FORE TIme.FORE OTGSC0 OTGSC1 ICNT FOTGSC0 FOTGSC1 FICNT

I am attaching the output of both snooper.list commands.
as you can see the OTGSC1 is not updated at all.

I was planning to calculate the periodicity through accumulate the timing between 2 "OTGSC0" increments, and this is doable with the collected data.
for the execution time, I was planning to calculate the time between the "OTGSC0" and "OTGSC1" changes but since the "OTGSC1" is not available, I am not able to do that.

So, would you please let me what I am missing here or the way I am trying to use is not supported by trace32?

Comments (3)

Ahmed Abdelgaber
Hi Support team, any update? Thanks,
Jihene Ben Saidi
Dear Ahmed, Thank you for reaching out. When using BMC ATOB mode, the execution time is calculated as the number of clock cycles between the function entry and exit. If the function execution is interrupted, this time is also included in the measurement. To analyze such cases in more detail, you would need to perform a nesting analysis using trace to see the interrupt context. This requires an emulation device that supports trace functionality. Unfortunately, the current TC3x device you are using does not provide this capability. Regarding your second question about the SNOOPER.List window and the OTGSC1 not being updated: I am currently investigating this issue and will provide you with an update as soon as possible, either here in the community or by creating a new ticket for you. As a side note, please note that the snooper method is based on sampling. This means it may miss certain increments, and therefore the measured values might not be fully accurate. Best Regards, Jihene
Ahmed Abdelgaber
Thanks Jihene for your support, I will wait for the conclusion of the second point related to the OTGSC1 not being updated in the SNOOPER.List window.

Add a comment

ID-0
To prove you are a human, please tell us the text you see in the CAPTCHA image