Xenomai’s Porting on processor NIOS II
description
Transcript of Xenomai’s Porting on processor NIOS II
Xenomai’s Porting on processor NIOS II
Professor : P. KadionikAuthors : Bassi Vincent Louati Azza Mirault Raphael Polette Simon
Summary
•Introduction
•Xenomai
•NIOS II processor
•How to
•Conclusion
19/01/09ES Advanced Project Presentation
2
19/01/09ES Advanced Project Presentation
Introduction
•Actual context
•Why a FPGA ?
•Why an OS ?
•Why the real time?
Summary
•Introduction
•Xenomai
•NIOS II processor
•How to
•Conclusion
19/01/09ES Advanced Project Presentation
4
19/01/09ES 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.
21/04/23ES Advanced Project Presentation
5
19/01/09ES Advanced Project Presentation
Xenomai (2/5)
21/04/23ES Advanced Project Presentation
6
Position of Adeos in the Xenomai architecture:
• Adeos is a resource virtualization layer available as a Linux kernel patch
19/01/09ES Advanced Project Presentation
Xenomai (3/5)
21/04/23ES Advanced Project Presentation
7
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.
19/01/09ES 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.
21/04/23ES Advanced Project Presentation
8
19/01/09ES Advanced Project Presentation
Xenomai (5/5)
21/04/23ES Advanced Project Presentation
9
Summary
•Introduction
•Xenomai
•NIOS II processor
•How to
•Conclusion
19/01/09ES Advanced Project Presentation
10
19/01/09ES Advanced Project Presentation
21/04/23ES Advanced Project Presentation
11
Nios II softcore processor
• Nios II is a very high sophisticated softcore processor without MMU
• full 32-bit instruction
11
19/01/09ES Advanced Project Presentation
Configuring the Nios II components and structure
21/04/23ES Advanced Project Presentation
12
19/01/09ES Advanced Project Presentation
Configuring the Nios II components and structure
21/04/23ES Advanced Project Presentations
13
19/01/09ES Advanced Project Presentation
Development board
21/04/23ES Advanced Project Presentation
14
Serial
JTAG
Ethernet
19/01/09ES Advanced Project Presentation
UPDATE LINUX IN STARATIX
21/04/23ES Advanced Project Presentation
15
Update the configuration in fpga:-nios processor-device
Update linux kernel in the RAM
Summary
•Introduction
•Xenomai
•NIOS II processor
•How to
•Conclusion
19/01/09ES Advanced Project Presentation
16
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.
19/01/09ES Advanced Project Presentation
Meld Utilisation example
19/01/09ES Advanced Project Presentation
Result of comparison
•The files impacted by the patch are visible at http://piou85.free.fr/xenomai/arm.html andhttp://piou85.free.fr/xenomai/ppc.html
•3 categories can be distinguished:▫Xenomai files▫Standard Kernel files▫Architecture files
19/01/09ES 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
19/01/09ES 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…)
19/01/09ES Advanced Project Presentation
Todo List
•Modify the architecture’s files•Generate the patch•…
Summary
•Introduction
•Xenomai
•NIOS II processor
•How to
•Conclusion
19/01/09ES Advanced Project Presentation
25
19/01/09ES Advanced Project Presentation
Conclusion