Mapping esterel onto a multi-threaded embedded processor

The synchronous language Esterel is well-suited for programming control-dominated reactive systems at the system level. It provides non-traditional control structures, in particular concurrency and various forms of preemption, which allow to concisely express reactive behavior. As these control structures cannot be mapped easily onto traditional, sequential processors, an alternative approach that has emerged recently makes use of special-purpose reactive processors. However, the designs proposed so far have limitations regarding completeness of the language support, and did not really take advantage of compile-time knowledge to optimize resource usage.This paper presents a reactive processor, the Kiel Esterel Processor 3a (KEP3a), and its compiler. The KEP3a improves on earlier designs in several areas; most notable are the support for exception handling and the provision of context-dependent preemption handling instructions. The KEP3a compiler presented here is to our knowledge the first for multi-threaded reactive processors. The translation of Esterel's preemption constructs onto KEP3a assembler is straightforward; however, a challenge is the correct and efficient representation of Esterel's concurrency. The compiler generates code that respects data and control dependencies using the KEP3a priority-based scheduling mechanism. We present a priority assignment approach that makes use of a novel concurrent control flow graph and has a complexity that in practice tends to be linear in the size of the program. Unlike earlier Esterel compilation schemes, this approach avoids unnecessary context switches by considering each thread's actual execution state at run time. Furthermore, it avoids code replication present in other approaches.

[1]  Zoran A. Salcic,et al.  Towards direct execution of esterel programs on reactive processors , 2004, EMSOFT '04.

[2]  Stephen A. Edwards,et al.  Code Generation in the Columbia Esterel Compiler , 2007, EURASIP J. Embed. Syst..

[3]  Luciano Lavagno,et al.  Hardware-software co-design of embedded systems: the POLIS approach , 1997 .

[4]  Stephen A. Edwards,et al.  Tutorial: Compiling concurrent languages for sequential processors , 2003, TODE.

[5]  Stephen A. Edwards,et al.  An Esterel compiler for large control-dominated systems , 2002, IEEE Trans. Comput. Aided Des. Integr. Circuits Syst..

[6]  Stephen A. Edwards,et al.  An Esterel Virtual Machine for Embedded Systems , 2006 .

[7]  Stephen A. Edwards,et al.  The Synchronous Languages Twelve Years Later , 1997 .

[8]  Stephen A. Edwards,et al.  The synchronous languages 12 years later , 2003, Proc. IEEE.

[9]  Michel Poize,et al.  SAXO-RT: Interpreting Esterel Semantic on a Sequential Execution Structure , 2002, SLAP@ETAPS.

[10]  G. Plotkin,et al.  Proof, language, and interaction: essays in honour of Robin Milner , 2000 .

[11]  R. V. Hanxleden,et al.  SW Co-Design for a Reactive Processor , 2006 .

[12]  Xin Li,et al.  A concurrent reactive Esterel processor based on multi-threading , 2006, SAC.

[13]  Partha S. Roop,et al.  Compiling Esterel for Distributed Execution , 2006 .

[14]  Reinhard von Hanxleden,et al.  Removing Cycles in Esterel Programs , 2007, EURASIP J. Embed. Syst..

[15]  Michael Harder,et al.  An Esterel processor with full preemption support and its worst case reaction time analysis , 2005, CASES '05.

[16]  Alberto L. Sangiovanni-Vincentelli,et al.  Task scheduling with RT constraints , 2000, DAC.

[17]  Stephen A. Edwards,et al.  Compiling Esterel into Static Discrete-Event Code , 2006, SLAP@ETAPS.

[18]  Ch. Andre,et al.  Synccharts: A visual representation of reactive behaviors , 1995 .

[19]  Gérard Berry,et al.  The foundations of Esterel , 2000, Proof, Language, and Interaction.

[20]  Gérard Berry,et al.  The constructive semantics of pure esterel , 1996 .

[21]  Robert de Simone,et al.  Optimizations for faster execution of Esterel programs , 2003, First ACM and IEEE International Conference on Formal Methods and Models for Co-Design, 2003. MEMOCODE '03. Proceedings..