Xenomai’s Porting on processor NIOS II

26
Xenomai’s Porting on processor NIOS II Professor : P. Kadionik Authors : Bassi Vincent Louati Azza Mirault Raphael

description

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 - PowerPoint PPT Presentation

Transcript of Xenomai’s Porting on processor NIOS II

Page 1: 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

Page 2: Xenomai’s Porting on processor NIOS II

Summary

•Introduction

•Xenomai

•NIOS II processor

•How to

•Conclusion

19/01/09ES Advanced Project Presentation

2

Page 3: Xenomai’s Porting on processor NIOS II

19/01/09ES Advanced Project Presentation

Introduction

•Actual context

•Why a FPGA ?

•Why an OS ?

•Why the real time?

Page 4: Xenomai’s Porting on processor NIOS II

Summary

•Introduction

•Xenomai

•NIOS II processor

•How to

•Conclusion

19/01/09ES Advanced Project Presentation

4

Page 5: Xenomai’s Porting on processor NIOS II

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

Page 6: Xenomai’s Porting on processor NIOS II

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

Page 7: Xenomai’s Porting on processor NIOS II

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.

Page 8: Xenomai’s Porting on processor NIOS II

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

Page 9: Xenomai’s Porting on processor NIOS II

19/01/09ES Advanced Project Presentation

Xenomai (5/5)

21/04/23ES Advanced Project Presentation

9

Page 10: Xenomai’s Porting on processor NIOS II

Summary

•Introduction

•Xenomai

•NIOS II processor

•How to

•Conclusion

19/01/09ES Advanced Project Presentation

10

Page 11: Xenomai’s Porting on processor NIOS II

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

Page 12: Xenomai’s Porting on processor NIOS II

19/01/09ES Advanced Project Presentation

Configuring the Nios II components and structure

21/04/23ES Advanced Project Presentation

12

Page 13: Xenomai’s Porting on processor NIOS II

19/01/09ES Advanced Project Presentation

Configuring the Nios II components and structure

21/04/23ES Advanced Project Presentations

13

Page 14: Xenomai’s Porting on processor NIOS II

19/01/09ES Advanced Project Presentation

Development board

21/04/23ES Advanced Project Presentation

14

Serial

JTAG

Ethernet

Page 15: Xenomai’s Porting on processor NIOS II

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

Page 16: Xenomai’s Porting on processor NIOS II

Summary

•Introduction

•Xenomai

•NIOS II processor

•How to

•Conclusion

19/01/09ES Advanced Project Presentation

16

Page 17: Xenomai’s Porting on processor NIOS II

How to

1) Install

2) Comparison

3) Code Modification

4) Create the final patch

Page 18: Xenomai’s Porting on processor NIOS II

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>]

Page 19: Xenomai’s Porting on processor NIOS II

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.

Page 20: Xenomai’s Porting on processor NIOS II

19/01/09ES Advanced Project Presentation

Meld Utilisation example

Page 21: Xenomai’s Porting on processor NIOS II

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

Page 22: Xenomai’s Porting on processor NIOS II

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

Page 23: Xenomai’s Porting on processor NIOS II

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…)

Page 24: Xenomai’s Porting on processor NIOS II

19/01/09ES Advanced Project Presentation

Todo List

•Modify the architecture’s files•Generate the patch•…

Page 25: Xenomai’s Porting on processor NIOS II

Summary

•Introduction

•Xenomai

•NIOS II processor

•How to

•Conclusion

19/01/09ES Advanced Project Presentation

25

Page 26: Xenomai’s Porting on processor NIOS II

19/01/09ES Advanced Project Presentation

Conclusion