290 likes | 537 Views
Xenomai’s Porting on processor NIOS II. Professor : P. Kadionik Authors : Bassi Vincent Louati Azza Mirault Raphael Polette Simon. 2. ES Advanced Project Presentation. 19/01/09. Summary. Introduction Xenomai
E N D
Xenomai’s Porting on processor NIOS II Professor : P. Kadionik Authors : Bassi Vincent Louati Azza Mirault Raphael Polette Simon
2 ES Advanced Project Presentation 19/01/09 Summary • Introduction • Xenomai • NIOS II processor • How to • Conclusion
ES Advanced Project Presentation Introduction • Actual context • Why a FPGA ? • Why an OS ? • Why the real time?
4 ES Advanced Project Presentation 19/01/09 Summary • Introduction • Xenomai • NIOS II processor • How to • Conclusion
ES Advanced Project Presentation Xenomai (1/5 ) Xenomai, a real-time development framework cooperating with the Linux kernel: based on an abstract RTOS core usable for building any kind of real-time interfaces Low latency (maximum latency < 20 us) hard real-time support to user-space applications Xenomai simulates several APIs for existing RTOS systems, including rtai, vrtx, vxworks and POSIX real-time interface, which makes it possible to port and run existing RT application to Linux. 5 ES Advanced Project Presentation 15/09/2014
ES Advanced Project Presentation Xenomai (2/5) 6 ES Advanced Project Presentation 15/09/2014 Position of Adeos in the Xenomai architecture: • Adeos is a resource virtualization layer available as a Linux kernel patch
ES Advanced Project Presentation Xenomai (3/5) 7 ES Advanced Project Presentation 15/09/2014 What does Adeos provide to Xenomai ? • to handle all incoming interrupts first, before the Linux kernel has had the opportunity to notice them • make sure to always enforce the proper priority management for its threads, regardless of their current execution domain.
ES Advanced Project Presentation Xenomai (4/5) Xenomai implements a micro-kernel (nucleus), with real-time scheduler. Xenomai's real-time nucleus and Linux kernel are in two ADEOS domains. Xenomai runs in a higher priority domain than Linux kernel. Xenomai also implements different APIs providing real-time services, like creating real-time tasks, timers, semaphores. 8 ES Advanced Project Presentation 15/09/2014
ES Advanced Project Presentation Xenomai (5/5) 9 ES Advanced Project Presentation 15/09/2014
10 ES Advanced Project Presentation 19/01/09 Summary • Introduction • Xenomai • NIOS II processor • How to • Conclusion
ES Advanced Project Presentation Nios II softcore processor Nios II is a very high sophisticated softcore processor without MMU full 32-bit instruction 11 11 ES Advanced Project Presentation 15/09/2014
ES Advanced Project Presentation Configuring the Nios II components and structure 12 ES Advanced Project Presentation 15/09/2014
ES Advanced Project Presentation Configuring the Nios II components and structure 13 ES Advanced Project Presentations 15/09/2014
ES Advanced Project Presentation Development board 14 ES Advanced Project Presentation 15/09/2014 Ethernet JTAG Serial
ES Advanced Project Presentation UPDATE LINUX IN STARATIX 15 ES Advanced Project Presentation 15/09/2014 Update the configuration in fpga: -nios processor -device Update linux kernel in the RAM
16 ES Advanced Project Presentation 19/01/09 Summary • Introduction • Xenomai • NIOS II processor • How to • Conclusion
How to 1) Install 2) Comparison 3) Code Modification 4) Create the final patch
Install • Xenomai doesn’t exist as a source code, a vanilla kernel must be patched. • Standard kernel for an ARM and a Denx kernel for a PowerPC had been patched • Here is the method: $ scripts/prepare-kernel.sh --linux=<linux-srctree> [--adeos=<adeos-patch>] [--arch=<target-arch>]
Comparison • The effect of the patch is adding files and modifying others. • A kernel contains over 24 000 files. So a script is needed to compare those files. • The script uses the GNU tool DIFF and produces a file containing the differences. • Another method is using a graphic tool like Meld.
ES Advanced Project Presentation Meld Utilisation example
ES Advanced Project Presentation Result of comparison • The files impacted by the patch are visible at http://piou85.free.fr/xenomai/arm.html and http://piou85.free.fr/xenomai/ppc.html • 3 categories can be distinguished: • Xenomai files • Standard Kernel files • Architecture files
ES Advanced Project Presentation Code Modification • Xenomai files • Using ARM generated files (link to Xenomai source folder) • Standard Kernel files • Applying the same modifications as for an ARM • Architecture files • Using asm-nios folder provided by uCLinux • Modifications not done yet
ES Advanced Project Presentation Create the final patch • Not done yet but we recommend 3 methods • Using Meld • Using DIFF • Using Subversion (or other cvs) • The patch obtained can be applied to the uCLinux kernel 2.6 • When the kernel will be stabilized, it could be integrated in the Xenomai project (one day…)
ES Advanced Project Presentation Todo List • Modify the architecture’s files • Generate the patch • …
25 ES Advanced Project Presentation 19/01/09 Summary • Introduction • Xenomai • NIOS II processor • How to • Conclusion
ES Advanced Project Presentation Conclusion