<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The issue at hand is that RTEMS does need the capability<br>
to give as accurate as possible time stamps at the API<br>
level. Given that we are lean and mean, we don't waste<br>
precision -- if it is available at the bottom of the software,<br>
the user is going to get portable access to it.<br>
<br>
Some background for Madhusudan.<br>
<br>
+ Unlike GNU/Linux. Most RTEMS users have their own<br>
unique hardware platforms and provide their own device<br>
drivers. Each Board Support Package (BSP) includes a<br>
clock tick device driver. This is the source of all time<br>
information in RTEMS.</blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
+ The user writes an application and configures many<br>
tunable parameters including the nanoseconds per<br>
clock tick.</blockquote><div> </div><div>Fine understood. <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">+ The BSP's clock tick driver uses this to program the<br>
hardware.</blockquote><div><br>"This program" confused me a bit. Please help me. Is it the program that I have to write now or user's application??<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
+ In RTEMS prior to 4.8, all time was based on the "clock tick".<br>
When a tick interrupt occurs, the interrupt handler calls<br>
rtems_clock_tick to "increment the time by the configured<br>
nanoseconds per tick"<br>
<br>
+ In 4.8 and newer, the same use of tick but now we can<br>
ask the BSP for "nanoseconds since last tick" and get a<br>
more accurate timestamp. This is an optional capability<br>
and RTEMS assumes 0 nanoseconds when this is not<br>
available and you end up with the pre-4.8 time is only<br>
accurate to a clock tick behavior.<br>
</blockquote><div><br>Thanks a lot I understood this part. <br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">+ When this change was made, the internal time structure<br>
was changed to struct timespec. This is nanosecond accurate<br>
but terribly inefficient to do math with. Some RTEMS applications<br>
run on space based hardware which is VERY VERY slow to<br>
survive radiation. At 10-15 Mhz (YEP!) some time operations<br>
went up by ~20-30 microseconds. Since we use this to timestamp<br>
context switches, this is just flat horrible.<br>
<br>
+ On 32-bit CPUs, Sixty-four bit math is heavier than 32-bit math<br>
but it is WAY better than struct timespec math.<br>
</blockquote><div><br>Sorry I did not understand this part. How can you do Sixty-four bit math on a 32-bit CPUs. Please guide me.<br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Right now, we just declare struct timespecs in the supercore<br>
to hold time. In retrospect, this was a bad decision and not<br>
in keeping with the rest of RTEMS. We usually add "classes"<br>
and provide very opaque routines to deal with things. So<br>
this is adding a new class and cleaning up things to use it.<br>
</blockquote><div><br>Ok I roughly understood what you are trying to explain me in theory. I still donno how it can be implemented in the code. I hope that is the whole part of this project for GSoC, planning and designing how to do it and accomplishing it through code.<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">There are 18 files in the supercore which reference<br>
struct timespec. RTEMS has only 1 function per file.<br>
A few of those are .h files.<br>
</blockquote><div><br>Yeah I saw most of the files. Thanks a lot for giving me the pointers, otherwise I would have spent a lot of time searching these files. <br> <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
This is not a huge project -- but it is a critical one.<br>
I really want to see this happen and will help you<br>
write up a proposal.<br>
<br>
FWIW this is important enough that I was tempted to<br>
start it when I updated the description for SOC.<br>
It is a critical item.</blockquote><div> </div><div>I hope I can make this project happen this summer. I want to be a part of RTEMS from now onwards(I think I am already and I hope community would accept this), not just this summer or during GSoC duration. Please help me get going guys.<br>
</div></div><br clear="all"><br>-- <br>Thanks and regards,<br> Madhusudan.C.S<br><br>