Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / Simulink / src_many_files / RandomNumber.LUSTREC.lus @ cd1faebc

History | View | Annotate | Download (4.05 KB)

1 4748b215 hbourbou
-- This file has been generated by CoCoSim2.
2
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:57:25
5
node  _make_clock(period : int;
6
	phase : int;)
7
returns(clk : bool;);
8
var count : int;
9
let
10
	count = (((period - phase) -> ((pre count) + 1)) mod period);
11
	clk = (count = 0);
12
tel
13
14
node  RandomNumber_11_104(b : bool;)
15
returns(r : real;);
16
let
17
	r = (3.571337948734234 -> (pre (0.861147442670110 -> (pre (1.386172803979955 -> (pre (0.655802541964076 -> (pre (1.443571114200323 -> (pre (3.700087770914813 -> (pre (3.733379979803757 -> (pre (3.033216392352887 -> (pre (1.609782526173625 -> (pre (-1.201356598362157 -> (pre (-0.766451127557990 -> (pre (-1.587287176040862 -> (pre (4.098732358367604 -> (pre (3.304535067165095 -> (pre (0.386784291344380 -> (pre (2.941014935914712 -> (pre (3.599267196604891 -> (pre (2.978449613956933 -> (pre (-1.616060059526830 -> (pre (0.936887273741296 -> (pre (1.719425434927125 -> (pre (0.700389618215134 -> (pre (-1.642455609355489 -> (pre (0.773171288582622 -> (pre (-0.792973527249580 -> (pre (1.857850537329960 -> (pre (1.531231472920278 -> (pre (1.059869168569276 -> (pre (0.514046831953239 -> (pre (0.062476602400889 -> (pre (-0.580794889370246 -> (pre (3.721097659775284 -> (pre (3.335159873108962 -> (pre (-1.729296409774439 -> (pre (3.373321983203787 -> (pre (1.950193982266133 -> (pre (2.318344497943254 -> (pre (0.149355534294999 -> (pre (-1.272357557082800 -> (pre (0.470594569188862 -> (pre (1.866514134928878 -> (pre (3.080500698428697 -> (pre (0.485206308162460 -> (pre (-0.400676136868114 -> (pre (0.156514530972447 -> (pre (3.492488150300071 -> (pre (1.262077482928375 -> (pre (1.519763169590380 -> (pre (2.807598889114634 -> (pre (-0.365023079673294 -> (pre (-0.188292620865376 -> (pre (-0.830910112704247 -> (pre (2.362004124943331 -> (pre (0.277825100536580 -> (pre (0.193853997537198 -> (pre (0.740873989774229 -> (pre (2.648038715496537 -> (pre (-0.464046564040141 -> (pre (3.128419935762627 -> (pre (3.906936583534495 -> (pre (-0.925186414637152 -> (pre (1.880443677893924 -> (pre (1.642973088826468 -> (pre (3.385009355685475 -> (pre (3.860988474300586 -> (pre (0.607241211425112 -> (pre (0.995485585922968 -> (pre (3.518622387136785 -> (pre (2.314904437943788 -> (pre (-0.336685083697442 -> (pre (1.332156981794710 -> (pre (1.546785040723987 -> (pre (3.497987383642464 -> (pre (-0.103968239670223 -> (pre (4.076275901637046 -> (pre (1.201651382568069 -> (pre (0.115874611324149 -> (pre (2.503151340006303 -> (pre (-0.354394373988486 -> (pre (2.651078063927008 -> (pre (3.027780762747519 -> (pre (-0.468164613517839 -> (pre (-0.104380007088419 -> (pre (3.007252999318959 -> (pre (4.104680383693761 -> (pre (2.085423967999513 -> (pre (1.078262187270079 -> (pre (-1.288954649047700 -> (pre (1.734261278005941 -> (pre (0.812659037688217 -> (pre (-0.322114114231540 -> (pre (0.351695244008732 -> (pre (1.612329979137548 -> (pre (0.163280056318978 -> (pre (1.348172008169439 -> (pre (2.619202287695347 -> (pre (0.327387995225318 -> (pre (2.602616754547611 -> (pre (0.200241463830724 -> (pre 1.782734860585087))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
18
tel
19
20
(*
21
Original block name: RandomNumber
22
*)
23
node  RandomNumber(_virtual : bool;)
24
returns(Out1_1 : bool;);
25
var Constant_1 : real;
26
	Constant1_1 : real;
27
	LogicalOperator_1 : bool;
28
	RandomNumber_1 : real;
29
	RandomNumber_11_104_clock : bool clock;
30
	RelationalOperator_1 : bool;
31
	RelationalOperator1_1 : bool;
32
	__time_step : real;
33
	__nb_step : int;
34
let
35
	Constant_1 = -1.730300000000000;
36
	Constant1_1 = 4.130300000000000;
37
	LogicalOperator_1 = ( RelationalOperator_1 and RelationalOperator1_1 );
38
	RandomNumber_11_104_clock = _make_clock(100, 0);
39
	RandomNumber_1 = (RandomNumber_11_104(true) every RandomNumber_11_104_clock);
40
	RelationalOperator_1 = (Constant_1 <= RandomNumber_1);
41
	RelationalOperator1_1 = (RandomNumber_1 <= Constant1_1);
42
	Out1_1 = LogicalOperator_1;
43
	__time_step = (0.0 -> ((pre __time_step) + 0.100000000000000));
44
	__nb_step = (0 -> ((pre __nb_step) + 1));
45
tel