200 likes | 297 Views
Design and realization of experiments for an embedded Linux Laboratory class. Ciaran mc Girl 4 th Electronic and Computer Engineering Project Presentation April 2008. Topics:. Brief Project Overview Real Time Systems RTAI Experiments Documented Problems Encountered Future development
E N D
Design and realization of experiments for an embedded Linux Laboratory class Ciaran mc Girl 4th Electronic and Computer Engineering Project Presentation April 2008
Topics: • Brief Project Overview • Real Time Systems • RTAI • Experiments Documented • Problems Encountered • Future development • Questions
Brief Project Overview: -Set up a workingset of real-time laboratory exercises,togetherwith proper documentation, a supportingsoftware infrastructure andsome Guidelinesfor laboratory supervisors. -Experiments vary from running a single task program to a task with a variable period.
Real-time Systems A real time system is where its application is considered to be mission critical, with a set deadline in which to be completed, if the application misses it’s deadline then it’s said to have failed Hard Real-time Systems Soft Real-time Systems
RTAI – Real Time Application Interface RTAI is not a real time operating system but instead takes priority over Linux at low level and in doing so leaves Linux as a low priority task so it cannot interrupt the RTAI.
RTAI - How It works: Consists basically of an interrupt dispatcher, mainly traps the peripherals interrupts and if necessary re-routes them to Linux; using the concept of HAL (Hardware Abstraction Layer) kernel kernel RTAI Hardware Hardware
RTAI Installation • Download a new kernel and the RTAI • Patching this kernel with the RTAI • Compile and install the kernel • Documented for student installation
Experiments Documented • Single Periodic Task • Periodic scheduling of two tasks • Variable Period Task
Single Periodic Task • Single Task using a set period • Toggles the PC speaker, emits a tone using Pulse width modulation
Single Periodic Task Contd. • Laboratory Session Developed • Initialise a task • Name a task • Remove a module
Periodic Scheduling of Two Tasks • Two tasks that run at two different periods • One task toggles the PC speaker every 100ms like the first experiment with the addition of having to decrement a variable before each toggle. • The other task runs every second and increments the variable used by the first task. • This increases the time between toggles and causes the tone to lower.
Periodic Scheduling of Two Tasks Contd. Laboratory Session Developed • Working with the original experiment, develop another task to increase the delay between the toggles (using a shared variable)
Variable period Task • Uses One-Shot mode • Task runs until completion • A delay is incremented and decremented and so the tone from the PC speaker is increased and decreased repeatedly.
Variable period Task contd. Laboratory session developed • Introduce the students to one shot mode and how the task operates. • The students must then incorporate the delay for the task to sleep.
RTAI-Lab • XRTAILAB - GUI Included with the installation of RTAI • Scilab (open source MATLAB Equivalent) with a Scicos extension. • Then RTAI-Lib extension is added to Scicos • Various other Installations including Mesa
RTAI-Lab contd. Sine Wave example
Problems Encountered • 64 bit Architecture • AMD Processor • Ubuntu Distribution of Linux • Mesa library problems
Future Development • More Documented Experiments • Remove any “teething” problems with current documented ones. • The RTAI-Lab could be used to help students with the understanding of real-time programming with the visual aid of the blocks in the system.