From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: silly ravenscar question Date: Tue, 3 Mar 2015 11:57:28 +0100 Organization: cbb software GmbH Message-ID: References: <8e30f54c-81c4-4861-897c-bb6c563c76e8@googlegroups.com> <14r7a7x3kyv4t.13luzs6ukxqiq$.dlg@40tude.net> <647ebb7f-61fd-4e36-b047-3207ea789807@googlegroups.com> <1p3tujcfe2x5b$.njfp7g1kpm79$.dlg@40tude.net> <4d288aff-66c7-49d8-8ffd-8fc80e9355c5@googlegroups.com> <12b6815b-a38a-4a11-b9ae-dddd2811e500@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: OpkKbm9QwHUq0Y4SxjI2mw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:25085 Date: 2015-03-03T11:57:28+01:00 List-Id: On Tue, 3 Mar 2015 00:42:51 -0800 (PST), jan.de.kruyf@gmail.com wrote: > On Sunday, March 1, 2015 at 11:28:01 AM UTC+2, Dmitry A. Kazakov wrote: > >> And from the software perspective, the idea that you could enforce >> real-time/synchronicity per real-time protocol is flawed. More complex the >> software running on top of the protocol less chances you have to keep >> synchronicity up to the application level because you need time to >> propagate the signal though levels of hardware and software. > > Yes again. So in my humble opinion the sums for synching and the > return-packet-sending must be done, as the incoming packet leaves the dma > channel. It is not the issue. You cannot hard sync anything complex enough to be useful. > So to sum up: > To me there are broadly 3 alternatives > > 1. a sync pulse broadcast every scan period, which triggers the data > reading etc. This might then be refined with some averaging circuitry to > create a stable local clock to do the actual triggering. > Then for each station the master must keep track of the offset from the master. > > 2. Synchronize a whole subnet to itself. this is very attractive since > with a good algorithm the individual boards will track one-another quite > perfectly and dead terminals give no real problem. ( If you can imagine a > flock of birds making a turn: each bird only sees what the nearest > neighbors do and reacts accordingly) > against: > The master still needs to keep track of the offset from real time for that > net. > (So there will be only 1 offset per subnet) And there is possibly more > network traffic involved, since all exchanges between neighbors must > happen over 1 net. > > 3. IEEE1588: > Time is imposed top-down. It works very accurately if implemented properly > in a small net. Everybody knows real time. > Against: > As the net grows jitter and inaccuracies get bigger. Switchboxes need to > be preferably IEEE1588 enabled in bigger networks. > And as with all top-down structures, collapses will be quite spectacular. > > So this is what I have dreamed up so far. > Please comment as you see fit. There is no reason why not to support IEEE1588 if available and, when not available, not to use other means to estimate clock differences. It is not a big problem to use both in the same network and even between same nodes weighting the result according to QoS. The protocol should not synchronize or trigger anything. The latter is an application-level issue. The former is impossible for described above reasons and is not required anyway. If you can schedule actions ahead of the time and know clock differences, that is the best real-time possible. Since you will never get latencies shorter than the board can switch contexts anyway. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de