Paul scherrer institut
1 / 11

Paul Scherrer Institut - PowerPoint PPT Presentation

  • Uploaded on

Damir Anicic. Paul Scherrer Institut. Embedded PREEMPT_RT Linux for IOxOS VME IOC. PSI,. 20. August 2014. Hardware - IOxOS (IFC1210) VME IOC. Presented by D. Zimoch: A new intelligent FMC/XMC/PMC carrier board / IOC for VME. Software. We will use RealTime Linux PREEMT_RT patched

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'Paul Scherrer Institut' - iona

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Paul scherrer institut

Damir Anicic

Paul Scherrer Institut

Embedded PREEMPT_RT Linux for IOxOS VME IOC



20. August 2014

Hardware ioxos ifc1210 vme ioc
Hardware - IOxOS (IFC1210) VME IOC

Presented by D. Zimoch: A new intelligent FMC/XMC/PMC carrier board / IOC for VME


  • We will use RealTime Linux

    • PREEMT_RT patched

    • XENOMAI (if PREEMPT_RT is not good enough)

Choose development kit
Choose Development Kit

  • Started with: Linux Target Image Builder (LTIB)

    • Initially sponsored by Freescale Semiconductor (

    • Now moved to Savannah project (

    • We have decided to switch to more modern development kit

  • Now using: Embedded Linux Development Kit (ELDK)

    • Provided by Denx (

    • Based on Yocto (

    • Aligned with OpenEmbedded (

Software development kit sdk and root file system
Software Development Kit (SDK) and Root File System

  • Download pre-built version

    • OK to start with

  • Better build it yourself

    • Download ELDK source (git, we use eldk5.2)

    • Configure & build it

      • Initially all SW package sources will be downloaded

      • Later full rebuilds are faster (~ hours)

      • Better do partial rebuilds (rootFS only) (~ 1/2 hour)

      • Now you have SDK and Root File System

Components required to boot linux
Components required to boot Linux

  • U-Boot, Universal Boot Loader (

  • Flat Device Tree (

    • Device Tree file from IOxOS

  • Kernel (, we use 3.2.17-rt28

  • Root File System (previous page)

  • VME and PCI-bridge drivers (PEV & IDT from IOxOS)

  • Build them using SDK (Install to TFTP/NFS server)

Booting linux on embedded system
Booting Linux on Embedded System

  • Load U-boot from internal storage (NOR/SPI/SDCARD)

    • Configure network with DHCP

    • Load FPGA firmware files (*.bit) using TFTP

    • Load Kernel and Device Tree using TFTP

  • Kernel

    • Mount rootFS over NFS

  • SysV Init

    • Mount other resources over NFS

    • Load IOxOS VME and PCI-bridge drivers (PEV & IDT)

    • Start EPICS IOC

Rt interrupt response times histogram
RT Interrupt Response Times Histogram

EPICS not running

EPICS running

User times (green) of PREEMPT_RT Linux application are acceptable

Kernel times (blue) is what could also be achieved with XENOMAI (should be even better)

Interrupt response times histogram dma in rt task
Interrupt Response Times Histogram (DMA in RT task)

  • It is expected that typical RT application reacts on 10 ms interrupts:

    • DMA read 250 KB from USR1 area

    • Calculate (void in this test)

    • DMA write 8 KB to USR1 area

    • notify EPICS

Achieved 250+ MB/s. It is fast enough for our needs.

Although it is fine with standalone RT application, we have interrupt jitter problems (2000 µs) when same runs in EPICS. We still have to investigate it.


  • PREEMPT_RT Linux is good enough for user applications

    • EPICS works

    • Interrupt response times are acceptable

    • DMA transfer rate is acceptable

  • The CPU load can be quite high when heavily loaded EPICS

  • and RT application are running on the same IOC

    • Solution: run them on two IOCs

  • We do not need XENOMAI


IFC Board Design

Timo Korhonen

Ernst Johansen

IOxOS Technologies

LLRF Project lead

Roger Kalt

Transition Module Design

Stefan Scherrer

Werner Sturzenegger

FPGA programming

Lionel Schebacher

Linux Kernel Driver

IOxOS Technologies

Linux / EPICS programming

Babak Kalantari

Damir Anicic

Dirk Zimoch

Mario Jurcevic

Special thanks to

Roger Kalt

Mario Jurcevic

for measurement results.