Skip to content
Snippets Groups Projects
Commit 977b4a50 authored by Forget Julien's avatar Forget Julien
Browse files

Switched README to .md format.

parent 5da8fbb5
No related branches found
No related tags found
No related merge requests found
Prelude
-------
Introduction
============
Prelude is a high-level language for programming embedded control
systems. It is built upon Synchronous Languages (such as Lustre) and
inherits their formal properties. It adds real-time primitives to enable
the programming of multi-periodic systems. The objective of the language
is not to replace other synchronous languages but instead to provide a
higher layer of abstraction, on top of classic synchronous languages. It
can be considered as a real-time software architecture language that
enables to assemble locally mono-periodic synchronous systems into a
globally multi-periodic synchronous system. A complete definition of the
language is available in [forgetPHD] (see Section 4 mainly). A shorter
presentation is available in [forgetSAC'10].
The preludec compiler generates synchronized multi-task C code that is
independent of the target OS. Communication is achieved by a tailor-made
buffering communication protocol. The compilation was defined formally
and produces deterministic code, which respects the real-time semantics
of the original program (period, deadlines, release dates and
precedences) as well as its functional semantics (respect of variables
consumption). Prelude compiler produces code for either monocore or
multicore architectures.
Distribution Directory Overview
===============================
- INSTALL: Installation instructions.
- README: This file.
- lib/prelude: C header files included by C code generated by Prelude
- share: C source files and makefiles to compile and link C programs generated by Prelude
- examples: Prelude program examples
- examples/sampling_loop: a complete example with everything required to
execute it. For new users, the README there is a good starting point.
Using preludec
==============
Use preludec -help for a complete list of options.
For a standard compilation with default options, use:
preludec -node <main_node> <program.plu>
The compiler generates two C files:
<program>_c/<main_node>.c and <program>_c/<main_node>.h
The main variants for the code generation are:
-aer: produce code that follows the Acquisition-Execution-Restitution
multi-phase task model, which splits execution into communication
phases (A/R) and computation phases (E);
-with_encoding: communication synchronizations are ensured by precedence
encoding mechanisms
(default): mono-phase task model+synchronizations are ensured by semaphores
In all variants, the code is completely independent from the target RTOS.
Compiling and executing code generated by preludec
==================================================
The code generated by preludec is not the complete final program. An
"integration code" is required, to build threads/tasks from the task set
defined in the generated code. This part is OS-dependent. From there,
you have several choices:
A- Using Linux+ptask
1) Install ptask from https://github.com/glipari/ptask
2) Start by following the instructions in Examples/sampling_loop/README
3) Follow the instructions in that README to adapt your own program.
B- Using SchedMCore.
Prelude integration is directly supported by the SchedMCore framework:
1) Install SchedMCore from http://sites.onera.fr/schedmcore/
2) Start by following the instructions in Examples/sampling_loop/README
3) Follow the instructions in that README to adapt your own program.
C- Using your favorite RTOS:
1) You need to implement the "integration code" that builds threads from
the code generated by Prelude. See share/ptask_wrapper.c for an example;
2) If you want to rely on the scheduling policy based on precedence
encoding, you need to implement the EDF policy modified to support
deadline words, i.e. the equivalent of the "sched/sched_pluedf.c"
included in SchedMCore source distribution.
References
==========
[forgetPHD]
J. Forget
A Synchronous Language for Critical Embedded Systems with Multiple Real-Time Constraints.
PhD thesis, ISAE, Toulouse, France, November 2009.
[forgetSAC'10]
J. Forget, F. Boniol, D. Lesens, C. Pagetti
A Real-Time Architecture Design Language for Multi-Rate Embedded Control Systems.
In 25th ACM Symposium on Applied Computing (SAC'10), Sierre, Switzerland, March 22-26 2010.
[PreludeSchedMCore-RTNS2011]
M. Cordovilla, F. Boniol, J. Forget, E. Noulard, C. Pagetti
Developing critical embedded systems on multicore architectures: the Prelude-SchedMCore toolset.
In 19th International Conference on Real-Time and Network Systems, RTNS2011, Sep. 3 2013.
[AER-RTNS2018]
Pagetti, Claire, Julien Forget, Heiko Falk, Dominic Oehlert, and Arno Luppold.
Automated generation of time-predictable executables on multicore.
In 26th International Conference on Real-Time Networks and Systems, Oct 10-12 2018.
--------------------------------------------------------------------------
Contact Address: Home site:
julien.forget@univ-lille.fr http://www.cristal.univ-lille.fr/~forget/
https://svn.onera.fr/Prelude
https://forge.onera.fr/projects/prelude
--------------------------------------------------------------------------
README.md 0 → 100644
## Introduction
Prelude is a high-level language for programming real-time embedded
control systems. It is a data-flow synchronous language, similar to
Lustre. It provides real-time primitives for the programming of
multi-periodic systems. Compared to other synchronous languages, it
considers a higher layer of abstraction. It can be considered as a
real-time software architecture language, designed to assemble locally
mono-periodic synchronous systems into a globally multi-periodic
synchronous ones.
The preludec compiler generates synchronized multi-task C code, that
is independent of the target OS. Communication is achieved by a
tailor-made buffering communication protocol. The compilation is
defined formally and produces code that respects the temporal
semantics of the original program (periods, deadlines, release dates
and precedence constraints), as well as its functional semantics
(data-dependencies). The Prelude compiler produces code for either
monocore or multicore architectures.
## Distribution directory overview
- `INSTALL`: Installation instructions.
- `README.md`: This file.
- `lib/prelude`: C header files included in C code generated by Prelude
- `share`: C source files and makefiles to compile and link C programs generated by Prelude
- `examples`: program examples
- `examples/sampling_loop`: a complete example with everything required to
execute it. For new users, the README there is a good starting point.
## Using preludec
Use `preludec -help` for a complete list of options.
For a standard compilation with default options, use:
`preludec -node <main_node> <program.plu>`
The compiler generates two C files:
`<program>_c/<main_node>.c` and `<program>_c/<main_node>.h`
The main variants for the code generation are:
- `-aer`: produce code that follows the
Acquisition-Execution-Restitution multi-phase task model, which
splits execution into communication phases (A/R) and computation
phases (E);
- `-with_encoding`: communication synchronizations are ensured by
precedence encoding mechanisms (default): mono-phase task
model+synchronizations are ensured by semaphores
In all variants, the code is completely independent from the target RTOS.
## Compiling and executing code generated by preludec
The code generated by preludec is not a complete program. An
"integration code" is required, to build threads/tasks from the task set
defined in the generated code. This part is OS-dependent. From there,
you have several choices:
- Using Linux+ptask
1. Install [ptask](https://github.com/glipari/ptask)
2. Start by following the instructions in Examples/sampling_loop/README
3. Follow the instructions in that README to adapt your own program.
- Using your favorite RTOS:
1. You need to implement the "integration code" that builds threads from
the code generated by Prelude. See share/ptask_wrapper.c for an example;
2. If you want to rely on the scheduling policy based on precedence
encoding, you need to implement the EDF policy modified to support
deadline words, i.e. the equivalent of the "sched/sched_pluedf.c"
included in SchedMCore source distribution.
## References
- Language and compiler: Claire Pagetti, Julien Forget, Frédéric
Boniol, Mikel Cordovilla, David Lesens, [Multi-task implementation
of multi-periodic synchronous
programs](https://hal.science/inria-00638936). Discrete Event
Dynamic Systems, 2011, 21 (3), pp.307-338.
- Short presentation: J. Forget, F. Boniol, D. Lesens, C. Pagetti [A Real-Time
Architecture Design Language for Multi-Rate Embedded Control
Systems](https://hal.science/hal-00688490v1). In 25th ACM Symposium
on Applied Computing (SAC'10), Sierre, Switzerland, March 22-26 2010.
- Complete language definition: J. Forget, [A Synchronous Language for
Critical Embedded Systems with Multiple Real-Time
Constraints](https://hal.science/tel-01942421). PhD thesis, ISAE,
Toulouse, France, November 2009.
- AER compilation: C. Pagetti, J. Forget, H. Falk, D. Oehlert,
A. Luppold. [Automated generation of time-predictable executables on
multicore](https://hal.science/hal-01888728v1). In 26th International
Conference on Real-Time Networks and Systems, Oct 10-12 2018.
**Contact**: julien.forget@univ-lille.fr
**Wiki**: https://gitlab.cristal.univ-lille.fr/forget/prelude/-/wikis/home
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment