Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (10.9 KB)

1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:33:16
5
(*
6
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP/DiscreteTransferFcn/DTFScalar/ForEach1
7
*)
8
node  ForEach1_18618_049(In1_1 : real;
9
	__time_step : real;
10
	__nb_step : int;)
11
returns(Out1_1 : real;);
12
var A_1 : real;
13
	A_2 : real;
14
	A_3 : real;
15
	A_4 : real;
16
	A_5 : real;
17
	A_6 : real;
18
	A_7 : real;
19
	A_8 : real;
20
	A_9 : real;
21
	B_1 : real;
22
	B_2 : real;
23
	B_3 : real;
24
	C_1 : real;
25
	C_2 : real;
26
	C_3 : real;
27
	D_1 : real;
28
	FinalSum_1 : real;
29
	Product_1 : real;
30
	Product1_1 : real;
31
	Product2_1 : real;
32
	Product2_2 : real;
33
	Product2_3 : real;
34
	Product3_1 : real;
35
	Product3_2 : real;
36
	Product3_3 : real;
37
	Sum1_1 : real;
38
	Sum1_2 : real;
39
	Sum1_3 : real;
40
	X0_1 : real;
41
	X0_2 : real;
42
	X0_3 : real;
43
let
44
	A_1 = -0.500000000000000;
45
	A_2 = 1.000000000000000;
46
	A_3 = 0.000000000000000;
47
	A_4 = -0.200000000000000;
48
	A_5 = 0.000000000000000;
49
	A_6 = 1.000000000000000;
50
	A_7 = -0.500000000000000;
51
	A_8 = 0.000000000000000;
52
	A_9 = 0.000000000000000;
53
	B_1 = 1.000000000000000;
54
	B_2 = 0.000000000000000;
55
	B_3 = 0.000000000000000;
56
	C_1 = 1.000000000000000;
57
	C_2 = 2.000000000000000;
58
	C_3 = 3.000000000000000;
59
	D_1 = 0.000000000000000;
60
	FinalSum_1 = 0.0 + Product1_1 + Product_1;
61
	Product_1 = 0.0 + (C_1 * X0_1) + (C_2 * X0_2) + (C_3 * X0_3);
62
	Product1_1 = 1.0 * D_1 * In1_1;
63
	Product2_1 = 1.0 * B_1 * In1_1;
64
	Product2_2 = 1.0 * B_2 * In1_1;
65
	Product2_3 = 1.0 * B_3 * In1_1;
66
	Product3_1 = 0.0 + (A_1 * X0_1) + (A_4 * X0_2) + (A_7 * X0_3);
67
	Product3_2 = 0.0 + (A_2 * X0_1) + (A_5 * X0_2) + (A_8 * X0_3);
68
	Product3_3 = 0.0 + (A_3 * X0_1) + (A_6 * X0_2) + (A_9 * X0_3);
69
	Sum1_1 = 0.0 + Product3_1 + Product2_1;
70
	Sum1_2 = 0.0 + Product3_2 + Product2_2;
71
	Sum1_3 = 0.0 + Product3_3 + Product2_3;
72
	X0_1 = (0.000000000000000 -> (pre Sum1_1));
73
	X0_2 = (0.000000000000000 -> (pre Sum1_2));
74
	X0_3 = (0.000000000000000 -> (pre Sum1_3));
75
	Out1_1 = FinalSum_1;
76
tel
77

    
78
(*
79
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP/DiscreteTransferFcn/DTFScalar/ForEach2
80
*)
81
node  ForEach2_18657_050(In1_1 : real;
82
	__time_step : real;
83
	__nb_step : int;)
84
returns(Out1_1 : real;);
85
var A_1 : real;
86
	A_2 : real;
87
	A_3 : real;
88
	A_4 : real;
89
	A_5 : real;
90
	A_6 : real;
91
	A_7 : real;
92
	A_8 : real;
93
	A_9 : real;
94
	B_1 : real;
95
	B_2 : real;
96
	B_3 : real;
97
	C_1 : real;
98
	C_2 : real;
99
	C_3 : real;
100
	D_1 : real;
101
	FinalSum_1 : real;
102
	Product_1 : real;
103
	Product1_1 : real;
104
	Product2_1 : real;
105
	Product2_2 : real;
106
	Product2_3 : real;
107
	Product3_1 : real;
108
	Product3_2 : real;
109
	Product3_3 : real;
110
	Sum1_1 : real;
111
	Sum1_2 : real;
112
	Sum1_3 : real;
113
	X0_1 : real;
114
	X0_2 : real;
115
	X0_3 : real;
116
let
117
	A_1 = -0.500000000000000;
118
	A_2 = 1.000000000000000;
119
	A_3 = 0.000000000000000;
120
	A_4 = -0.200000000000000;
121
	A_5 = 0.000000000000000;
122
	A_6 = 1.000000000000000;
123
	A_7 = -0.500000000000000;
124
	A_8 = 0.000000000000000;
125
	A_9 = 0.000000000000000;
126
	B_1 = 1.000000000000000;
127
	B_2 = 0.000000000000000;
128
	B_3 = 0.000000000000000;
129
	C_1 = 1.000000000000000;
130
	C_2 = 2.000000000000000;
131
	C_3 = 3.000000000000000;
132
	D_1 = 0.000000000000000;
133
	FinalSum_1 = 0.0 + Product1_1 + Product_1;
134
	Product_1 = 0.0 + (C_1 * X0_1) + (C_2 * X0_2) + (C_3 * X0_3);
135
	Product1_1 = 1.0 * D_1 * In1_1;
136
	Product2_1 = 1.0 * B_1 * In1_1;
137
	Product2_2 = 1.0 * B_2 * In1_1;
138
	Product2_3 = 1.0 * B_3 * In1_1;
139
	Product3_1 = 0.0 + (A_1 * X0_1) + (A_4 * X0_2) + (A_7 * X0_3);
140
	Product3_2 = 0.0 + (A_2 * X0_1) + (A_5 * X0_2) + (A_8 * X0_3);
141
	Product3_3 = 0.0 + (A_3 * X0_1) + (A_6 * X0_2) + (A_9 * X0_3);
142
	Sum1_1 = 0.0 + Product3_1 + Product2_1;
143
	Sum1_2 = 0.0 + Product3_2 + Product2_2;
144
	Sum1_3 = 0.0 + Product3_3 + Product2_3;
145
	X0_1 = (0.000000000000000 -> (pre Sum1_1));
146
	X0_2 = (0.000000000000000 -> (pre Sum1_2));
147
	X0_3 = (0.000000000000000 -> (pre Sum1_3));
148
	Out1_1 = FinalSum_1;
149
tel
150

    
151
(*
152
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP/DiscreteTransferFcn/DTFScalar
153
*)
154
node  DTFScalar_289_050(In1_1 : real;
155
	In1_2 : real;
156
	__time_step : real;
157
	__nb_step : int;)
158
returns(Out1_1 : real;
159
	Out1_2 : real;);
160
var Concatenate_1_1 : real;
161
	Concatenate_1_2 : real;
162
	ForEach1_1 : real;
163
	ForEach2_1 : real;
164
	Selector_1_In1_1 : real;
165
	Selector_2_In1_1 : real;
166
let
167
	Concatenate_1_1 = ForEach1_1;
168
	Concatenate_1_2 = ForEach2_1;
169
	ForEach1_1 = ForEach1_18618_049(Selector_1_In1_1, __time_step, __nb_step);
170
	ForEach2_1 = ForEach2_18657_050(Selector_2_In1_1, __time_step, __nb_step);
171
	Selector_1_In1_1 = In1_1;
172
	Selector_2_In1_1 = In1_2;
173
	Out1_1 = Concatenate_1_1;
174
	Out1_2 = Concatenate_1_2;
175
tel
176

    
177
(*
178
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP/DiscreteTransferFcn
179
*)
180
node  DiscreteTransferFcn_119_477(U_1 : real;
181
	U_2 : real;
182
	__time_step : real;
183
	__nb_step : int;)
184
returns(Y_1 : real;
185
	Y_2 : real;);
186
var DTFScalar_1 : real;
187
	DTFScalar_2 : real;
188
	Reshape_1 : real;
189
	Reshape_2 : real;
190
	ReverseReshape_1 : real;
191
	ReverseReshape_2 : real;
192
let
193
	(DTFScalar_1, DTFScalar_2) = DTFScalar_289_050(Reshape_1, Reshape_2, __time_step, __nb_step);
194
	Reshape_1 = U_1;
195
	Reshape_2 = U_2;
196
	ReverseReshape_1 = DTFScalar_1;
197
	ReverseReshape_2 = DTFScalar_2;
198
	Y_1 = ReverseReshape_1;
199
	Y_2 = ReverseReshape_2;
200
tel
201

    
202
(*
203
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP/DiscreteTransferFcn1/DTFScalar/ForEach1
204
*)
205
node  ForEach1_125_039(In1_1 : real;
206
	__time_step : real;
207
	__nb_step : int;)
208
returns(Out1_1 : real;);
209
var A_1 : real;
210
	A_2 : real;
211
	A_3 : real;
212
	A_4 : real;
213
	A_5 : real;
214
	A_6 : real;
215
	A_7 : real;
216
	A_8 : real;
217
	A_9 : real;
218
	B_1 : real;
219
	B_2 : real;
220
	B_3 : real;
221
	C_1 : real;
222
	C_2 : real;
223
	C_3 : real;
224
	D_1 : real;
225
	FinalSum_1 : real;
226
	Product_1 : real;
227
	Product1_1 : real;
228
	Product2_1 : real;
229
	Product2_2 : real;
230
	Product2_3 : real;
231
	Product3_1 : real;
232
	Product3_2 : real;
233
	Product3_3 : real;
234
	Sum1_1 : real;
235
	Sum1_2 : real;
236
	Sum1_3 : real;
237
	X0_1 : real;
238
	X0_2 : real;
239
	X0_3 : real;
240
let
241
	A_1 = -0.500000000000000;
242
	A_2 = 1.000000000000000;
243
	A_3 = 0.000000000000000;
244
	A_4 = -0.200000000000000;
245
	A_5 = 0.000000000000000;
246
	A_6 = 1.000000000000000;
247
	A_7 = -0.500000000000000;
248
	A_8 = 0.000000000000000;
249
	A_9 = 0.000000000000000;
250
	B_1 = 1.000000000000000;
251
	B_2 = 0.000000000000000;
252
	B_3 = 0.000000000000000;
253
	C_1 = 1.000000000000000;
254
	C_2 = 2.000000000000000;
255
	C_3 = 3.000000000000000;
256
	D_1 = 0.000000000000000;
257
	FinalSum_1 = 0.0 + Product1_1 + Product_1;
258
	Product_1 = 0.0 + (C_1 * X0_1) + (C_2 * X0_2) + (C_3 * X0_3);
259
	Product1_1 = 1.0 * D_1 * In1_1;
260
	Product2_1 = 1.0 * B_1 * In1_1;
261
	Product2_2 = 1.0 * B_2 * In1_1;
262
	Product2_3 = 1.0 * B_3 * In1_1;
263
	Product3_1 = 0.0 + (A_1 * X0_1) + (A_4 * X0_2) + (A_7 * X0_3);
264
	Product3_2 = 0.0 + (A_2 * X0_1) + (A_5 * X0_2) + (A_8 * X0_3);
265
	Product3_3 = 0.0 + (A_3 * X0_1) + (A_6 * X0_2) + (A_9 * X0_3);
266
	Sum1_1 = 0.0 + Product3_1 + Product2_1;
267
	Sum1_2 = 0.0 + Product3_2 + Product2_2;
268
	Sum1_3 = 0.0 + Product3_3 + Product2_3;
269
	X0_1 = (0.000000000000000 -> (pre Sum1_1));
270
	X0_2 = (0.000000000000000 -> (pre Sum1_2));
271
	X0_3 = (0.000000000000000 -> (pre Sum1_3));
272
	Out1_1 = FinalSum_1;
273
tel
274

    
275
(*
276
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP/DiscreteTransferFcn1/DTFScalar/ForEach2
277
*)
278
node  ForEach2_155_054(In1_1 : real;
279
	__time_step : real;
280
	__nb_step : int;)
281
returns(Out1_1 : real;);
282
var A_1 : real;
283
	A_2 : real;
284
	A_3 : real;
285
	A_4 : real;
286
	A_5 : real;
287
	A_6 : real;
288
	A_7 : real;
289
	A_8 : real;
290
	A_9 : real;
291
	B_1 : real;
292
	B_2 : real;
293
	B_3 : real;
294
	C_1 : real;
295
	C_2 : real;
296
	C_3 : real;
297
	D_1 : real;
298
	FinalSum_1 : real;
299
	Product_1 : real;
300
	Product1_1 : real;
301
	Product2_1 : real;
302
	Product2_2 : real;
303
	Product2_3 : real;
304
	Product3_1 : real;
305
	Product3_2 : real;
306
	Product3_3 : real;
307
	Sum1_1 : real;
308
	Sum1_2 : real;
309
	Sum1_3 : real;
310
	X0_1 : real;
311
	X0_2 : real;
312
	X0_3 : real;
313
let
314
	A_1 = -0.500000000000000;
315
	A_2 = 1.000000000000000;
316
	A_3 = 0.000000000000000;
317
	A_4 = -0.200000000000000;
318
	A_5 = 0.000000000000000;
319
	A_6 = 1.000000000000000;
320
	A_7 = -0.500000000000000;
321
	A_8 = 0.000000000000000;
322
	A_9 = 0.000000000000000;
323
	B_1 = 1.000000000000000;
324
	B_2 = 0.000000000000000;
325
	B_3 = 0.000000000000000;
326
	C_1 = 1.000000000000000;
327
	C_2 = 2.000000000000000;
328
	C_3 = 3.000000000000000;
329
	D_1 = 0.000000000000000;
330
	FinalSum_1 = 0.0 + Product1_1 + Product_1;
331
	Product_1 = 0.0 + (C_1 * X0_1) + (C_2 * X0_2) + (C_3 * X0_3);
332
	Product1_1 = 1.0 * D_1 * In1_1;
333
	Product2_1 = 1.0 * B_1 * In1_1;
334
	Product2_2 = 1.0 * B_2 * In1_1;
335
	Product2_3 = 1.0 * B_3 * In1_1;
336
	Product3_1 = 0.0 + (A_1 * X0_1) + (A_4 * X0_2) + (A_7 * X0_3);
337
	Product3_2 = 0.0 + (A_2 * X0_1) + (A_5 * X0_2) + (A_8 * X0_3);
338
	Product3_3 = 0.0 + (A_3 * X0_1) + (A_6 * X0_2) + (A_9 * X0_3);
339
	Sum1_1 = 0.0 + Product3_1 + Product2_1;
340
	Sum1_2 = 0.0 + Product3_2 + Product2_2;
341
	Sum1_3 = 0.0 + Product3_3 + Product2_3;
342
	X0_1 = (0.000000000000000 -> (pre Sum1_1));
343
	X0_2 = (0.000000000000000 -> (pre Sum1_2));
344
	X0_3 = (0.000000000000000 -> (pre Sum1_3));
345
	Out1_1 = FinalSum_1;
346
tel
347

    
348
(*
349
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP/DiscreteTransferFcn1/DTFScalar
350
*)
351
node  DTFScalar_122_695(In1_1 : real;
352
	In1_2 : real;
353
	__time_step : real;
354
	__nb_step : int;)
355
returns(Out1_1 : real;
356
	Out1_2 : real;);
357
var Concatenate_1_1 : real;
358
	Concatenate_1_2 : real;
359
	ForEach1_1 : real;
360
	ForEach2_1 : real;
361
	Selector_1_In1_1 : real;
362
	Selector_2_In1_1 : real;
363
let
364
	Concatenate_1_1 = ForEach1_1;
365
	Concatenate_1_2 = ForEach2_1;
366
	ForEach1_1 = ForEach1_125_039(Selector_1_In1_1, __time_step, __nb_step);
367
	ForEach2_1 = ForEach2_155_054(Selector_2_In1_1, __time_step, __nb_step);
368
	Selector_1_In1_1 = In1_1;
369
	Selector_2_In1_1 = In1_2;
370
	Out1_1 = Concatenate_1_1;
371
	Out1_2 = Concatenate_1_2;
372
tel
373

    
374
(*
375
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP/DiscreteTransferFcn1
376
*)
377
node  DiscreteTransferFcn1_120_050(U_1 : real;
378
	U_2 : real;
379
	__time_step : real;
380
	__nb_step : int;)
381
returns(Y_1 : real;
382
	Y_2 : real;);
383
var DTFScalar_1 : real;
384
	DTFScalar_2 : real;
385
	Reshape_1 : real;
386
	Reshape_2 : real;
387
	ReverseReshape_1 : real;
388
	ReverseReshape_2 : real;
389
let
390
	(DTFScalar_1, DTFScalar_2) = DTFScalar_122_695(Reshape_1, Reshape_2, __time_step, __nb_step);
391
	Reshape_1 = U_1;
392
	Reshape_2 = U_2;
393
	ReverseReshape_1 = DTFScalar_1;
394
	ReverseReshape_2 = DTFScalar_2;
395
	Y_1 = ReverseReshape_1;
396
	Y_2 = ReverseReshape_2;
397
tel
398

    
399
(*
400
Original block name: DiscreteTransferFcn_2_orig_vs_preprocessed_PP
401
*)
402
node  DiscreteTransferFcn_2_orig_vs_preprocessed_PP(_virtual : bool;)
403
returns(Out1_1 : real;
404
	Out1_2 : real;
405
	Out2_1 : real;
406
	Out2_2 : real;);
407
var Constant_1 : real;
408
	Constant_2 : real;
409
	DiscreteTransferFcn_1 : real;
410
	DiscreteTransferFcn_2 : real;
411
	DiscreteTransferFcn1_1 : real;
412
	DiscreteTransferFcn1_2 : real;
413
	__time_step : real;
414
	__nb_step : int;
415
let
416
	Constant_1 = 3.500000000000000;
417
	Constant_2 = 1.200000000000000;
418
	(DiscreteTransferFcn_1, DiscreteTransferFcn_2) = DiscreteTransferFcn_119_477(Constant_1, Constant_2, __time_step, __nb_step);
419
	(DiscreteTransferFcn1_1, DiscreteTransferFcn1_2) = DiscreteTransferFcn1_120_050(Constant_1, Constant_2, __time_step, __nb_step);
420
	Out1_1 = DiscreteTransferFcn_1;
421
	Out1_2 = DiscreteTransferFcn_2;
422
	Out2_1 = DiscreteTransferFcn1_1;
423
	Out2_2 = DiscreteTransferFcn1_2;
424
	__time_step = (0.0 -> ((pre __time_step) + 0.100000000000000));
425
	__nb_step = (0 -> ((pre __nb_step) + 1));
426
tel
427