execution time per asm instruction in MPC5744P

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

execution time per asm instruction in MPC5744P

616 Views
pedromonux
Contributor I

Hello:

we have a code in C language for the MPC5744P microcontroller, compiled with S32DS. We have checked that the code is compiled to 36 asm instructions. The system clock is configured to 200MHz (5nseg). The execution time of these 36 asm instructions is 1,2useg => 1200 clock cycles . This implies 6 cycles per asm instruction. Is this a reasonable time or should we check something in our configurations?

Tank you

Note: code used for time measurements

pastedImage_3.png

0 Kudos
2 Replies

390 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi, if you measure 1.2usec with frequency 200MHz, it gives 240 clock cycles i.e. how you said 6.6 average clock cycles.

Of course with this architecture code length is not equal to execution time (such estimation could be maybe used with some simple 8-bit MCUs but not with such complex architecture as Power Arch is with pipelining, pre-fetching, crossbar, cache and so on).

But if you mean the number as average instruction execution time of certain code portion, then it is OK.

0 Kudos

390 Views
maitesierra
Contributor II

Hi, David

 

Do you think that 6.6 cycles per instruction is too slow or is a normal ratio for this micro?

In the example code the only thing we do is to write in PWM registers. Is there any delay associated to these registers? Is there any method to accelerate the writing in peripheral registers?

Thank you

Maite

0 Kudos