The Inria Esterel compiler is the reference implementation of the Esterel V5 language. It can produce either automata code or netlist code.
=Documentation = For copyright reasons we are not allowed to distribute the documentation via HTTP. Therefore those files are only locally available via FILE links into the directory /home/esterel/v5_92/doc. You may browse the official Esterel Web for documents released to the public.
The manual pages for Esterel v5_92 are here located in
/home/esterel/v5_92/man
Use the Option -M /home/esterel/v5_92/man for the man command to display Esterel manual pages. Or extend the environment variable MANPATH by that directory (bash style):
export MANPATH=$MANPATH:/home/esterel/v5_92/man
HTML-Versions of these manual pages are available in /home/esterel/v5_92/doc/html/.
Two other documents worth reading are:
There are two example directories prepared for use as templates for your own projects:
Each directory holds four files:
/home/esterel/v5_92/example:
/home/esterel/v5_92/example-legOS:
Both examples implement the standard ABRO example, which is named after the signals used: A and B as input signals, R as a reset signal and O as output. Details of this standard example can be found in the Esterel v5 Language Primer.
The implementation in /home/esterel/v5_92/example reads the keyboad keys A, B, and R as input signals A, B, and R . The output signal O is bound to a printf() call.
The legOS implementation uses the RCX inputs 1 and 2 as inputs A and B. The panel button Prgm is the source for the R signal. The output O is implemented as a beep on the RCX for each emitted signal.
The directory /home/esterel/v5_92/example-legOS contains another Esterel example: drive.strl and respective C files drive.h and drive_data.c. It is a simple example of the exec statement of Esterel.
To be able to modify or compile these files, copy them into a directory in your home account.
mkdir esterel cp /home/esterel/v5_92/example-legOS/* esterel cd esterel
If you want to use them as templates for another project, then simply rename the files and modify them. When renaming, do not forget the line
#include "abro-rcx.h"
in (formerly) "abro-rcx_data.c". The "abro-rcx" part must be changed to match your file names. Compilation Details Basically the compilation of an Esterel program for an Unix host works as follows: The file with Esterel code is compiled into C code with the Esterel compiler:
esterel abro.strl
The resulting C code is compiled with a C compiler into object code:
gcc -c abro.c -o abro.o
and with the object code of the *_data.c interface file:
gcc -c abro_data.c -o abro_data.o
linked into one executable binary:
gcc abro.o abro_data.o -o abro
These steps are conveniently implemented into the Makefile for each example directory: Makefile for the Unix target The Makefile in /home/esterel/v5_92/example compiles esterel programs for the Unix-Target.
The following targets are available (replace abro with the base name of your project):
Makefile for the legOS target The Makefile in /home/esterel/v5_92/example-legOS compiles esterel programs for the legOS-Target. It is similar to the one for Unix with some additional targets for kernel and program upload into the RCX.
The following targets are available (replace abro-rcx with the base name of your project):