[Tinyos-beta-commits] CVS: tinyos-1.x/beta/teps/txt tep102.txt, 1.12, 1.13

Martin Turon mturon at users.sourceforge.net
Thu Sep 1 10:56:52 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/teps/txt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19156

Modified Files:
	tep102.txt 
Log Message:
Added HPL description to Timer tep.  Ordered Counters before Alarms in HAL description.  Added self to author list.

Index: tep102.txt
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/teps/txt/tep102.txt,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** tep102.txt	27 Jul 2005 18:50:29 -0000	1.12
--- tep102.txt	1 Sep 2005 17:56:49 -0000	1.13
***************
*** 122,127 ****
  period, whichever is convenient.
  
  
! Interfaces
  ====================================================================
  
--- 122,204 ----
  period, whichever is convenient.
  
+ HPL Layer
+ ====================================================================
  
! At the lowest level, the HPLTimerC wraps all the hardware registers
! that control the hardware subsystem.  The specifics of these interfaces 
! are specific to the chip that contains the timer subsystem.  But certain
! guidelines and design paterns can be followed:
! 
!   HplTimer<width>   - get/set current time, overflow event, control, init
!   HplCompare<width> - get/set compare time, fired event,    control
!   HplCapture<width> - get/set capture time, captured event, control, config
! 
! Note that on a platform that has multiple timers of variable width, it 
! is helpful to abstract the width out of the interface at the HPL level 
! if possible.  This simplifies higher level interfaces by allowing them to
! wiring to any timer in the system trivially.
! 
! One sample set of HPL level interfaces follows:
!  
!   interface HplTimer<timer_size>
!   {
!     /// Timer value register: Direct access
!     async command timer_size get();
!     async command void       set( timer_size t );
! 
!     /// Interrupt signals
!     async event void overflow();        //<! Signalled on overflow interrupt
! 
!     /// Interrupt flag utilites: Bit level set/clr
!     async command void reset(); //<! Clear the overflow interrupt flag
!     async command void start(); //<! Enable the overflow interrupt
!     async command void stop();  //<! Turn off overflow interrupts
!     async command bool test();  //<! Did overflow interrupt occur?
!     async command bool isOn();  //<! Is overflow interrupt on?
! 
!     /// Clock initialization interface
!     async command void    off();                     //<! Turn off the clock 
!     async command void    setScale( uint8_t scale);  //<! Turn on the clock
!     async command uint8_t getScale();                //<! Get prescaler setting
!   }
! 
!   interface HplCompare<size_type>
!   {
!     /// Compare value register: Direct access
!     async command size_type get();
!     async command void      set(size_type t);
! 
!     /// Interrupt signals
!     async event void fired();           //<! Signalled on compare interrupt
! 
!     /// Interrupt flag utilites: Bit level set/clr
!     async command void reset();         //<! Clear the compare interrupt flag
!     async command void start();         //<! Enable the compare interrupt
!     async command void stop();          //<! Turn off comparee interrupts
!     async command bool test();          //<! Did compare interrupt occur?
!     async command bool isOn();          //<! Is compare interrupt on?
!   }
! 
!   interface HplCapture<size_type>
!   {
!     /// Capture value register: Direct access
!     async command size_type get();
!     async command void      set(size_type t);
! 
!     /// Interrupt signals
!     async event void captured(size_type t);  //<! Signalled on capture int
! 
!     /// Interrupt flag utilites: Bit level set/clr  
!     async command void reset();          //<! Clear the capture interrupt flag
!     async command void start();          //<! Enable the capture interrupt
!     async command void stop();           //<! Turn off capture interrupts
!     async command bool test();           //<! Did capture interrupt occur?
!     async command bool isOn();           //<! Is capture interrupt on?
! 
!     async command void setEdge(bool up); //<! True = detect rising edge
!   }
! 
! 
! HAL: Interfaces
  ====================================================================
  
***************
*** 140,146 ****
--- 217,260 ----
  
  
+ Counter
+ --------------------------------------------------------------------
+ 
+ A Counter component will increase the width of a low-level hardware timer 
+ by wrapping the overflow event and incrementing its higher order bits.
+ These higher order bits are considered extra state over the HPL register
+ layer, and therefore qualify all Counters as HAL components.
+ The Counter interface returns the current time and provides commands
+ and an event for managing overflow conditions.  These overflow
+ commands and events are necessary for properly deriving larger width
+ Counters from smaller widths.  ::
+ 
+   interface Counter<precision_tag,size_type>
+   {
+     async command size_type get();
+     async command bool isOverflowPending();
+     async command void clearOverflow();
+     async event void overflow();
+   }
+ 
+ get() 
+   return the current time.
+ 
+ isOverflowPending() 
+   return TRUE if an overflow interrupt will occur after the outermost
+   atomic block is exits.  FALSE otherwise.
+ 
+ clearOverflow() 
+   cancel the pending overflow interrupt.
+ 
+ overflow() 
+   signals that an overflow in the current time.  That is, the current
+   time has wrapped around from its maximum value to zero.
+ 
+ 
  Alarm
  --------------------------------------------------------------------
  
+ Alarm components are extensions of Counters that signal an event
+ when their Compare register detects the alarm time has been hit.
  All commands and events of the Alarm interface are asynchronous (or
  in "interrupt context").  The Alarm interface provides a set of
***************
*** 208,242 ****
  
  
- Counter
- --------------------------------------------------------------------
- 
- The Counter interface returns the current time and provides commands
- and an event for managing overflow conditions.  These overflow
- commands and events are necessary for properly deriving larger width
- Counters from smaller widths.  ::
- 
-   interface Counter<precision_tag,size_type>
-   {
-     async command size_type get();
-     async command bool isOverflowPending();
-     async command void clearOverflow();
-     async event void overflow();
-   }
- 
- get() 
-   return the current time.
- 
- isOverflowPending() 
-   return TRUE if an overflow interrupt will occur after the outermost
-   atomic block is exits.  FALSE otherwise.
- 
- clearOverflow() 
-   cancel the pending overflow interrupt.
- 
- overflow() 
-   signals that an overflow in the current time.  That is, the current
-   time has wrapped around from its maximum value to zero.
- 
- 
  LocalTime
  --------------------------------------------------------------------
--- 322,325 ----
***************
*** 327,331 ****
  
  
! Platform independent components
  ====================================================================
  
--- 410,414 ----
  
  
! HIL: Platform independent components
  ====================================================================
  
***************
*** 688,690 ****
--- 771,780 ----
  |
  | email - cssharp at eecs.berkeley.edu
+ |
+ | Martin Turon
+ | P.O. Box 8525
+ | Berkeley, CA 94707
+ |
+ | phone - +1 408 965 3355
+ | email - mturon at xbow.com
  



More information about the Tinyos-beta-commits mailing list