comp.lang.ada
 help / color / mirror / Atom feed
From: "Rego, P." <pvrego@gmail.com>
Subject: Re: Raspberry Pi, Real-Time and Ada
Date: Fri, 7 Feb 2014 04:34:47 -0800 (PST)
Date: 2014-02-07T04:34:47-08:00	[thread overview]
Message-ID: <ec0c44c2-bcf8-471d-a074-8b177fb528d3@googlegroups.com> (raw)
In-Reply-To: <hewmbvd4m8b8$.jigq59474gpu$.dlg@40tude.net>

On Friday, February 7, 2014 6:42:41 AM UTC-2, Dmitry A. Kazakov wrote:
> I don't think that 10ms would be a problem even for ARM.
> On an Intel board 200µs loops (read inputs, calculate, write outputs) are
> doable.

It turns things much better. 

> Ada has everything you need for that.

That is always as good as it sound :-)

> The main problem is how good the RT clock is. Windows and VxWorks typically
> have miserable RT clock services on x86. x86 Linux has a decent one.
Ok.

> Regarding ARM Linux, I didn't tested its clock, so I cannot tell. The
> primary test is to call Ada.Real_Time.Clock twice and to compare if the
> reading is same. If they are you should look for an alternative
> implementation of. The second test is to measure how close delay 1.0 is to
> 1 second using Ada.Real_Time.Clock. The deviation from 1s tells how coarse
> OS programmable timer services are. There are OS means to attune that (on
> the performance cost).
> Once you have Ada.Real_Time.Clock it is no problem to measure the control
> loop your system does. Usually you would measure several thousands of
> cycles to get min, max and average times. If you have background services
> to run, you do measures under load (with other services) and without load.
Great. I think it will cover most of what I need to know.

> The OS latencies (in the driver etc) is a more difficult stuff. If the OS
> does not have means to measure these times (VxWorks has), you still can
> estimate these by subtracting known durations from the whole cycle time.

Do you remember how can be done on VxWorks? (it could be also good to test it on VxWorks just for curiosity). So I can try to find an alike alternative, maybe in Xenomai it is available.

> You can also use digital outputs which are considerably faster than
> analogue ones and the oscilloscope, etc. You can calibrate digital output
> times by measuring many thousands of write-cycles and taking the mean.
Ok. This will complement the tests. Great.

--
Regards,
Rego.

  reply	other threads:[~2014-02-07 12:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-06  0:53 Raspberry Pi, Real-Time and Ada Rego, P.
2014-02-06  7:50 ` Stephen Leake
2014-02-06  8:44   ` Dmitry A. Kazakov
2014-02-06 13:16     ` Simon Clubley
2014-02-06 21:12       ` Rego, P.
2014-02-07  0:26         ` Simon Clubley
2014-02-07 11:44           ` Rego, P.
2014-02-06 21:09     ` Rego, P.
2014-02-06 21:04   ` Rego, P.
2014-02-07  8:28     ` Stephen Leake
2014-02-07 12:09       ` Rego, P.
2014-02-08  8:28         ` Stephen Leake
2014-02-08  9:06           ` Dmitry A. Kazakov
2014-02-10 18:18           ` Rego, P.
2014-02-13 15:23             ` Stephen Leake
2014-02-07  8:42     ` Dmitry A. Kazakov
2014-02-07 12:34       ` Rego, P. [this message]
2014-02-07 12:59         ` Dmitry A. Kazakov
2014-02-07 13:25           ` Rego, P.
2014-02-07 23:11       ` Rego, P.
2014-02-08  8:56         ` Dmitry A. Kazakov
2014-02-10 18:29           ` Rego, P.
2014-02-10 20:38             ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox