Updated: septembre 20, 2011

Welcome to the MicroBlaze PREEMPT-RT Project
 
 
bar_blue.gif (315 octets)
| Motivations | Hardware Requirements | Software Requirements | Hardware Links | Software Links | Howtos | Guides | Limitations | Xilinx boards running PREEMPT-RT | Downloads |

bar_blue.gif (315 octets)

g_green_anim.gif (878 octets) Motivations

This page collects all informations on how to use PREEMPT-RT soft realtime extention with the Xilinx MicroBlaze softcore processor. We have made an effort to propose this new port. With codesign, a new difficulty appears with flexibility during codesign generation. This page proposes to give important informations specially to this important part. Our wish is that your experience on PREEMPT-RT for MicroBlaze will be successful!

This work has been done for the RTEL4I project with help of the System@TIC ICT cluster.

g_green_anim.gif (878 octets) Hardware Requirements

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

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

This is a quick and dirty tutorial:

You must have a design for MicroBlaze with MMU enabled. You must verify that you can boot a standard Linux kernel first on your board. Please follow this documentation.

Hardware requirements:

You use BSB (Base System Builder) tool from XPS. You must in your SoPC builder design add a 32-bit xps_timer timer with the 2 timers enabled (one used as clock source and one used as clock event for high resolution timer support).

You must have finally 1 xps_timer timer with its 2 timers enabled:

Software requirements:

1. Download the Linux distribution for MicroBlaze (if not):

$ cd
$ git clone git://git.xilinx.com/linux-2.6-xlnx.git
$ ln -s linux-2.6-xlnx mb-linux

We suppose now that $mb_linux is the path to the mb-linux directory.

2. Synchronize the Linux kernel version with the PREEMPT-RT patch version:

$ cd $mb_linux
$ git pull
$ git checkout -b v2.6.31 xilinx_v2.6.31

3. Apply the general PREEMPT-RT patch:

$ cd ..
$ wget http://www.kernel.org/pub/linux/kernel/projects/rt/patch-2.6.31.12-rt21.bz2
$ cd $mb_linux
$ bzcat ../patch-2.6.31.12-rt21.bz2 | patch -p

Don't worry about the following rejected files:

./Makefile.rej
./kernel/perf_counter.c.rej
./kernel/futex.c.rej
./kernel/time/clockevents.c.rej

4.  Apply the particular PREEMPT-RT patch for MicroBlaze

$ wget http://www.enseirb.fr/~kadionik/microblaze-preempt-rt/patchs/preempt-rt-2.6.31.12-rt21-microblaze-1.0-00.patch
$ patch -p1 <../preempt-rt-2.6.31.12-rt21-microblaze-1.0-00.patch

5. Configure the kernel to use the PREEMPT-RT preemption mode and download finally the image into your board.

Ready to use:

g_green_anim.gif (878 octets) Guides

g_green_anim.gif (878 octets) Limitations

This initial port gives some extra latency on file creation up to 100 ms. Is was easily detected with a dd stressing.

This port is surely perfectible. If you make improvements, you may contact us...

g_green_anim.gif (878 octets) Latency measurement

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

For stressing the system, we have used:

The realtime group scheduling must be inhibited:

# echo -1 > /proc/sys/kernel/sched_rt_runtime_us

g_green_anim.gif (878 octets) XILINX Boards tested and in use with PREEMPT-RT

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

Board Linux kernel version PREEMPT-RT version Max latency (1) MicroBlaze Frequency Contact Comments PREEMPT-RT Design
Xilinx ML403 board 2.6.31.12 2.6.31.12-rt21

min=250µs

avg=400µs

max<1500µs

100 MHz Patrice Kadionik 05/09/2010 trace From BSB tool in XPS
Xilinx ML507 board 2.6.31.12 2.6.31.12-rt21

min=250µs

avg=400µs

max<1500µs

100 MHz Patrice Kadionik   From BSB tool in XPS

g_green_anim.gif (878 octets) Downloads

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

 
th visitor since 01/05/2011