Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (2.65 KB)

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

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:50:55
5
#open <conv>
6
(*
7
Original block name: MultiPortSwitch_4_PP
8
*)
9
node  MultiPortSwitch_4_PP(In1_1 : real;
10
	In1_2 : real;
11
	In1_3 : real;
12
	In1_4 : real;
13
	In1_5 : real;
14
	In1_6 : real;
15
	In2_1 : real;
16
	In2_2 : real;
17
	In2_3 : real;
18
	In2_4 : real;
19
	In2_5 : real;
20
	In2_6 : real;
21
	In3_1 : real;
22
	In3_2 : real;
23
	In3_3 : real;
24
	In3_4 : real;
25
	In3_5 : real;
26
	In3_6 : real;
27
	In4_1 : real;
28
	In4_2 : real;
29
	In4_3 : real;
30
	In4_4 : real;
31
	In4_5 : real;
32
	In4_6 : real;)
33
returns(Out3_1 : real;
34
	Out3_2 : real;
35
	Out3_3 : real;
36
	Out3_4 : real;
37
	Out3_5 : real;
38
	Out3_6 : real;);
39
var Constant14_1 : real;
40
	MultiportSwitch3_1 : real;
41
	MultiportSwitch3_2 : real;
42
	MultiportSwitch3_3 : real;
43
	MultiportSwitch3_4 : real;
44
	MultiportSwitch3_5 : real;
45
	MultiportSwitch3_6 : real;
46
	MultiportSwitch3_44_530_portIndex : int;
47
	__time_step : real;
48
	__nb_step : int;
49
let
50
	Constant14_1 = 3.000000000000000;
51
	MultiportSwitch3_44_530_portIndex = (real_to_int(Constant14_1) + 0);
52
	MultiportSwitch3_1 = if (MultiportSwitch3_44_530_portIndex = 1) then
53
		In1_1
54
	    else if (MultiportSwitch3_44_530_portIndex = 2) then
55
		In2_1
56
	    else if (MultiportSwitch3_44_530_portIndex = 3) then
57
		In3_1
58
	    else In4_1;
59
	MultiportSwitch3_2 = if (MultiportSwitch3_44_530_portIndex = 1) then
60
		In1_2
61
	    else if (MultiportSwitch3_44_530_portIndex = 2) then
62
		In2_2
63
	    else if (MultiportSwitch3_44_530_portIndex = 3) then
64
		In3_2
65
	    else In4_2;
66
	MultiportSwitch3_3 = if (MultiportSwitch3_44_530_portIndex = 1) then
67
		In1_3
68
	    else if (MultiportSwitch3_44_530_portIndex = 2) then
69
		In2_3
70
	    else if (MultiportSwitch3_44_530_portIndex = 3) then
71
		In3_3
72
	    else In4_3;
73
	MultiportSwitch3_4 = if (MultiportSwitch3_44_530_portIndex = 1) then
74
		In1_4
75
	    else if (MultiportSwitch3_44_530_portIndex = 2) then
76
		In2_4
77
	    else if (MultiportSwitch3_44_530_portIndex = 3) then
78
		In3_4
79
	    else In4_4;
80
	MultiportSwitch3_5 = if (MultiportSwitch3_44_530_portIndex = 1) then
81
		In1_5
82
	    else if (MultiportSwitch3_44_530_portIndex = 2) then
83
		In2_5
84
	    else if (MultiportSwitch3_44_530_portIndex = 3) then
85
		In3_5
86
	    else In4_5;
87
	MultiportSwitch3_6 = if (MultiportSwitch3_44_530_portIndex = 1) then
88
		In1_6
89
	    else if (MultiportSwitch3_44_530_portIndex = 2) then
90
		In2_6
91
	    else if (MultiportSwitch3_44_530_portIndex = 3) then
92
		In3_6
93
	    else In4_6;
94
	Out3_1 = MultiportSwitch3_1;
95
	Out3_2 = MultiportSwitch3_2;
96
	Out3_3 = MultiportSwitch3_3;
97
	Out3_4 = MultiportSwitch3_4;
98
	Out3_5 = MultiportSwitch3_5;
99
	Out3_6 = MultiportSwitch3_6;
100
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
101
	__nb_step = (0 -> ((pre __nb_step) + 1));
102
tel
103