We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 59177

Zynq TTC: Resolution calculations


I am attempting to benchmark my application in Linux on Zynq but I always see a runtime of 0 for my application. 

Why does this happen?


For very simple applications (for example "Hello World"), the entire runtime lifespan of the application may be below the minimum resolution of the Zynq TTC (the primary system timer for Zynq Linux). 

As shown in the diagram below, the triple timer counter is clocked by CPU_1x.

Consider the CPU_1x clock running at 111MHz. 
As per Zynq TRM this value can be between 2-65536 (it must be a power of 2).

By default, the cadence ttc module sets this pre-scaler value at 2048. 
After pre-scaling, the clock to the 16-bit counter is 111/2048=54.199KHz
This implies that the counter counts up to 54199 values in one second.

That is each count increase happens at approximately 18us.

The counter is 16bit (0xFFFF=65535).

So, it actually takes 1.209 seconds to count up to 0xFFFF. 

Changing the pre-scaler value is the responsibility of the user.

Please note that at higher resolutions, Linux might miss the time wraps and therefore affect the timing of the entire system. 
AR# 59177
Date 09/17/2014
Status Active
Type General Article
  • Zynq-7000
Page Bookmarked