30.07.2013 Views

The Esterel v5 21 System Manual - Courses

The Esterel v5 21 System Manual - Courses

The Esterel v5 21 System Manual - Courses

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.2. USAGE OF THE ESTEREL COMMAND 15<br />

All the <strong>Esterel</strong> modules that are not themselves included in other modules<br />

are compiled. When including <strong>Esterel</strong> module libraries, one may need<br />

to specify what is the main program to compile. This is done using the<br />

-main option followed by the main module name:<br />

esterel -main WRISTWATCH watch.strl alarm.strl<br />

stopwatch.strl -B wristwatch<br />

2.2.3 Performing Sanity Checks<br />

Some options perform extensive sanity checks of the <strong>Esterel</strong> source code:<br />

constructiveness, single emission of single signals, etc. Before embedding<br />

any generated code, it is useful to perform the checks as follows:<br />

esterel -W -Icheck foo.strl<br />

<strong>The</strong> -W option prints various warnings that are not printed by default. Read<br />

them carefully. <strong>The</strong> -Icheck option performs checks for causality and other<br />

checks on signals. It is detailed in Section 2.5.<br />

2.2.4 Keeping Intermediate Files<br />

To keep the intermediate files for further use, type<br />

esterel -simul -K main.strl aux.strl -B foo<br />

<strong>The</strong> ic files will be main.ic and aux.ic. <strong>The</strong> other intermediate code files<br />

will be foo.lc for the linked ic code, foo.sc for the sc code, and foo.ssc<br />

for the ssc code.<br />

To perform the compilation in several steps, for example with an intermediate<br />

stop at the sc code level, type<br />

esterel -sc main.strl aux.strl -B foo<br />

esterel foo.sc<br />

<strong>The</strong> available options are -ic, -lc, -sc, -ssc, and -oc.<br />

This illustrate the facts that one never needs to directly call the compiler’s<br />

internal processors and that any intermediate code can be passed to<br />

the esterel command.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!