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

Update for the ptask wrapper

git-svn-id: https://svn.onera.fr/Prelude/Prelude/trunk@891 49f62630-d767-4ccd-930e-b3f5589f52e1
parent bfad3661
Branches
Tags
No related merge requests found
......@@ -19,8 +19,8 @@ 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 completely deterministic code, which respects the real-time
semantics of the original program (period, deadlines, release dates and
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.
......@@ -32,10 +32,10 @@ Distribution Directory Overview
- README: This file.
- lib: C library files required to compile C code generated by Prelude
- lib/prelude: generic Prelude library files
- 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: contains Prelude program examples
- 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.
......@@ -44,34 +44,22 @@ Using preludec
==============
Use preludec -help for a complete list of options.
The compiler generates two C files, named by default
<program>_c/<main_node>.c and <program>_c/<main_node>.h
As of version 1.2, there are two possible code generation modes:
1) preludec -node <main_node> <program.plu>
In this mode, precedences are not encoded and must be ensured by the
scheduler at run-time. This mode is suited for multicore architectures.
The function "get_task_set" returns the number of tasks in the set and
the task set itself. The structure of a task is defined in
"lib/nonencoded_task_params.h". In addition, the function
"get_precedence_set" returns the number of precedence constraints and
the set of constraints. The constraints structure is defined in
"lib/multirate_precedence.h".
For a standard compilation with default options, use:
preludec -node <main_node> <program.plu>
2) preludec -with_encoding -node <main_node> <program.plu>
In this mode, precedences are encoded in task attributes. The resulting
task set will execute without synchronization mechanisms
(e.g. semaphores). This mode is suited for monocore architectures.
The compiler generates two C files:
<program>_c/<main_node>.c and <program>_c/<main_node>.h
The function "get_task_set" returns the number of tasks in the set and
the task set itself. The structure of a task is defined in
"lib/encoded_task_params.h". This structure consists in the real time
attributes of the task and in a function pointer, which corresponds to
the execution of one instance of the task.
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 both cases, the code is completely independent from the target RTOS.
In all variants, the code is completely independent from the target RTOS.
Compiling and executing code generated by preludec
==================================================
......@@ -79,26 +67,27 @@ 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 two choices:
you have several choices:
A- Using SchedMCore.
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
and by executing the example there.
3) Follow the instructions in Examples/sampling_loop/README to adapt
this example to your own program.
3) Follow the instructions in that README to adapt your own program.
B- Using your favorite RTOS:
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.
1) 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.
2) You need to implement the "integration code" that builds threads from
the code generated by Prelude. This can be partly inspired from
"tools/runner/schedmcore_main.c"
3) Compile, link, execute.
References
==========
......@@ -106,23 +95,25 @@ References
J. Forget
A Synchronous Language for Critical Embedded Systems with Multiple Real-Time Constraints.
PhD thesis, ISAE, Toulouse, France, November 2009.
http://www.lifl.fr/~forget/docs/jforget-thesis.pdf
[forgetSAC'10]
J. Forget, F. Boniol, D. Lesens, C. Pagetti
A Real-Time Architecture Design Language for Multi-Rate Embedded Control Systems
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.
http://www.lifl.fr/~forget/docs/jforget-SAC10.pdf
[PreludeSchedMCore-RTNS2011]
M. Cordovilla, F. Boniol, J. Forget, E. Noulard, C. Pagetti
Developing critical embedded systems on multicore architectures: the Prelude-SchedMCore toolset
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.
http://sites.onera.fr/schedmcore/sites/sites.onera.fr.schedmcore/files/2011-PreludeSchedMCore-RTNS_0.pdf
[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-lille1.fr http://www.cristal.univ-lille.fr/~forget/
julien.forget@univ-lille.fr http://www.cristal.univ-lille.fr/~forget/
https://svn.onera.fr/Prelude
https://forge.onera.fr/projects/prelude
--------------------------------------------------------------------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment