[Oberon] FPGA - System Clock advance

Jörg joerg.straube at iaeth.ch
Fri Mar 1 21:24:56 CET 2019


Wojtek
As I have an intenet connection I fech the current time from a timer server once a day (or once a week) and advances the clock from there. That’s quite accurate.
But feel free to add HW.
Jörg

> Am 01.03.2019 um 19:49 schrieb Skulski, Wojciech <skulski at pas.rochester.edu>:
> 
> Joerg:
> 
>  thank you for this discussion. It inspired me to add a Real Time Clock IC to my board which I am now designing. The RTC, once set, will keep time internally and it will keep working when the board is powered down. It is like finding the answer to "2 and 2" with a cell phone, is it not? No matter how complex is that math, it will just work because smart people have solved the problem.
> 
> FYI, I am modifying the RiskFive motherboard to turn it into an instrument. An RTC will be handy. Vedant has been running Oberon System on RiskFive for a while, so it is now my turn to step in and screw it up.
> 
> Thanks,
> Wojtek
> ________________________________________
> From: Oberon [oberon-bounces at lists.inf.ethz.ch] on behalf of Jörg Straube [joerg.straube at iaeth.ch]
> Sent: Friday, March 1, 2019 5:45 AM
> To: ETH Oberon and related systems
> Subject: Re: [Oberon] FPGA - System Clock advance
> 
> And look into Texts.WriteClock to learn how clock and date is supposed to be encoded in the 32 bits. You will have to adapt your DT to that as well.
> 
> In my system, I use a little bit a different clock encoding as my original routine is from the 1990s. The years 70s, 80s and 90s can not be stored with the encoding currently used in Oberon. But its still 45 years to go until you detect this issue on January 1st 2064!!😊
> 
> Jörg
> 
>> Am 01.03.2019 um 11:29 schrieb Jörg Straube <joerg.straube at iaeth.ch>:
>> 
>> The procedure DT is on the right track. Mine is a little bit more complex to be more accurate. See below.
>> 
>> The basic idea is indeed to call DT regularly. Doing it in the GC handler is one idea but has the big drawback that you have to modify/recompile Oberon.Mod
>> 
>> The GC handler is a background task. Try to make your DT an own background task. The Oberon system is a multitasking OS...
>> If you master the background task challenge you will realize that the background task is not exactly called every second but sometimes 1012 ms, sometimes 1003 or 1034 ms. Your DT should take that into account. Kernel.Time() can help there...
>> 
>> Jörg
>> 
>>> Am 01.03.2019 um 11:08 schrieb Tomas Kral <thomas.kral at email.cz>:
>>> 
>>> On Thu, 28 Feb 2019 21:54:14 +0100
>>> Jörg <joerg.straube at iaeth.ch> wrote:
>>> 
>>>> - Kernel.Time() counts the ms since last reboot.
>>>> - Kernel.Clock() stores date and time in seconds.
>>> 
>>> This would be easy, but needs refinement :-)
>>> 
>>> PROCEDURE DT; (*advance date time*)
>>> BEGIN
>>> dt := Kernel.Clock(); (*date time in secs*)
>>> INC(dt); Kernel.SetClock(dt);
>>> END DT;
>>> 
>>> PROCEDURE GC; (*garbage collect*)
>>> BEGIN DT();
>>> (*do gc*)
>>> END GC;
>>> 
>>> --
>>> Tomas Kral <thomas.kral at email.cz>
>>> --
>>> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwIGaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=B0YlJ7BfDZgK1aOsonBm46EaqujiGITw-g_Rvq7IWQc&s=kM6k53vhN6QPamqInyPVfD6cW6cNo9-xqBBEIZgzqAg&e=
>> 
>> --
>> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwIGaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=B0YlJ7BfDZgK1aOsonBm46EaqujiGITw-g_Rvq7IWQc&s=kM6k53vhN6QPamqInyPVfD6cW6cNo9-xqBBEIZgzqAg&e=
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwIGaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=B0YlJ7BfDZgK1aOsonBm46EaqujiGITw-g_Rvq7IWQc&s=kM6k53vhN6QPamqInyPVfD6cW6cNo9-xqBBEIZgzqAg&e=
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon



More information about the Oberon mailing list