18
Implementation of Real-time Network Extension on Embedded Linux -Suraj Swami

Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Implementation of Real-time

Network Extension on Embedded

Linux

-Suraj Swami

Page 2: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Advanced Embedded Systems 2

• Linux Communication stack

• Embedded Linux

• PowerPC440

• Xenomai

• Rtnet

Topics Covered

Page 3: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Linux Communication stack

• Hardware

• Network Subsystem

– Network device driver

– Network protocol

– Socket

• File system

• System call interface

Advanced Embedded Systems 3

Page 4: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Linux I/O system Architecture

Advanced Embedded Systems 4

Page 5: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Network subsystem

Advanced Embedded Systems 5

Page 6: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Embedded Linux ?

Advanced Embedded Systems 6

Page 7: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

PowerPC440

• Addresses high-end embedded application.

• High performance and low power.

• Wide range of peripheral.

It contains high-performance RISC processor core, DDR SDRAM controller, PCI-X bus

interface, Ethernet interface, control for external ROM and peripherals, DMA, serial

ports, IIC interface, and general purpose I/O

Advanced Embedded Systems 7

Page 8: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Architecture

Advanced Embedded Systems 8

Page 9: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Is Linux real-time ?

How to make Linux real time ?

– Using a second kernel to schedule real-time tasks: solutions

include Xenomai/ADEOS, RTLinux and RTAI,etc.

– Improving Linux kernel itself with regards to preemption, low

latency, etc.

Embedded Systems 9

Page 10: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Setting up Boot loader and Linux Kernel

• U – Boot

• Download the uImage and startup system

• Mounting the root file system.

Embedded Systems 10

Page 11: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Xenomai

A new real-time operation system emulation framework

based on Linux.

- Implementing real-time interface

- Debugging real-time software on Linux.

- Migration of application from traditional RTOS APIs to a

Linux-based real-time environment.

Embedded Systems 11

Page 12: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Architecture of Xenomai

• Xenomai’s task is made real time using Real Time

Interface co-kernel.

• Linux kernel has lower priority.

• Possible using Adaptive Domain Environment for

Operating Systems ( Adeos ) layer.

• Sharing of hardware interrupts and system originated

events like traps and faults.

• Implemented using pipes

Advanced Embedded Systems 12

Page 13: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Architecture of Xenomai

Advanced Embedded Systems 13

Page 14: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Performance of Xenomai

• Real time thread measuring its scheduled latency over

periods of 100uS.

• Posting result on screen every 1 sec using stand Linux

services.

Advanced Embedded Systems 14

MIN MAX AVG OVERRUN

-4.226 -3.574 6.385 0

Table 1: Latency without load

MIN MAX AVG OVERRUN

-4.211 -3.521 13.935 0

Table 2: Latency with load

Page 15: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

RTnet

• Hard real-time network protocol stack for Xenomai

• Implements UDP/IP, ICMP and ARP in deterministic way

• Provides a POSIX socket API to real time user space

processes and kernel modules

• Non deterministic media is managed by the pluggable

RTmac layer

Advanced Embedded Systems 15

Page 16: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

RTnet Stack

Advanced Embedded Systems 16

Page 17: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Rtnet Testing

• Round Trip Time ( RRT)

• rtping

• Different data size

Advanced Embedded Systems 17

Table 3: RTT with RTnet

Page 18: Implementation of Real-time Network Extension on Embedded ...jmconrad/ECGR6185-2010-01...Linux Communication stack • Hardware • Network Subsystem –Network device driver –Network

Conclusion

• Xenomai and RTnet based on Embedded Linux

• Can be used to implement distributed real-time systems,

fieldbus coupling devices, low cost real time network

analyzer.

• Can optimize network performance.

Advanced Embedded Systems 18