1d390848fe
The order switch then reset was wrong, since some reset reset slower inner blocks and equations, to have reset correct after switch it would have been necessary to sample the reset condition correctly (use r when c) using the level_ck... anyway the order seems now irrelevant considering code size.
28 lines
530 B
Text
28 lines
530 B
Text
node count() returns (o : int)
|
|
let
|
|
o = 0 fby (o + 1);
|
|
tel
|
|
|
|
node main(x : bool) returns (d : bool)
|
|
var last c : bool = false;
|
|
let
|
|
d = c;
|
|
automaton
|
|
state One
|
|
var last xone : bool = false;
|
|
do
|
|
automaton
|
|
state A
|
|
do c = xone & x;
|
|
xone = true;
|
|
until count() = 2 then B
|
|
state B
|
|
do
|
|
until count() = 3 then A
|
|
end
|
|
until count() = 5 then Two
|
|
state Two
|
|
do c = x;
|
|
until count() = 3 then One
|
|
end
|
|
tel
|