Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (16.3 KB)

1 4748b215 hbourbou
-- This file has been generated by CoCoSim2.
2
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 23:11:04
5
node  abs_real(x : real;)
6
returns(y : real;);
7
let
8
	y = if (x >= 0.0) then
9
		x
10
	    else (- x);
11
tel
12
13
(*
14
Original block name: SignalBuilder_1_PP/SignalBuilder
15
*)
16
node  SignalBuilder_76_992(__time_step : real;
17
	__nb_step : int;)
18
returns(Signal1_1 : real;
19
	Signal2_1 : real;);
20
var Demux_1 : real;
21
	Demux_2 : real;
22
	FromWs_1 : real;
23
	FromWs_2 : real;
24
	FromWs_80_718_time_1_1 : real;
25
	FromWs_80_718_data_1_1 : real;
26
	FromWs_80_718_time_1_2 : real;
27
	FromWs_80_718_data_1_2 : real;
28
	FromWs_80_718_time_1_3 : real;
29
	FromWs_80_718_data_1_3 : real;
30
	FromWs_80_718_time_2_1 : real;
31
	FromWs_80_718_data_2_1 : real;
32
	FromWs_80_718_time_2_2 : real;
33
	FromWs_80_718_data_2_2 : real;
34
	FromWs_80_718_time_2_3 : real;
35
	FromWs_80_718_data_2_3 : real;
36
let
37
	Demux_1 = FromWs_1;
38
	Demux_2 = FromWs_2;
39
	FromWs_80_718_time_1_1 = 0.000000000000000;
40
	FromWs_80_718_data_1_1 = 1.000000000000000;
41
	FromWs_80_718_time_1_2 = 1000.000000000000000;
42
	FromWs_80_718_data_1_2 = 1.000000000000000;
43
	FromWs_80_718_time_1_3 = 1000000.000000000000000;
44
	FromWs_80_718_data_1_3 = 1.000000000000000;
45
	FromWs_1 = if (((__time_step >= FromWs_80_718_time_1_1) or abs_real(__time_step - FromWs_80_718_time_1_1) <= 0.000000000000113686837721616030) and ((__time_step < FromWs_80_718_time_1_2) and abs_real(__time_step - FromWs_80_718_time_1_2) > 0.000000000000113686837721616030)) then
46
		(((FromWs_80_718_data_1_1 * (FromWs_80_718_time_1_2 - __time_step)) + (FromWs_80_718_data_1_2 * (__time_step - FromWs_80_718_time_1_1))) / (FromWs_80_718_time_1_2 - FromWs_80_718_time_1_1))
47
	    else (((FromWs_80_718_data_1_2 * (FromWs_80_718_time_1_3 - __time_step)) + (FromWs_80_718_data_1_3 * (__time_step - FromWs_80_718_time_1_2))) / (FromWs_80_718_time_1_3 - FromWs_80_718_time_1_2));
48
	FromWs_80_718_time_2_1 = 0.000000000000000;
49
	FromWs_80_718_data_2_1 = 2.000000000000000;
50
	FromWs_80_718_time_2_2 = 1000.000000000000000;
51
	FromWs_80_718_data_2_2 = 2.000000000000000;
52
	FromWs_80_718_time_2_3 = 1000000.000000000000000;
53
	FromWs_80_718_data_2_3 = 2.000000000000000;
54
	FromWs_2 = if (((__time_step >= FromWs_80_718_time_2_1) or abs_real(__time_step - FromWs_80_718_time_2_1) <= 0.000000000000113686837721616030) and ((__time_step < FromWs_80_718_time_2_2) and abs_real(__time_step - FromWs_80_718_time_2_2) > 0.000000000000113686837721616030)) then
55
		(((FromWs_80_718_data_2_1 * (FromWs_80_718_time_2_2 - __time_step)) + (FromWs_80_718_data_2_2 * (__time_step - FromWs_80_718_time_2_1))) / (FromWs_80_718_time_2_2 - FromWs_80_718_time_2_1))
56
	    else (((FromWs_80_718_data_2_2 * (FromWs_80_718_time_2_3 - __time_step)) + (FromWs_80_718_data_2_3 * (__time_step - FromWs_80_718_time_2_2))) / (FromWs_80_718_time_2_3 - FromWs_80_718_time_2_2));
57
	Signal1_1 = Demux_1;
58
	Signal2_1 = Demux_2;
59
tel
60
61
(*
62
Original block name: SignalBuilder_1_PP
63
*)
64
node  SignalBuilder_1_PP(_virtual : bool;)
65
returns(Out2_1 : real;
66
	Out1_1 : real;);
67
var SignalBuilder_1 : real;
68
	SignalBuilder_2 : real;
69
	SignalBuilder_76_992_time_1_1 : real;
70
	SignalBuilder_76_992_data_1_1 : real;
71
	SignalBuilder_76_992_time_1_2 : real;
72
	SignalBuilder_76_992_data_1_2 : real;
73
	SignalBuilder_76_992_time_1_3 : real;
74
	SignalBuilder_76_992_data_1_3 : real;
75
	SignalBuilder_76_992_time_1_4 : real;
76
	SignalBuilder_76_992_data_1_4 : real;
77
	SignalBuilder_76_992_time_1_5 : real;
78
	SignalBuilder_76_992_data_1_5 : real;
79
	SignalBuilder_76_992_time_1_6 : real;
80
	SignalBuilder_76_992_data_1_6 : real;
81
	SignalBuilder_76_992_time_1_7 : real;
82
	SignalBuilder_76_992_data_1_7 : real;
83
	SignalBuilder_76_992_time_2_1 : real;
84
	SignalBuilder_76_992_data_2_1 : real;
85
	SignalBuilder_76_992_time_2_2 : real;
86
	SignalBuilder_76_992_data_2_2 : real;
87
	SignalBuilder_76_992_time_2_3 : real;
88
	SignalBuilder_76_992_data_2_3 : real;
89
	SignalBuilder_76_992_time_2_4 : real;
90
	SignalBuilder_76_992_data_2_4 : real;
91
	SignalBuilder_76_992_time_2_5 : real;
92
	SignalBuilder_76_992_data_2_5 : real;
93
	SignalBuilder_76_992_time_2_6 : real;
94
	SignalBuilder_76_992_data_2_6 : real;
95
	SignalBuilder_76_992_time_2_7 : real;
96
	SignalBuilder_76_992_data_2_7 : real;
97
	SignalBuilder_76_992_time_2_8 : real;
98
	SignalBuilder_76_992_data_2_8 : real;
99
	SignalBuilder_76_992_time_2_9 : real;
100
	SignalBuilder_76_992_data_2_9 : real;
101
	SignalBuilder_76_992_time_2_10 : real;
102
	SignalBuilder_76_992_data_2_10 : real;
103
	SignalBuilder_76_992_time_2_11 : real;
104
	SignalBuilder_76_992_data_2_11 : real;
105
	SignalBuilder_76_992_time_2_12 : real;
106
	SignalBuilder_76_992_data_2_12 : real;
107
	SignalBuilder_76_992_time_2_13 : real;
108
	SignalBuilder_76_992_data_2_13 : real;
109
	SignalBuilder_76_992_time_2_14 : real;
110
	SignalBuilder_76_992_data_2_14 : real;
111
	SignalBuilder_76_992_time_2_15 : real;
112
	SignalBuilder_76_992_data_2_15 : real;
113
	SignalBuilder_76_992_time_2_16 : real;
114
	SignalBuilder_76_992_data_2_16 : real;
115
	SignalBuilder_76_992_time_2_17 : real;
116
	SignalBuilder_76_992_data_2_17 : real;
117
	SignalBuilder_76_992_time_2_18 : real;
118
	SignalBuilder_76_992_data_2_18 : real;
119
	SignalBuilder_76_992_time_2_19 : real;
120
	SignalBuilder_76_992_data_2_19 : real;
121
	SignalBuilder_76_992_time_2_20 : real;
122
	SignalBuilder_76_992_data_2_20 : real;
123
	SignalBuilder_76_992_time_2_21 : real;
124
	SignalBuilder_76_992_data_2_21 : real;
125
	__time_step : real;
126
	__nb_step : int;
127
let
128
	SignalBuilder_76_992_time_1_1 = 0.000000000000000;
129
	SignalBuilder_76_992_data_1_1 = 0.000000000000000;
130
	SignalBuilder_76_992_time_1_2 = 4.000000000000000;
131
	SignalBuilder_76_992_data_1_2 = 0.000000000000000;
132
	SignalBuilder_76_992_time_1_3 = 4.000000000000000;
133
	SignalBuilder_76_992_data_1_3 = 0.340000000000000;
134
	SignalBuilder_76_992_time_1_4 = 6.000000000000000;
135
	SignalBuilder_76_992_data_1_4 = 0.650000000000000;
136
	SignalBuilder_76_992_time_1_5 = 6.000000000000000;
137
	SignalBuilder_76_992_data_1_5 = 0.000000000000000;
138
	SignalBuilder_76_992_time_1_6 = 10.000000000000000;
139
	SignalBuilder_76_992_data_1_6 = 0.000000000000000;
140
	SignalBuilder_76_992_time_1_7 = 10000.000000000000000;
141
	SignalBuilder_76_992_data_1_7 = 0.000000000000000;
142
	SignalBuilder_1 = if (((__time_step >= SignalBuilder_76_992_time_1_1) or abs_real(__time_step - SignalBuilder_76_992_time_1_1) <= 0.000000000000000888178419700125) and ((__time_step < SignalBuilder_76_992_time_1_2) and abs_real(__time_step - SignalBuilder_76_992_time_1_2) > 0.000000000000000888178419700125)) then
143
		(((SignalBuilder_76_992_data_1_1 * (SignalBuilder_76_992_time_1_2 - __time_step)) + (SignalBuilder_76_992_data_1_2 * (__time_step - SignalBuilder_76_992_time_1_1))) / (SignalBuilder_76_992_time_1_2 - SignalBuilder_76_992_time_1_1))
144
	    else if (((__time_step >= SignalBuilder_76_992_time_1_3) or abs_real(__time_step - SignalBuilder_76_992_time_1_3) <= 0.000000000000000888178419700125) and ((__time_step < SignalBuilder_76_992_time_1_4) and abs_real(__time_step - SignalBuilder_76_992_time_1_4) > 0.000000000000000888178419700125)) then
145
		(((SignalBuilder_76_992_data_1_3 * (SignalBuilder_76_992_time_1_4 - __time_step)) + (SignalBuilder_76_992_data_1_4 * (__time_step - SignalBuilder_76_992_time_1_3))) / (SignalBuilder_76_992_time_1_4 - SignalBuilder_76_992_time_1_3))
146
	    else if (((__time_step >= SignalBuilder_76_992_time_1_5) or abs_real(__time_step - SignalBuilder_76_992_time_1_5) <= 0.000000000000001776356839400250) and ((__time_step < SignalBuilder_76_992_time_1_6) and abs_real(__time_step - SignalBuilder_76_992_time_1_6) > 0.000000000000001776356839400250)) then
147
		(((SignalBuilder_76_992_data_1_5 * (SignalBuilder_76_992_time_1_6 - __time_step)) + (SignalBuilder_76_992_data_1_6 * (__time_step - SignalBuilder_76_992_time_1_5))) / (SignalBuilder_76_992_time_1_6 - SignalBuilder_76_992_time_1_5))
148
	    else if (((__time_step >= SignalBuilder_76_992_time_1_6) or abs_real(__time_step - SignalBuilder_76_992_time_1_6) <= 0.000000000001818989403545856476) and ((__time_step < SignalBuilder_76_992_time_1_7) and abs_real(__time_step - SignalBuilder_76_992_time_1_7) > 0.000000000001818989403545856476)) then
149
		(((SignalBuilder_76_992_data_1_6 * (SignalBuilder_76_992_time_1_7 - __time_step)) + (SignalBuilder_76_992_data_1_7 * (__time_step - SignalBuilder_76_992_time_1_6))) / (SignalBuilder_76_992_time_1_7 - SignalBuilder_76_992_time_1_6))
150
	    else SignalBuilder_76_992_data_1_7;
151
	SignalBuilder_76_992_time_2_1 = 0.000000000000000;
152
	SignalBuilder_76_992_data_2_1 = 0.000000000000000;
153
	SignalBuilder_76_992_time_2_2 = 1.000000000000000;
154
	SignalBuilder_76_992_data_2_2 = 2.000000000000000;
155
	SignalBuilder_76_992_time_2_3 = 1.000000000000000;
156
	SignalBuilder_76_992_data_2_3 = 0.000000000000000;
157
	SignalBuilder_76_992_time_2_4 = 2.000000000000000;
158
	SignalBuilder_76_992_data_2_4 = 2.000000000000000;
159
	SignalBuilder_76_992_time_2_5 = 2.000000000000000;
160
	SignalBuilder_76_992_data_2_5 = 0.000000000000000;
161
	SignalBuilder_76_992_time_2_6 = 3.000000000000000;
162
	SignalBuilder_76_992_data_2_6 = 2.000000000000000;
163
	SignalBuilder_76_992_time_2_7 = 3.000000000000000;
164
	SignalBuilder_76_992_data_2_7 = 0.000000000000000;
165
	SignalBuilder_76_992_time_2_8 = 4.000000000000000;
166
	SignalBuilder_76_992_data_2_8 = 2.000000000000000;
167
	SignalBuilder_76_992_time_2_9 = 4.000000000000000;
168
	SignalBuilder_76_992_data_2_9 = 0.000000000000000;
169
	SignalBuilder_76_992_time_2_10 = 5.000000000000000;
170
	SignalBuilder_76_992_data_2_10 = 2.000000000000000;
171
	SignalBuilder_76_992_time_2_11 = 5.000000000000000;
172
	SignalBuilder_76_992_data_2_11 = 0.000000000000000;
173
	SignalBuilder_76_992_time_2_12 = 6.000000000000000;
174
	SignalBuilder_76_992_data_2_12 = 2.000000000000000;
175
	SignalBuilder_76_992_time_2_13 = 6.000000000000000;
176
	SignalBuilder_76_992_data_2_13 = 0.000000000000000;
177
	SignalBuilder_76_992_time_2_14 = 7.000000000000000;
178
	SignalBuilder_76_992_data_2_14 = 2.000000000000000;
179
	SignalBuilder_76_992_time_2_15 = 7.000000000000000;
180
	SignalBuilder_76_992_data_2_15 = 0.000000000000000;
181
	SignalBuilder_76_992_time_2_16 = 8.000000000000000;
182
	SignalBuilder_76_992_data_2_16 = 2.000000000000000;
183
	SignalBuilder_76_992_time_2_17 = 8.000000000000000;
184
	SignalBuilder_76_992_data_2_17 = 0.000000000000000;
185
	SignalBuilder_76_992_time_2_18 = 9.000000000000000;
186
	SignalBuilder_76_992_data_2_18 = 2.000000000000000;
187
	SignalBuilder_76_992_time_2_19 = 9.000000000000000;
188
	SignalBuilder_76_992_data_2_19 = 0.000000000000000;
189
	SignalBuilder_76_992_time_2_20 = 10.000000000000000;
190
	SignalBuilder_76_992_data_2_20 = 2.000000000000000;
191
	SignalBuilder_76_992_time_2_21 = 10000.000000000000000;
192
	SignalBuilder_76_992_data_2_21 = 19982.000000000000000;
193
	SignalBuilder_2 = if (((__time_step >= SignalBuilder_76_992_time_2_1) or abs_real(__time_step - SignalBuilder_76_992_time_2_1) <= 0.000000000000000222044604925031) and ((__time_step < SignalBuilder_76_992_time_2_2) and abs_real(__time_step - SignalBuilder_76_992_time_2_2) > 0.000000000000000222044604925031)) then
194
		(((SignalBuilder_76_992_data_2_1 * (SignalBuilder_76_992_time_2_2 - __time_step)) + (SignalBuilder_76_992_data_2_2 * (__time_step - SignalBuilder_76_992_time_2_1))) / (SignalBuilder_76_992_time_2_2 - SignalBuilder_76_992_time_2_1))
195
	    else if (((__time_step >= SignalBuilder_76_992_time_2_3) or abs_real(__time_step - SignalBuilder_76_992_time_2_3) <= 0.000000000000000444089209850063) and ((__time_step < SignalBuilder_76_992_time_2_4) and abs_real(__time_step - SignalBuilder_76_992_time_2_4) > 0.000000000000000444089209850063)) then
196
		(((SignalBuilder_76_992_data_2_3 * (SignalBuilder_76_992_time_2_4 - __time_step)) + (SignalBuilder_76_992_data_2_4 * (__time_step - SignalBuilder_76_992_time_2_3))) / (SignalBuilder_76_992_time_2_4 - SignalBuilder_76_992_time_2_3))
197
	    else if (((__time_step >= SignalBuilder_76_992_time_2_5) or abs_real(__time_step - SignalBuilder_76_992_time_2_5) <= 0.000000000000000444089209850063) and ((__time_step < SignalBuilder_76_992_time_2_6) and abs_real(__time_step - SignalBuilder_76_992_time_2_6) > 0.000000000000000444089209850063)) then
198
		(((SignalBuilder_76_992_data_2_5 * (SignalBuilder_76_992_time_2_6 - __time_step)) + (SignalBuilder_76_992_data_2_6 * (__time_step - SignalBuilder_76_992_time_2_5))) / (SignalBuilder_76_992_time_2_6 - SignalBuilder_76_992_time_2_5))
199
	    else if (((__time_step >= SignalBuilder_76_992_time_2_7) or abs_real(__time_step - SignalBuilder_76_992_time_2_7) <= 0.000000000000000888178419700125) and ((__time_step < SignalBuilder_76_992_time_2_8) and abs_real(__time_step - SignalBuilder_76_992_time_2_8) > 0.000000000000000888178419700125)) then
200
		(((SignalBuilder_76_992_data_2_7 * (SignalBuilder_76_992_time_2_8 - __time_step)) + (SignalBuilder_76_992_data_2_8 * (__time_step - SignalBuilder_76_992_time_2_7))) / (SignalBuilder_76_992_time_2_8 - SignalBuilder_76_992_time_2_7))
201
	    else if (((__time_step >= SignalBuilder_76_992_time_2_9) or abs_real(__time_step - SignalBuilder_76_992_time_2_9) <= 0.000000000000000888178419700125) and ((__time_step < SignalBuilder_76_992_time_2_10) and abs_real(__time_step - SignalBuilder_76_992_time_2_10) > 0.000000000000000888178419700125)) then
202
		(((SignalBuilder_76_992_data_2_9 * (SignalBuilder_76_992_time_2_10 - __time_step)) + (SignalBuilder_76_992_data_2_10 * (__time_step - SignalBuilder_76_992_time_2_9))) / (SignalBuilder_76_992_time_2_10 - SignalBuilder_76_992_time_2_9))
203
	    else if (((__time_step >= SignalBuilder_76_992_time_2_11) or abs_real(__time_step - SignalBuilder_76_992_time_2_11) <= 0.000000000000000888178419700125) and ((__time_step < SignalBuilder_76_992_time_2_12) and abs_real(__time_step - SignalBuilder_76_992_time_2_12) > 0.000000000000000888178419700125)) then
204
		(((SignalBuilder_76_992_data_2_11 * (SignalBuilder_76_992_time_2_12 - __time_step)) + (SignalBuilder_76_992_data_2_12 * (__time_step - SignalBuilder_76_992_time_2_11))) / (SignalBuilder_76_992_time_2_12 - SignalBuilder_76_992_time_2_11))
205
	    else if (((__time_step >= SignalBuilder_76_992_time_2_13) or abs_real(__time_step - SignalBuilder_76_992_time_2_13) <= 0.000000000000000888178419700125) and ((__time_step < SignalBuilder_76_992_time_2_14) and abs_real(__time_step - SignalBuilder_76_992_time_2_14) > 0.000000000000000888178419700125)) then
206
		(((SignalBuilder_76_992_data_2_13 * (SignalBuilder_76_992_time_2_14 - __time_step)) + (SignalBuilder_76_992_data_2_14 * (__time_step - SignalBuilder_76_992_time_2_13))) / (SignalBuilder_76_992_time_2_14 - SignalBuilder_76_992_time_2_13))
207
	    else if (((__time_step >= SignalBuilder_76_992_time_2_15) or abs_real(__time_step - SignalBuilder_76_992_time_2_15) <= 0.000000000000001776356839400250) and ((__time_step < SignalBuilder_76_992_time_2_16) and abs_real(__time_step - SignalBuilder_76_992_time_2_16) > 0.000000000000001776356839400250)) then
208
		(((SignalBuilder_76_992_data_2_15 * (SignalBuilder_76_992_time_2_16 - __time_step)) + (SignalBuilder_76_992_data_2_16 * (__time_step - SignalBuilder_76_992_time_2_15))) / (SignalBuilder_76_992_time_2_16 - SignalBuilder_76_992_time_2_15))
209
	    else if (((__time_step >= SignalBuilder_76_992_time_2_17) or abs_real(__time_step - SignalBuilder_76_992_time_2_17) <= 0.000000000000001776356839400250) and ((__time_step < SignalBuilder_76_992_time_2_18) and abs_real(__time_step - SignalBuilder_76_992_time_2_18) > 0.000000000000001776356839400250)) then
210
		(((SignalBuilder_76_992_data_2_17 * (SignalBuilder_76_992_time_2_18 - __time_step)) + (SignalBuilder_76_992_data_2_18 * (__time_step - SignalBuilder_76_992_time_2_17))) / (SignalBuilder_76_992_time_2_18 - SignalBuilder_76_992_time_2_17))
211
	    else if (((__time_step >= SignalBuilder_76_992_time_2_19) or abs_real(__time_step - SignalBuilder_76_992_time_2_19) <= 0.000000000000001776356839400250) and ((__time_step < SignalBuilder_76_992_time_2_20) and abs_real(__time_step - SignalBuilder_76_992_time_2_20) > 0.000000000000001776356839400250)) then
212
		(((SignalBuilder_76_992_data_2_19 * (SignalBuilder_76_992_time_2_20 - __time_step)) + (SignalBuilder_76_992_data_2_20 * (__time_step - SignalBuilder_76_992_time_2_19))) / (SignalBuilder_76_992_time_2_20 - SignalBuilder_76_992_time_2_19))
213
	    else if (((__time_step >= SignalBuilder_76_992_time_2_20) or abs_real(__time_step - SignalBuilder_76_992_time_2_20) <= 0.000000000001818989403545856476) and ((__time_step < SignalBuilder_76_992_time_2_21) and abs_real(__time_step - SignalBuilder_76_992_time_2_21) > 0.000000000001818989403545856476)) then
214
		(((SignalBuilder_76_992_data_2_20 * (SignalBuilder_76_992_time_2_21 - __time_step)) + (SignalBuilder_76_992_data_2_21 * (__time_step - SignalBuilder_76_992_time_2_20))) / (SignalBuilder_76_992_time_2_21 - SignalBuilder_76_992_time_2_20))
215
	    else SignalBuilder_76_992_data_2_21;
216
	Out2_1 = SignalBuilder_1;
217
	Out1_1 = SignalBuilder_2;
218
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
219
	__nb_step = (0 -> ((pre __nb_step) + 1));
220
tel