ABB Template

© ABB Group - 1 13-Jul-17
Anders Rönnholm
Evaluation of Real-Time
Operating Systems for
Xilinx MicroBlaze CPU
© ABB Group - 2 13-Jul-17
Overview

Background

Problem description

Real-time system characteristics

Overview of target system

Overview of evaluated kernels

Evaluation

Results

Conclusions
© ABB Group - 3 13-Jul-17
Background

System-on-Chip
- The whole system on one chip

FPGA
- A chip containing programmable logic cells.
Reprogrammable.

Embedded systems
- Special purpose systems incapsulated in the device it
controls.

ABB - CRC
20 persons working with mechatronics
5 of them with SoC solutions
© ABB Group - 4 13-Jul-17
Problem Description

Areas using embedded systems are:
Airbags, pacemakers, MP3 players and industrial robots.

Evaluated kernels
-uClinux, Xilkernel, Asterix

Evaluation
- Interrupt latency
- Task response time
- Priority inversion
- Kernel size (footprint)
- Scalability
© ABB Group - 5 13-Jul-17
Real-time system characteristics

Real-time systems are systems that must respond to an
event within a given deadline.

Characteristics
- Determinism
- Responsiveness
- User control
- Reliability
- Fail-soft operation
Target system
© ABB Group - 6 13-Jul-17
Xilinx Virtex4 XC4VFX12

200,000 Logic Cells. m68000 60,000 large

Support for 8 MicroBlaze

Many Additional components
- Hardware barrel shifter
- Hardware divider
- Instruction and data cache
- Memory interfaces
Target system cont.

Xilinx EDK
- IDE
- Debugger
© ABB Group - 7 13-Jul-17
Benchmark design

DDR-RAM

Uart

2 Timers (system clock, interrupt generator)

16kB instruction and data cache
© ABB Group - 8 13-Jul-17
MicroBlaze

Soft CPU
- Implemented using the hardware logic in the FPGA

32-bit RISC core

32 general purpose registers

5 special purpose registers

Bus interfaces
- On-chip Peripheral Bus
- Local Memory Bus
- Fast Simplex Link Bus
- Debug Interface
© ABB Group - 9 13-Jul-17
uClinux

Port of Linux 2.0 , 2.4 and 2.6
- Only 2.4 ported to MicroBlaze

Not RTOS, kernel not preemptive

Kernel package and Distribution package

Kernel package contains the kernel

Dist package contains:
- Applications, libraries, drivers

Needs to be compiled in a Linux Environment.

Downloaded with Xilinx tool.
© ABB Group - 10 13-Jul-17
Xilkernel

Developed by Xilinx. Shipped and highly integrated into
EDK.

Signal, Message queue, semaphore communication.

Applications can be created as separate executables.

Compiled and downloaded inside EDK.
© ABB Group - 11 13-Jul-17
Asterix

Developed at MRTC

Periodic / aperiodic tasks

Signals / semaphores and wait&lock free communication

Monitoring support: Deterministic replay and
deterministic testing.
© ABB Group - 12 13-Jul-17
Asterix Port

16-bit h8/300 CISC -> 32-bit MicroBlaze RISC

4 external interrupts -> 1 external interrups
- Interrupt controller

HAL – Assembler

3 - 4 weeks of work
Test System

Board Configuration
MicroBlaze 100 MHz
64MB DDR-RAM

Timer 100 Hz

5,000,000 interrupts
(13.8h)
Applications Applications Applications
Asterix
uClinux
MicroBlaze
© ABB Group - 13 13-Jul-17
Virtex4
Xilkernel
© ABB Group - 14 13-Jul-17
Evaluation

Benchmarks
- Interrupt latency
- Task response time

Priority inversion

Scalability

Kernel size (footprint)
Result – Benchmark and Footprint
Footprints
Benchmark results
Benchmark footprint
80000
2000
70000
1800
60000
1600
1400
1200
Interrupt latency
40000
Task response time
30000
kB
cc
50000
Benchmark footprint
1000
800
600
20000
400
10000
200
0
0
© ABB Group - 15 13-Jul-17
uClinux
Xilkernel
Asterix
uClinux
Xilkernel
Asterix
© ABB Group - 16 13-Jul-17
Result - Priority inversion

uClinux
No support without patch

Xilkernel
Priority inheritance

Asterix
Immediate inheritance
© ABB Group - 17 13-Jul-17
Result - Scalability

uClinux
Only scalable on the operating system. Network support,
filesystems, sound

Xilkernel
Support for pthread, semaphore, mutex, stack size.

Asterix
Support for semaphore, signal, stack size.
© ABB Group - 18 13-Jul-17
Conclusions

Asterix the best kernel if memory is very limited
otherwise Xilkernel.

uClinux can be used as a real-time system in a design
that is not memory limited and does not need fast
response times.

Xilkernel easiest to work with.