Abstract

The synchronous language Esterel provides deterministic concurrency by adopting a semantics in which threads march in step with a global clock and communicate in a very disciplined way. Its expressive power comes at a cost, however: it is a difficult language to compile into machine code for standard von Neumann processors. The open-source Columbia Esterel Compiler is a research vehicle for experimenting with new code generation techniques for the language. Providing a front-end and a fairly generic concurrent intermediate representation, a variety of back-ends have been developed. We present three of the most mature ones, which are based on program dependence graphs, dynamic lists, and a virtual machine. After describing the very different algorithms used in each of these techniques, we present experimental results that compares twenty-four benchmarks generated by eight different compilation techniques running on seven different processors.

Highlights

  • Embedded software is often conveniently described as collections of concurrently running processes and implemented using a real-time operating system (RTOS).While the functionality provided by an RTOS is very flexible, the overhead incurred by such a general-purpose mechanism can be substantial

  • We discuss three code generation techniques for the Esterel language, which we have implemented in the open source Columbia Esterel compiler

  • We chose a variant of PotopButucaru’s [10] graph code (GRC) because it is the result of an evolution that started with the IC code due to Gontier and Berry, and it has proven itself as an elegant way to represent Esterel programs

Read more

Summary

INTRODUCTION

Embedded software is often conveniently described as collections of concurrently running processes and implemented using a real-time operating system (RTOS).While the functionality provided by an RTOS is very flexible, the overhead incurred by such a general-purpose mechanism can be substantial. Executing synchronous languages efficiently facilitates the simulation of hardware systems. Implementing such languages efficiently is not straightforward since the detailed, instruction-level synchronization is difficult to implement efficiently with an RTOS. We discuss three code generation techniques for the Esterel language, which we have implemented in the open source Columbia Esterel compiler. Such automatic translation of Esterel into efficient executable code finds at least two common applications in a typical design flow. The final implementation may involve single-threaded code running on a microcontroller; generating automatically this from the specification can be a great help in reducing implementation mistakes

The CEC code generators
ESTEREL
THE GRC REPRESENTATION
The selection tree
The control-flow graph
CODE GENERATION FORM PROGRAM DEPENDENCE GRAPHS
Schedule with respect to priorities
Program dependence graphs
Scheduling
Ordering node successors
Constructing the schedule
Restructuring the PDG
The restructure procedure
The DuplicateNode procedure
The ConnectPredecessors procedure
Examples
Fusing guard variables
Generating sequential code
DYNAMIC LIST CODE GENERATION
Sequential code generation
The clustering algorithm
VIRTUAL MACHINE CODE GENERATION
The BAL virtual machine
General-purpose and signal registers
Completion code registers
Arithmetic and the stack
Concurrency
The sequentializing algorithm
An example
EXPERIMENTAL RESULTS
The benchmarks
Execution time on a Pentium 4
GHz 400 MHz 350 MHz 180 MHz 300 MHz 16 MHz
Code size on a Pentium 4
Execution time on other platforms
20 K 10 K
Code size on other platforms
K 10 K 20 K
Comparison with other compilers
10 K 32 K 100 K
RELATED WORK
CONCLUSIONS
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call