[Tinyos-devel] Time Sync Requirements

Michael Newman mnewman at dragonnorth.com
Wed Dec 19 18:01:45 PST 2007


I don't think there is a real cost in memory.

Matt correctly makes the point that relative time is the only time of
interest. TOS_Msg tagging should be in relative time with no need for 8
bytes. I would log and report time since boot and maintain knowledge of the
offset from boot time to 64 bit GMT. Total extra bytes of RAM is the cost of
storing this offset (2 or 4 bytes)

I want the programmer to think about time in very fine granularity. The
interfaces should be defined with very fine granularity. The implementation
can manage time with knowledge of the internal implementation and need not
store all the bits on platforms that do not care.

I return to my original example. To get time sync with the best possible
accuracy you need to be able to log a time stamp to an accuracy of about 1
symbol time.

-----Original Message-----
From: tinyos-devel-bounces at millennium.berkeley.edu
[mailto:tinyos-devel-bounces at millennium.berkeley.edu] On Behalf Of Matt
Welsh
Sent: Wednesday, December 19, 2007 6:16 PM
To: David Gay
Cc: TinyOS Development
Subject: Re: [Tinyos-devel] Time Sync Requirements

Apart from this we need to be very mindful of memory requirements for  
storing values of that size. I don't want every TOS_Msg to be tagged  
with an extraneous 8 bytes that I'm not going to use.

Further, there are few reasons to believe that a mote-class device  
needs to track time (of any granularity, nanosecond or otherwise) with  
a 64-bit "dynamic range". Most of the time we only care about relative  
time, not absolute time, at least on the mote level: a base station  
can readily map relative times back to their absolute representations.

64 bits of nanoseconds is more than 584 years. Once we have sensor  
networks with deployments approaching that duration then I'll be the  
first to put this proposal back on the table.




On Dec 19, 2007, at 6:05 PM, David Gay wrote:

> On Dec 19, 2007 2:53 PM, Michael Newman <mnewman at dragonnorth.com>  
> wrote:
>> I think a 64
>> bit representation can be good enough to handle all of the  
>> interesting cases
>> including date/time and sub-nanosecond time counting. Note that  
>> there are
>> two types of time represented by 64 bit numbers, elapsed time and  
>> date/time.
>> Elapsed times can be added to date/times. Elapsed times might be  
>> logged in
>> smaller sized datums if they happen to fit. Date/times can not be  
>> shrunk
>> without adding complexity.
>
> There's a practical problem: msp430-gcc's 64-bit support is reportedly
> broken(*). Until someone in the TinyOS community (or outside...)
> actually decides to spend the time to fix this, 64-bit types in TinyOS
> will be impractical.
>
> David Gay
> *: Yes, this is regrettable and all that. But regrets don't fix
> compiler bugs or magically make alternative compilers
> available/affordable.
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel

_______________________________________________
Tinyos-devel mailing list
Tinyos-devel at millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel



More information about the Tinyos-devel mailing list