[Tinyos Core WG] TEP102 and binary vs decimal units

Jan Hauer jan.hauer at gmail.com
Wed May 23 03:11:24 PDT 2007


Even if the default metrics are binary the TEP should give an option
for decimal units, i.e. it should define the decimal types. As
mentioned before the 802.15.4 uses decimal metric and in beacon-mode
there are tight timing constraints - we should allow  platforms that
have  sufficiently accurate clocks to share such code.

Jan


On 5/22/07, David Gay <dgay42 at gmail.com> wrote:
> On 5/22/07, Philip Levis <pal at cs.stanford.edu> wrote:
> > On May 22, 2007, at 10:03 AM, Cory Sharp wrote:
> >
> > > On 5/21/07, Philip Levis <pal at cs.stanford.edu> wrote:
> > > On Mon, 2007-05-21 at 16:05, David Gay wrote:
> > > > I'm finally getting to some final revisions for TEP 102, and the
> > > only
> > > > real open issue is the "binary vs decimal" milli and micro second
> > > one.
> > > > There's been a bunch of discussion on this, but I'm not clear we
> > > > really reached consensus. Two options:
> > > >
> > > > - Leave the current TEP 102 more or less as is, i.e., our units are
> > > > defined as 1/1024s, 1/32768s and 1/1048576s (TMilli, T32khz, TMicro)
> > > >
> > > > - Switch to the correspondiong decimal units (1/1000s, 1/32000s,
> > > 1/1000000s)
> > > >
> > > > In practice, no implementations need change, as there's verbiage
> > > about
> > > > accuracy being loose.
> > > >
> > > > FWIW, on mica platforms the actual units (w/o drift or temperature
> > > > effects) are 1/1024s, 1/28800s and 7.37/8000000s. On telos, I
> > > believe
> > > > it's 1/1024s, 1/32768s and 1/1000000s.
> > > >
> > > > If nobody answers this week, I'll switch TEP102 to the decimal
> > > units.
> > >
> > > The consensus was to stick with the binary units, with the
> > > understanding
> > > that additional types could always be added for decimal units when/if
> > > needed.
> > >
> > > Phil
> > >
> > > I thought we switched to decimal units with the understanding that
> > > there could be a reasonable inaccuracy in the unit, since there
> > > will be in practice, anyway.  Essentially: if our error bars are
> > > huge, we may as well pick a standard unit instead of making one up.
> >
> > Is a 2% inaccuracy common? If not, then we should convert the calls
> > to a best effort attempt at accuracy. I think it's disingenuous to
> > say "they're decimal" but then give such a weak claim on accuracy
> > that we make them binary. Doing this requires more bookkeeping of
> > partial ticks, though, due to a need to keep timers in phase (e.g.,
> > the simple (1000/1024) breaks if you ask for a periodic of 111ms and
> > a periodic of 999ms).
>
> I don't think TEP102-style timers should ever do that kind of
> bookkeeping, for precisely the reasons you listed in that other e-mail
> - the base timer level should be straightforward and low-overhead, at
> the expense of accuracy.
>
> David
> _______________________________________________
> Tinyos-2.0wg mailing list
> Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
>


More information about the Tinyos-2.0wg mailing list