Benchmarking IPCF Timing Options M7

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Benchmarking IPCF Timing Options M7

跳至解决方案
2,171 次查看
kawin
Contributor III

Hi there,

I want to benchmark IPCF shared memory communication and wonder what timing options are available in M7 bare metal application. The M7 firmware will be started via U-Boot which already initializes the clock. Can you give some advice on how to best benchmark something like this in software?

  • What timer drivers API should I be looking into?
  • How to get system tick and system clock freq?
  • I'm following NXP IPCF example for A53 Linux and M7 bare metal app

Thanks

0 项奖励
1 解答
2,084 次查看
bpe
NXP Employee
NXP Employee

What time granularity do you expect? The STM module could provide the shortest
time duration step of about 7.5ns (If the reference
clock of the STM is 133MHz and the module clock divider is 1). In free running
mode, the duration from 0x0000_0000 to 0xFFFF_FFFF will be more than 30s. If
that matches your requirements, I would like to suggest
using any STM available to provide the timing ticks.

To reduce the time consumption of the code, you can simply enable any STM in
free running mode and take that STM counter as timestamp source.
Then both A53 or M7 can read the same counter in any time with the
simplest bare metal code.

Hope this helps,
Platon

 

在原帖中查看解决方案

0 项奖励
3 回复数
2,153 次查看
bpe
NXP Employee
NXP Employee


If you want to measure various routines execution time, the recommended approach
is to use S32 Development Studio Tracing and Analysis tool. This GUI tool utilizes
the processor internal performance counters and other dedicated HW not visible
to the user. See S32 Design Studio Tracing and Analysis User Guide for details.

Best Regards,
Platon

 

 

0 项奖励
2,147 次查看
kawin
Contributor III

One of the metrics that I'm interested in is the one-way interrupt latency between Linux A53 app and M7 firmware. This is how I think something like this can be measured:

  1. Output timestamp start before A53 write the first byte
  2. Output timestamp end when the RX interrupt routine of M7 is triggered

Can I get some guidance on the what clock to use to synchronize the time between A53 and M7 applications?

Thank you

0 项奖励
2,085 次查看
bpe
NXP Employee
NXP Employee

What time granularity do you expect? The STM module could provide the shortest
time duration step of about 7.5ns (If the reference
clock of the STM is 133MHz and the module clock divider is 1). In free running
mode, the duration from 0x0000_0000 to 0xFFFF_FFFF will be more than 30s. If
that matches your requirements, I would like to suggest
using any STM available to provide the timing ticks.

To reduce the time consumption of the code, you can simply enable any STM in
free running mode and take that STM counter as timestamp source.
Then both A53 or M7 can read the same counter in any time with the
simplest bare metal code.

Hope this helps,
Platon

 

0 项奖励