InitRech 2015/2016, sujet 30

De Wiki de Projets IMA

Summary

When we use an embedded control system, we want to handle how long each functions, in our program, takes. The real-time concept was created to carry out a deterministic code and use computer science for highly critical systems. Indeed, these systems must handle different constraints such as multi-periodicity or deadlines. A real time operating system is able to match this abstract concept with computing language. In this articles, the authors talk about how they simplify the development process for real time programs with multi-rates operations. Based on C and Lustre languages, they realized an ADL (Architecture Design Language) which provides a high-level abstraction. The study was motivated by an application for planes called FAS.

First, authors compared different existing works and they noticed that most real-time APIs use threads scheduled by the OS. The main threads’ drawback is data-dependencies which obligate to implement functions to order consumption and production of data to keep the program predictable. It means a long process of development. With languages more abstracted, development was easier and more reliable. The synchronous approach which abstract real-time in logical time provides a formal way to code and is optimized in mono-periodic systems but not in multi-periodic systems. Then, authors kept this approach and the language use synchronous data-flows, to get infinite input and output values and reasoning in instants. It means inputs’ treatment cannot start while all inputs are not available. To handle multi-rate correctly, synchronous model provide a common real time tag and a strictly periodic clock to define the flow’s belonging of an instant and the real time rate of a flow.

The language is a set of equation grouped in imported nodes. It is able to implement real-time constraint and allow communication between nodes of different rates thanks to the special clock. In addition, the language’s strength is the ability to let the programmer free to decide how multi-rates operations communicate. It is possible to combine these operations to get a new pattern of communication. Finally, the compiler realizes three important analyses: type-checking, causality-check and clock calculus (to check if two flows are synchronous). It means, in a successful case, that the program is deterministic and it can be translated un C code. Then, imported nodes are translated in tasks, and communications between tasks is allowed thanks to a buffer allocated in a global memory.

To conclude, the ADL done can handle multiple deadline and periodicity constraints. In that way, the language brings a precise description of multi-rate. Moreover, the translation by the compiler transcodes the high-level abstract program in a reliable and portable program. The purpose in the future would be to develop the compiler and it will translate more precisely the code.

Main Contribution

The development of the ADL was focused on the description of multi rates operations. It brings an important level of abstraction and allow a simple communication between components. Moreover, using synchronous semantics, authors abstract the real-time scale in a logical-time scale in that way, programmers can forget dates and make reacted the system with instants. To extend the synchronous model in mutli-rate, authors use the flow system and considering that each process has its proper rate, locally. Once assembled, they define a common reference which provide an information on the amount of time elapsed. This amount, called tag, is used to define a special clock, called strictly periodic clock. Its features are the period and the phase t0 and it defines the rate of a flow. In addition, this clock can be modified by different operations. The coding way is close to Lustre except that the multi-rate interaction is optimized and allow programmers, with the library, to define his proper pattern of communication and optimized their code. To confirm their study, authors develop a program for the flight application software and code it in a few number of lines.

Applications

The zero risk does not exist, however respecting some rules we can avoid terrible mistakes. In this article, authors motivate their work with a software used in planes. This kind of applications is considered as a high-critical system and it means the embedded system has to make any mistake. The ADL developed would be used in this field of study. The main advantages are the easy way to code and the multi-rate. In that way, we could use it in factory for critical processes using several sensors and communicating at different rates. The advantage with the language is that it may be used to develop real-time program for embedded systems less critical. Indeed , drones and self-balanced wheel use sensors such as a gyroscope, accelerometer Hall effect sensors and so one, and the point is to order well motors to keep the sytsem stable.