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: border1.nntp.dca.giganews.com!nntp.giganews.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Raspberry Pi, Real-Time and Ada Date: Fri, 7 Feb 2014 09:42:41 +0100 Organization: cbb software GmbH Message-ID: References: <5e8fad3a-94e6-4517-af54-db8b4146803e@googlegroups.com> <858uto3cj3.fsf@stephe-leake.org> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: I5Na6+WsEzT8WoegI0VZTA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:184697 Date: 2014-02-07T09:42:41+01:00 List-Id: On Thu, 6 Feb 2014 13:04:19 -0800 (PST), Rego, P. wrote: >> Using the general definition, if your application has deadlines with >> tolerances on the order of 0.1 seconds, then the answer is clearly >> "yes". > Very slow, but based on what? I don't think that 10ms would be a problem even for ARM. On an Intel board 200µs loops (read inputs, calculate, write outputs) are doable. >> For tighter tolerances, you'd have to measure the actual performance, >> and possibly use an enhanced kernel as you discussed. > Measuring could be excelent. Do you know some tools that I could use for > measuring the RPi performance? Ada has everything you need for that. The main problem is how good the RT clock is. Windows and VxWorks typically have miserable RT clock services on x86. x86 Linux has a decent one. Regarding ARM Linux, I didn't tested its clock, so I cannot tell. The primary test is to call Ada.Real_Time.Clock twice and to compare if the reading is same. If they are you should look for an alternative implementation of. The second test is to measure how close delay 1.0 is to 1 second using Ada.Real_Time.Clock. The deviation from 1s tells how coarse OS programmable timer services are. There are OS means to attune that (on the performance cost). Once you have Ada.Real_Time.Clock it is no problem to measure the control loop your system does. Usually you would measure several thousands of cycles to get min, max and average times. If you have background services to run, you do measures under load (with other services) and without load. The OS latencies (in the driver etc) is a more difficult stuff. If the OS does not have means to measure these times (VxWorks has), you still can estimate these by subtracting known durations from the whole cycle time. You can also use digital outputs which are considerably faster than analogue ones and the oscilloscope, etc. You can calibrate digital output times by measuring many thousands of write-cycles and taking the mean. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de