Date: Fri, 29 Mar 2024 05:48:32 +0000 (UTC) Message-ID: <348252354.6477.1711691312235@2f9704fbf185> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_6476_1938198020.1711691312235" ------=_Part_6476_1938198020.1711691312235 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Thew following tools are installed locally in /home/esterel/bin/
Traces of Esterel programs are usually given as ESI = or ESO files. The following tools to work with esi an= d eso files are installed in /home/esterel/bin
In the Esterel v5, the semantic of the instantiation of modules is simpl= y a textual copy and paste, with renaming of signals. In Esterel v7, the be= havior is more subtle.
Example:
=09 = main module main_mod: input i, env_i; output o; run sub; loop await i do emit o end await end loop; end module module sub: input i,env_i; output i; change input i to output and it works fine= sustain { i <=3D env_i } end module=20
Similar, reading outputs does not work:
= main module M: input I; output O:int init 0; signal S: int init 0 in every I do run Count[S/C]; emit O(?S); end every end signal end module module Count: output C : int; emit C(sat<32>(pre(?C)+1)); end module=20
The global initialization does not reach C, hence it is not initialized = when I occurs for the first time. Hence C is a local signal, when it is rea= d, but it is a global signal when it is written. So you have to declare C a= s inputoutput;
Esterel v7 allows the use of expressions as conditions for strong ab= orts, but this is somehow tricky. The expression is evaluated before the ab= ort body is executed. When a variable is changed inside the body, making th= e abort condition true, no abort takes place, not even a weak one.
= main module T: input I; output O : int; var v : int in v:=3D0; abort every I do v:=3Dsat<32>(v+1); end when v=3D3; emit O(v); end var end module=20
The O will be present in the instant after the third I occurred.
It is now possible to emit signals in the next instant. Unfortunatel= y, this will be silently omitted, if the module terminates in the current i= nstant: main module M:
mai= n module T: signal S in run sub[S/O]; await immediate S; halt; control never re= aches this point. end signal end module module sub: output O : reg; emit next O; pause; end module=20
If possible, you can simply add a pause at the end of the module, but of= course this can change the overall behavior of the model.