comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: Duration vs. Ada.Real_Time
Date: Mon, 29 Jan 2001 14:54:31 GMT
Date: 2001-01-29T14:54:31+00:00	[thread overview]
Message-ID: <954074$qpq$1@nnrp1.deja.com> (raw)
In-Reply-To: 3A72DC5E.4C1CE092@acm.org

In article <3A72DC5E.4C1CE092@acm.org>,
  Marin David Condic <mcondic.auntie.spam@acm.org> wrote:

> O.K. Pick nits. :-) I meant "frequency" but this is in a way related
> to "accuracy". If my micrometer is marked off in thousanths of an
> inch, it does me no good to try to measure ten-thousanths of an inch,
> so in manufacturing parts, I can't be any more accurate than to a
> thousanth of an inch. My micrometer may have been bounced off the
> milling machine a few times too many and may actually not be
> "accurate" in measuring a 1" dimension.

Hmmm. Now it sounds like you are talking about frequency vs.
"resolution". :-)  When you say "accuracy", I think of things like clock
drift. I'm currently dealing with networked realtime systems. Thus I've
had problems associated with both the clock frequenceies and with the
clock accuracy (clock drift between two machines that are trying to
operate in lock-step).

> Well, you do want some precision beyond the smallest unit of the
> actual clock time if you have this sort of situation. But most of the
> clocks I've seen are some version of a scaled integer, thus allowing
> Duration'Small to be whatever it wants to be as long as the LSB is
> under 20mSec. Am I incorrect in this?

GreenHills on vxWorks (x86 at least) uses a record type. The units of
the smallest field are in microseconds. Thus if the frequency divides
evenly into micros, you're OK.

However, I don't see how an Ada vendor could arrive at a good number
ahead of time. Your best bet is probably to just use some ridiculously
high resolution like Green Hills did. The frequency on vxWorks is
something that can be changed by programs on the fly. Our (Ada) system
reads the requested frequency from a configuration file and sets it at
startup. The default frequency is 60Hz. We have one system that uses the
default, one that sets it at 240Hz, and one that sets it at 1,000Hz.
With PC's getting faster all the time, I wouldn't be shocked to see
folks wanting to use multiple KHz. Microseconds might even be too coarse
by the end of the decade!

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com
http://www.deja.com/



  parent reply	other threads:[~2001-01-29 14:54 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <980495512.529981@edh3>
     [not found] ` <8mac6.9236$R5.473526@news1.frmt1.sfba.home.com>
2001-01-26 15:30   ` Duration vs. Ada.Real_Time Robert Dewar
     [not found] ` <3A71814B.7E8CCF60@acm.org>
2001-01-26 15:33   ` Robert Dewar
2001-01-26 20:58     ` Marin David Condic
2001-01-26 21:32       ` Ted Dennison
2001-01-27  5:01         ` Keith Thompson
2001-01-27 14:40           ` Marin David Condic
2001-01-27 14:34         ` Marin David Condic
2001-01-28  0:18           ` Robert Dewar
2001-01-29 14:54           ` Ted Dennison [this message]
2001-01-29 18:40             ` Marin David Condic
2001-02-08  3:32               ` Buz Cory
2001-02-08 15:34                 ` Marin David Condic
2001-02-10  3:08                   ` Steve Whalen
2001-01-28  0:13       ` Robert Dewar
2001-01-29 14:02         ` Marin David Condic
2001-01-30 14:33         ` Stephen Leake
2001-01-31 14:55           ` Marin David Condic
2001-01-31 16:03           ` Ted Dennison
2001-01-31 19:16             ` Marin David Condic
2001-01-31 20:53               ` Ted Dennison
2001-01-31 21:30                 ` tmoran
2001-01-31 21:47                 ` Marin David Condic
2001-02-01 14:18                   ` Ted Dennison
2001-01-28 19:32 ` Simon Wright
2001-01-31  6:13   ` Robert Dewar
2001-01-31 15:07     ` Marin David Condic
2001-02-01  5:43       ` Robert Dewar
2001-01-31  5:51 Christoph Grein
2001-02-01  6:27 ` Simon Wright
replies disabled

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