All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Thierry Bultel <thierry.bultel@wanadoo.fr>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] iMX6 support
Date: Thu, 07 Jun 2012 19:15:04 +0200	[thread overview]
Message-ID: <4FD0E198.7000606@xenomai.org> (raw)
In-Reply-To: <4FD0DF23.2030909@wanadoo.fr>

On 06/07/2012 07:04 PM, Thierry Bultel wrote:
> Hi,
> I have another question about the iMX6,
> it is about the TSC emulation .
> 
> I have been told that the Pentium TSC could not be accurate enough
> for a one of our application that performs high precision data acquisition.
> 
> Can we expect a better accuracy with the TSC emulation based
> on the ARM timer or not ?

Xenomai tsc emulation is usually based on a hardware timer which has a
lower frequency than the core. On cortex A9 cores, we use the "global
timer". On imx6q, this timer frequency should be around 500MHz, from the
top of my head.

Anyway, if you require a precision better than the processor cycle, then
you should not use the processor to do the measurement. Because for
instance, simply reading the TSC has a latency. This latency is around
10 cycles on mx6q (I am talking about 500 MHz cycles, not processor
cycles). And at that level, you should also account for the processor
intrinsic lack of determinism, with such things as pipeline stalls. So,
you simply can not achieve a better precision than the TSC when
measuring with a processor.

> 
> Is this based on the CCNT that is cycle-accurate ?

No, it is based on the cortex a9 "global timer". I am sure we can read
this one from user-space, I am not sure we can read CCNT from user-space.

-- 
					    Gilles.


  reply	other threads:[~2012-06-07 17:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-23  9:56 [Xenomai] iMX6 support Thierry Bultel
2012-05-23 10:05 ` Gilles Chanteperdrix
2012-05-23 10:14   ` Thierry Bultel
2012-05-23 12:32     ` Gilles Chanteperdrix
2012-06-07 17:04       ` Thierry Bultel
2012-06-07 17:15         ` Gilles Chanteperdrix [this message]
2012-06-07 18:19           ` Gilles Chanteperdrix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FD0E198.7000606@xenomai.org \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=thierry.bultel@wanadoo.fr \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.