lustrec / test / src / clocks / oversampling0.lus @ 8f1c7e91
History | View | Annotate | Download (443 Bytes)
1 | 22fe1c93 | ploc | |
---|---|---|---|
2 | node f(x :int ) returns (cpt , y :int ) |
||
3 | let |
||
4 | y = x + 1; |
||
5 | cpt = (0 fby cpt) + 1; |
||
6 | tel |
||
7 | |||
8 | node g(x :int ; c : bool ) returns (out :int ) |
||
9 | var t, cpt , y, last_y :int; |
||
10 | let |
||
11 | (cpt , y) = f(t); |
||
12 | t = merge c (true -> x) (false -> last_y when false(c)); |
||
13 | last_y = 0 fby y; |
||
14 | out = y when false(c); |
||
15 | tel |
||
16 | (* |
||
17 | node main (x:int) returns (out :int; c:bool) |
||
18 | var toto:int; |
||
19 | let |
||
20 | toto = 1 ; |
||
21 | 8f1c7e91 | xthirioux | c = toto = 0 (*true fby false fby c*); |
22 | 22fe1c93 | ploc | out = g(x,toto=0); |
23 | tel |
||
24 | *) |