Quantcast
Channel: Processors
Viewing all articles
Browse latest Browse all 123829

Forum Post: C6678 multicores printf running time

$
0
0

Hi, everyone,

  In my project,  i have a question.

  There are several cores in my project, The core 0(master core) controls the other slave cores. In the master core, I measure the slave core's running time. If there is a printf or system_printf function in the slave core, the running time i measured is about 60ms, If not, the running time is about 0.02ms!! Why?

  But if i measre the printf or system_printf function running time in the slave core, the time is about 0.02ms.

 In the maser core:

     uwStartTime = TimestampProvider_get32();

     MessageQ_put();

    MessageQ_get();

    ulEndTime = TimestampProvider_get32();

    printf(" time is %.2f.\n", (double)(ulEndTime - ulStartTime) / 1000 / 1000);

In the slave core:

     MessageQ_get();

    //ulStartTime = TimestampProvider_get64_my();
    System_printf("This is a time test  in core %d.\n", DNUM); // or printf
    //ulEndTime = TimestampProvider_get64_my();
    //System_printf("time is %.2f.\n", (double)(ulEndTime - ulStartTime) / 1000 / 1000);

    MessageQ_put();

Thanks,

Qbliu,


Viewing all articles
Browse latest Browse all 123829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>