I want to participate in GSoC from RTEMS

Daron Chabot daron.chabot at usask.ca
Thu Mar 20 06:32:31 UTC 2008


Madhusudan C.S wrote:
> 
> 
>     
>     + The user writes an application and configures many
>     tunable parameters including the nanoseconds per
>     clock tick.
> 
>  
> Fine understood. 
> 
>     + The BSP's clock tick driver uses this to program the
>     hardware.
> 
> 
> "This program" confused me a bit. Please help me. Is it the program that 
> I have to write now or user's application??

"program the hardware" means just that, configuring a BSP's time-keeping 
hardware. This process might involve setting a counter's frequency 
and/or interrupt generation rate (i.e. the BSP's clock "tick" rate) , 
for example.

> 
>     + In RTEMS prior to 4.8, all time was based on the "clock tick".
>     When a tick interrupt occurs, the interrupt handler calls
>     rtems_clock_tick to "increment the time by the configured
>     nanoseconds per tick"
> 
>     + In 4.8 and newer, the same use of tick but now we can
>     ask the BSP for "nanoseconds since last tick" and get a
>     more accurate timestamp.  This is an optional capability
>     and RTEMS assumes 0 nanoseconds when this is not
>     available and you end up with the pre-4.8 time is only
>     accurate to a clock tick behavior.
> 
> 
> Thanks a lot I understood this part.
> 
>     + When this change was made, the internal time structure
>     was changed to struct timespec.  This is nanosecond accurate
>     but terribly inefficient to do math with.  Some RTEMS applications
>     run on space based hardware which is VERY VERY slow to
>     survive radiation.  At 10-15 Mhz (YEP!) some time operations
>     went up by ~20-30 microseconds.  Since we use this to timestamp
>     context switches, this is just flat horrible.
> 
>     + On 32-bit CPUs, Sixty-four bit math is heavier than 32-bit math
>     but it is WAY better than struct timespec math.
> 
> 
> Sorry I did not understand this part. How can you do Sixty-four bit math 
> on a 32-bit CPUs. Please guide me.

Simple. Just decompose the 64-bit word into two, 32-bit words...


-- dc



More information about the users mailing list