EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Xilinx PPC unexplainable cycle count

Started by Unknown August 21, 2006
Hello,

This is what I am experiencing:
- I need to compare to code versions regarding execution speed
- comparison is done counting cycles, using the time base registers
- the only difference in code is the following:
    #if POST_PROC_CS_UPD
      // do nothing
    #else
      update_checksum();
    #endif

When compiled with POST_PROC_CS_UPD = 1 the execution time
of this portion is shorter, however other code that should not be
affected and is executed before the above sequence is dramatically
slower.

Any ideas ?

Regards,
Ernest

eascheiber@yahoo.com wrote:
> This is what I am experiencing: > - I need to compare to code versions regarding execution speed > - comparison is done counting cycles, using the time base registers > - the only difference in code is the following: > #if POST_PROC_CS_UPD > // do nothing > #else > update_checksum(); > #endif > > When compiled with POST_PROC_CS_UPD = 1 the execution time > of this portion is shorter, however other code that should not be > affected and is executed before the above sequence is dramatically > slower.
Could be a cache effect. To see if this is true, turn off both caches and see if execution time is equal. What is dramatic (be more specific)? Alan Nishioka

The 2024 Embedded Online Conference