rtlinux rtfifo and tcl tk l.
Download
Skip this Video
Download Presentation
RTLINUX/RTFIFO and Tcl/Tk

Loading in 2 Seconds...

play fullscreen
1 / 18

RTLINUX/RTFIFO and Tcl/Tk - PowerPoint PPT Presentation


  • 191 Views
  • Uploaded on

RTLINUX/RTFIFO and Tcl/Tk. Nishant Upadhyaya Maung Wynn Aung Han Professor Insup Lee CIS642: Seminar in Real-time Systems University of Pennsylvania. Objectives. To develop a Real-Time Extensions for Tcl-Tk that interfaces with RT Tasks through RT-FIFO

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

PowerPoint Slideshow about 'RTLINUX/RTFIFO and Tcl/Tk' - nan


Download Now 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
rtlinux rtfifo and tcl tk

RTLINUX/RTFIFO and Tcl/Tk

Nishant Upadhyaya

Maung Wynn Aung Han

Professor Insup Lee

CIS642: Seminar in Real-time Systems

University of Pennsylvania

objectives
Objectives
  • To develop a Real-Time Extensions for Tcl-Tk that interfaces with RT Tasks through RT-FIFO
  • To exploit the power of Tcl-Tk and X-Window for fast RT application development
what is rt fifo
What is RT-FIFO?

RT-Kernel

RT-FIFO

  • RT-FIFO are located in kernel address space
  • RT-FIFO are character device interfaces acting as pipes between RT and non-RT tasks
  • Used for Inter-Process Communication (IPC)

Software level

Linux Process

RT Processes

Data

X-Window

Linux Kernel

Hardware level

Display

Disk

Devices

rt fifo contd
RT-FIFO (contd.)

RT Kernel Space

Std Linux Space

RT-FIFO

RT Task

non-RT Task

  • RT-FIFO is unidirectional by default
  • Number of FIFO is fixed and can only be changed in the RT Kernel source code

RT Task

non-RT Task

rt fifo contd5
RT-FIFO (contd.)
  • Data transfer rate is about 100MB/sec in a modern x86
  • RT-FIFO functions are non-blocking and atomic on RT side (avoids priority inversion)
  • Standard Linux processes see it as standard character device
  • They are in /dev file system and named as /dev/rtfx where x is FIFO ID integer number.
rt fifo handling api
RT-FIFO Handling API
  • rtf_create: create a new RT-FIFO
  • rtf_create_handler: to attach a data handler
  • rtf_destroy: to destroy the RT-FIFO
  • rtf_get: to read data
  • rtf_put: to write data
  • rtf_resize: to change size of RT-FIFO
difficulties
Difficulties
  • To include RT-FIFO handling functions into a user space task is inflexible
  • User space tasks usually use Tcl/Tk for rapid UI development for X-Window
  • Mixing RT-FIFO implementations and Tcl/Tk functions can be counter productive due to changes in software versions, RT task implementation details, etc.
approach for tcl tk rt extension
Approach for Tcl/Tk-RT Extension
  • It consists of a small extension to Tcl-Tk
  • The Extension can be linked to Tcl-Tk libraries dynamically using load command
  • Extension acts as a virtual IPC layer for Tcl-Tk applications
  • Takes care of how data is passed between Tcl-Tk application and Real-Time task
extension design
Extension Design

RT-Kernel

RT-FIFO

  • User space application only have to deal with Tcl/Tk

Tcl/Tk-RT Ext.

Tcl/Tk

App

RT Task

X-Window

Device

Display

tcl tk rt extension api
Tcl/Tk-RT Extension API
  • Provides a simple API for testing
    • rtf_open: Open a new RT-FIFO
    • rtf_close: Close a RT-FIFO
    • rtf_read: Read data from RT-FIFO
    • rtf_write: Write data to RT-FIFO
advantages
Advantages
  • Advantages of the approach are-
    • User space tasks are easier to develop using Tcl/Tk
    • Command Module can be loaded/unloaded dynamically
    • It allows flexibility in modification, testing, upgrading RT applications
implementation and testing
Implementation and Testing
  • Developed a small test program using Tcl/Tk that uses our extension to interface with RT Tasks
  • Test program includes a Tcl/Tk console it controls and monitors the RT Tasks
  • Two RT Tasks are created and send data, Alpha and Beta respectively, through the RT-FIFO pipes
  • The console can start, stop, monitor the RT modules and data received
program structure
Program Structure

RT-Kernel

RT-FIFO

Command Module

Tcl/Tk-RT Ext.

RT Task B

Tcl/Tk

App

RT Task A

Device

X-Window

Device

program demonstration
Program Demonstration
  • Running the demonstration program under X windows
conclusions
Conclusions
  • RT application development can be greatly enhanced by introducing RT-extension to Tcl/Tk
  • It can be further improved by introducing more sophisticated real-time services
  • Scripts can be automatically generated by using Graphical UI tools
references
References
  • www.rtlinux.com
  • www.rtlinux.org
  • www.fsmlabs.com
  • RTLinux Whitepaper (Victor Yodaiken)
  • RTLinux Manifesto (Yodaiken)
  • RTLinux FAQ (Barabanov, Yodaiken, Hilton)
  • RT Linux man pages: http://www.rtlinux.com/man_page_index.html
  • Tcl/Tk Documentation: http://dev.scriptics.com/doc/