xenomai: integration and qualification of a real time...
TRANSCRIPT
![Page 1: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/1.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Xenomai:integration and qualification
of a real time operating systemARMadeus Systems
Gwenhael GOAVEC-MEROU
8 july 2009
G. GOAVEC-MEROU Xenomai 1 / 22
![Page 2: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/2.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Plan
1 Xenomai
2 Hardware
3 Integration of Xenomai in a Buildroot environment
4 Qualification
5 Evaluation tools
6 Conclusion
G. GOAVEC-MEROU Xenomai 2 / 22
![Page 3: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/3.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Xenomai: basics
Real time extension for Linux.Second kernel in charge of real time tasks→ Linux stays in charge of shared time applicationsKeep existing working environment and applicationsEasy port of applications to a real time environment
G. GOAVEC-MEROU Xenomai 3 / 22
![Page 4: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/4.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Xenomai: structure
AdeosXenomai
concurrent accessto hardwaresoftwarecooperative withLinuxeasy port ofapplications
rt_task
Hardware
Adeos/I−pipe
Domain B Domain A
skin
s rt_task
rt_taskprocess
user
spa
ceke
rnel
spa
ce
Linux Xenomai Nucleus
G. GOAVEC-MEROU Xenomai 4 / 22
![Page 5: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/5.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Hardware platform
APF9328 board:based on a Freescale i.MX CPUproviding an ARM9 core16 MB RAMXilinx Spartan 3 FPGA shares data,adress and control busses with theCPU
OE_nEB3_nChip_SelectHorloge
Interruption
G. GOAVEC-MEROU Xenomai 5 / 22
![Page 6: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/6.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Integration of Xenomai
No packages for Xenomai in Buildroot frameworkmanual install
Patch:
Ipipe provided by AdeosXenomai applied to Linux by prepare kernel
Configure and compile kernelCompile and install libraries in user space
Complex and time consumingAutomated install
Interaction with the kernelLibraries
Xenomai installs immediately
G. GOAVEC-MEROU Xenomai 6 / 22
![Page 7: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/7.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Presentation
Objective:monitor the performances of applications.Concept:generate signals using dedicated hardware (synthesizer) anddisplay the results on a digital storagescope.An application loads the system to disturb the periodicphenomenom
Carte APF 9328
Oscilloscope
Synthétiseurbasse fréquence
Lcd
voie1 voie2
PA.6 PA.9GPIO
G. GOAVEC-MEROU Xenomai 7 / 22
![Page 8: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/8.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Qualification: principle
Two kinds of behaviours are observed:Periodic timer handlingHardware interrupt servicing
Exemples are tested in user space and kernel space, Linux andXenomai.
G. GOAVEC-MEROU Xenomai 8 / 22
![Page 9: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/9.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Periodic timer handling: user space
Linuxdeclare a handler:sa.sa handler = isr ;sigaction (SIGVTARLM, &sa, NULL);trigger the counter:setitimer (ITIMER VIRTUAL, &timer, NULL);
Xenomaiconfigure the counter:rt task set periodic (NULL, TM NOW,SLEEP);
wait:rt task wait period (NULL);
40 ms
incertitudes
G. GOAVEC-MEROU Xenomai 9 / 22
![Page 10: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/10.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Results: periodic timer in user space
(a) Linux, 5ms/div (b) Xenomai, 20µs/div
Linux Xenomaimin ? -32max ? +74,9
G. GOAVEC-MEROU Xenomai 10 / 22
![Page 11: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/11.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Qualification: summary
Xenomai available on an ARM9 architectureBetter global performances on a weakly loaded OSBetter tolerance to loadingExpensive tools, hardly convenient and not always suitable:
2 GS/s digital storagescope ⇒ 40.000 euros.Connect GPIO outputsResults are not always usable (counter on Linux).
G. GOAVEC-MEROU Xenomai 11 / 22
![Page 12: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/12.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Evaluations tools: concept
Purpose:no additional hardwareno changes to the kernel
LCD
Principle:use the FPGAable to measure performances of several codes at a given timeusable in user space and kernel space under Linux andXenomai.
G. GOAVEC-MEROU Xenomai 12 / 22
![Page 13: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/13.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Structure
VHDL components:acquire and store mesurementsgenerate signals
kernel module:configure IPs.transfer (read) acquired data
MACROS:atomicusable in user space and kernel spacecan be disabled
G. GOAVEC-MEROU Xenomai 13 / 22
![Page 14: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/14.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
FPGA part
Multiple measurementsCompatible with data transfer on a Wishbone busUses POD
IP_xxx
logger
i2cocore00irq
G. GOAVEC-MEROU Xenomai 14 / 22
![Page 15: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/15.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
VHDL components
G. GOAVEC-MEROU Xenomai 15 / 22
![Page 16: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/16.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Measurements
Replaces the oscilloscope.Computes and stores the time differences between start and stopevents
STARTSTOPRESET
Store the current counter value
G. GOAVEC-MEROU Xenomai 16 / 22
![Page 17: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/17.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Measurements
Replaces the oscilloscope.Computes and stores the time differences between start and stopevents
STARTSTOPRESET
recover the starting valuecomparison with the current valueincrease cycle numberupdate minupdate max
G. GOAVEC-MEROU Xenomai 16 / 22
![Page 18: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/18.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Measurements
Replaces the oscilloscope.Computes and stores the time differences between start and stopevents
STARTSTOPRESET
minmaxnumber of cyclesduration of the test
G. GOAVEC-MEROU Xenomai 16 / 22
![Page 19: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/19.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Event gen
Configurable signal generatorRemplaces the dedicated hardware synthesizerInteraction with Measure and the application
G. GOAVEC-MEROU Xenomai 17 / 22
![Page 20: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/20.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Kernel module
Access:/proc/driver/dev
LOGGER GET ID
LOGGER MEMBASE
/proc/drivers/log0
attrnametype pid
measuresminmaxnb_trignb_meastotal_time
paramstriggerext_startext_stopreset
clockstartstopadd
delprescaler
G. GOAVEC-MEROU Xenomai 18 / 22
![Page 21: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/21.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
MACROS
Known and deterministic access time ⇒ memory mapped datatransfers
CREATE ALL(nom)OPEN LOGGERFPGA START(nom)FPGA STOP(nom)
. . .i n t main ( void ) {
OPEN LOGGER( ) ;CREATE ALL( foo ) ;. . .
FPGA START( foo ) ;// Code a t e s t e rFPGA STOP( foo ) ;. . .
}
G. GOAVEC-MEROU Xenomai 19 / 22
![Page 22: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/22.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Evaluation tools: summry
AutonomousSimple to useQuantitative data
oscilloscope toolmin max min max
Linux ? ? -1540 42439Xenomai -32 +74,9 -25 100
G. GOAVEC-MEROU Xenomai 20 / 22
![Page 23: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/23.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Conclusion
Xenomai Buildroot Package availableXenomai runs on APF9328.Embedded evaluation tools for quantitative analysis ofapplications and kernel modules
G. GOAVEC-MEROU Xenomai 21 / 22
![Page 24: Xenomai: integration and qualification of a real time ...2009.rmll.info/IMG/pdf/Xenomai_ARMadeus_RMLL2009.pdf · usable in user space and kernel space under Linux and Xenomai. G](https://reader034.vdocuments.us/reader034/viewer/2022052613/5f1cfc869ae0127ac5553189/html5/thumbnails/24.jpg)
Xenomai
G.GOAVEC-MEROU
Xenomai
Hardware
Integration
Qualification
Evaluationtools
Conclusion
Questions
questions ?http://www.armadeus.org
http://sourceforge.net/projects/periphondemand
G. GOAVEC-MEROU Xenomai 22 / 22