Updated: mars 2, 2017

Welcome to the PowerPC/Xilinx Xenomai Page
bar_blue.gif (315 octets)
| Motivations | Hardware Requirements | Software Requirements | Hardware Links | Software Links | Howtos | Guides | Latency measurement | PowerPC/Virtex boards running Xenomai | Downloads |

bar_blue.gif (315 octets)

g_green_anim.gif (878 octets) Motivations

This page collects all informations on how to use Xenomai realtime extension with the PowerPC/Xilinx hardcore processor embedded into Virtex Xilinx FPGA circuit. Our wish is that your experience on Xenomai for PowerPC/Xilinx will be successful!

g_green_anim.gif (878 octets) Hardware Requirements

You need a board with a Virtex Xilinx FPGA circuit and a system (JTAG) for programming it. We suggest to use:

Be carefull because Virtex-6 and after doesn't have embedded PowerPC processor!

g_green_anim.gif (878 octets) Software Requirements

g_green_anim.gif (878 octets) Hardware Links

g_green_anim.gif (878 octets) Software Links

Main links:

Other links:

g_green_anim.gif (878 octets) Howtos

Hardware requirements:

You need to have a hardware design that can run Linux. You can use use BSB (Base System Builder) tool from XPS for building it or use reference designs given below. No extra HW is necessary for Xenomai support because Xenomai port uses PowerPC internal HW.

Software requirements:

1. Recover Linux for PowerPC/Xilinx. Synchronize with git branch xilinx_v2.6.35:

$ cd
$ mkdir powerpc-linux
$ cd powerpc-linux
$ git clone git://git.xilinx.com/linux-2.6-xlnx.git
$ mv linux-2.6-xlnx linux
$ cd linux
$ git checkout -b 2.6.35 xilinx_v2.6.35

2. Recover the vanilla Linux kernel:

$ cd
$ wget ftp://ftp.free.fr/pub/linux/kernel/v2.6/linux-
$ tar -xvjf linux- 
3. Recover Xenomai:
$ cd
$ cd powerpc-linux
$ wget http://download.gna.org/xenomai/stable/xenomai-2.5.6.tar.bz2
$ tar -xvjf xenomai-2.5.6.tar.bz2 
$ ln -s xenomai-2.5.6 xenomai

4. Pick up 2 files from the vanilla Linux kernel and replace the right files into the PowerPC/Xilinx Linux directory for being able to apply the I-pipe and Xenomai patchs:

$ cd
$ cd powerpc-linux
$ cd linux 
$ cp ~/linux- arch/powerpc/kernel/fpu.S 
$ cp ~/linux- arch/powerpc/kernel/time.c

5. Apply the I-pipe and Xenomai patchs:
$ cd
$ cd powerpc-linux
$ cd xenomai
$ export xenomai_root=`pwd`
$ export linux_tree=../linux
$ ./scripts/prepare-kernel.sh --arch=powerpc \
     --adeos=$xenomai_root/ksrc/arch/powerpc/patches/adeos-ipipe- \
patching file arch/powerpc/Kconfig
patching file arch/powerpc/boot/Makefile
patching file arch/powerpc/include/asm/exception-64s.h
patching file arch/powerpc/include/asm/ftrace.h
patching file arch/powerpc/include/asm/hw_irq.h
patching file arch/powerpc/include/asm/ipipe.h
patching file arch/powerpc/include/asm/ipipe_base.h

6. Configuring the Linux kernel for using I-pipe and Xenomai (juste type return...), for example for the ML403 board:

$ cd
$ cd powerpc-linux
$ cd linux
$ make ARCH=powerpc CROSS_COMPILE=ppc_4xx- 40x/virtex4_defconfig
$ make ARCH=powerpc CROSS_COMPILE=ppc_4xx- zImage

7. Program the HW design and download into the Xilinx board the Linux kernel. That's all!

8. If you want to use the Xenomai tools, you must put them into the RAM file system. If the root file system is under /mydirectory/ramdisk/root_fs:

$ cd
$ cd powerpc-linux
$ cd xenomai
$ export root_fs=/mydirectory/ramdisk/root_fs
$ ./configure -host=powerpc-unknown-linux-gnu \
	CC=ppc_4xx-gcc AR=ppc_4xx-ar LD=ppc_4xx-ld
$ make -k install DESTDIR=$root_fs
$ cd $root_fs
$ cd ..
$ su
# dd if=/dev/zero of=initrd.img bs=1M count=16
# mke2fs -F -v -m0 initrd.img
# mount -o loop initrd.img /mnt/
# cp -rf  root_fs/*  /mnt/
# umount /mnt
# gzip -9 initrd.img
# mv initrd.img.gz ramdisk.image.gz
# exit
$ cp -i ramdisk.image.gz ~/powerpc-linux/linux/arch/powerpc/boot/

g_green_anim.gif (878 octets) Guides

g_green_anim.gif (878 octets) Latency measurement

Latency can be measured with tools provided by Xenomai through cross compilation. The principe is to generate a periodic thread and measures difference between the effectiv period and the theorical period that defines latency.

For stressing the system, we have used:

g_green_anim.gif (878 octets) PowerPC/Virtex Boards tested and in use with Xenomai

For measuring latencies, boards are stressed by stress tool (# stress -c 50 -i 50 &) and ping flooding (# ping -f @IP).

Board Linux kernel version Xenomai version Max latency (1) Max latency (2) Max latency (3) Max latency (4) Contact Comments PowerPC Frequency Xenomai Design
Xilinx ML403 board 2.6.35 2.5.6 113 µs 36 µs 91 µs 107 µs Patrice Kadionik 03/22/2011 trace 300 MHz From BSB tool in XPS
Xilinx ML507 board 2.6.35 2.5.6 51 µs 17 µs 33 µs 47 µs Patrice Kadionik 03/22/2011 trace 400 MHz From Xilinx reference design
Avnet V5FX30T board 2.6.35 2.5.6 56 µs 17 µs 37 µs 54 µs Patrice Kadionik 03/22/2011 trace 400 MHz From Avnet reference design

g_green_anim.gif (878 octets) Downloads

The following Xilinx SoPC designs for Xenomai are given as an example without any guaranty and AS IS. You must purchase Xilinx tools for regenerating files for programming your Xilinx FPGA of your board.

th visitor since 22/03/2011