Project

General

Profile

Download (4.09 KB) Statistics
| Branch: | Tag: | Revision:
1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:35:29
5
node  bool_to_real(x : bool;)
6
returns(y : real;);
7
let
8
	y = if x then
9
		1.0
10
	    else 0.0;
11
tel
12

    
13
(*
14
Original block name: enable_test3_PP/Subsystem1
15
*)
16
node  Subsystem1_66_067_automaton(In1_1 : real;
17
	Enable_1 : bool;
18
	_isEnabled : bool;
19
	__time_step : real;
20
	__nb_step : int;)
21
returns(Out1_1 : real;);
22
var pre_Out1_1 : real;
23
let
24
	pre_Out1_1 = if (__nb_step > 0) then
25
		(pre Out1_1)
26
	    else 0.000000000000000;
27
	automaton enabled_Subsystem1_66_067
28
	state Active_Subsystem1_66_067:
29
	unless (not _isEnabled) restart Inactive_Subsystem1_66_067
30
	let
31
		Out1_1 = Subsystem1_66_067(In1_1, Enable_1, __time_step, __nb_step);
32
	tel
33

    
34
	state Inactive_Subsystem1_66_067:
35
	unless _isEnabled restart Active_Subsystem1_66_067
36
	let
37
		Out1_1 = pre_Out1_1;
38
	tel
39

    
40

    
41
tel
42

    
43
(*
44
Original block name: enable_test3_PP/Subsystem1
45
*)
46
node  Subsystem1_66_067(In1_1 : real;
47
	Enable_1 : bool;
48
	__time_step : real;
49
	__nb_step : int;)
50
returns(Out1_1 : real;);
51
var Add_1 : real;
52
	UnitDelay_1 : real;
53
let
54
	Add_1 = 0.0 + bool_to_real(Enable_1) + In1_1;
55
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
56
	Out1_1 = UnitDelay_1;
57
tel
58

    
59
(*
60
Original block name: enable_test3_PP/Subsystem2
61
*)
62
node  Subsystem2_77_065_automaton(In1_1 : real;
63
	Enable_1 : bool;
64
	_isEnabled : bool;
65
	__time_step : real;
66
	__nb_step : int;)
67
returns(Out1_1 : real;);
68
var pre_Out1_1 : real;
69
let
70
	pre_Out1_1 = if (__nb_step > 0) then
71
		(pre Out1_1)
72
	    else 0.000000000000000;
73
	automaton enabled_Subsystem2_77_065
74
	state Active_Subsystem2_77_065:
75
	unless (not _isEnabled) restart Inactive_Subsystem2_77_065
76
	let
77
		Out1_1 = Subsystem2_77_065(In1_1, Enable_1, __time_step, __nb_step);
78
	tel
79

    
80
	state Inactive_Subsystem2_77_065:
81
	unless _isEnabled restart Active_Subsystem2_77_065
82
	let
83
		Out1_1 = pre_Out1_1;
84
	tel
85

    
86

    
87
tel
88

    
89
(*
90
Original block name: enable_test3_PP/Subsystem2
91
*)
92
node  Subsystem2_77_065(In1_1 : real;
93
	Enable_1 : bool;
94
	__time_step : real;
95
	__nb_step : int;)
96
returns(Out1_1 : real;);
97
var Add_1 : real;
98
	Memory_1 : real;
99
let
100
	Add_1 = 0.0 + bool_to_real(Enable_1) + In1_1;
101
	Memory_1 = (0.000000000000000 -> (pre Add_1));
102
	Out1_1 = Memory_1;
103
tel
104

    
105
(*
106
Original block name: enable_test3_PP/Subsystem3
107
*)
108
node  Subsystem3_87_284_automaton(In1_1 : real;
109
	Enable_1 : bool;
110
	_isEnabled : bool;
111
	__time_step : real;
112
	__nb_step : int;)
113
returns(Out1_1 : real;);
114
var pre_Out1_1 : real;
115
let
116
	pre_Out1_1 = if (__nb_step > 0) then
117
		(pre Out1_1)
118
	    else 0.000000000000000;
119
	automaton enabled_Subsystem3_87_284
120
	state Active_Subsystem3_87_284:
121
	unless (not _isEnabled) restart Inactive_Subsystem3_87_284
122
	let
123
		Out1_1 = Subsystem3_87_284(In1_1, Enable_1, __time_step, __nb_step);
124
	tel
125

    
126
	state Inactive_Subsystem3_87_284:
127
	unless _isEnabled resume Active_Subsystem3_87_284
128
	let
129
		Out1_1 = pre_Out1_1;
130
	tel
131

    
132

    
133
tel
134

    
135
(*
136
Original block name: enable_test3_PP/Subsystem3
137
*)
138
node  Subsystem3_87_284(In1_1 : real;
139
	Enable_1 : bool;
140
	__time_step : real;
141
	__nb_step : int;)
142
returns(Out1_1 : real;);
143
var Add_1 : real;
144
let
145
	Add_1 = 0.0 + bool_to_real(Enable_1) + In1_1;
146
	Out1_1 = Add_1;
147
tel
148

    
149
(*
150
Original block name: enable_test3_PP
151
*)
152
node  enable_test3_PP(In1_1 : real;
153
	In2_1 : bool;)
154
returns(Out1_1 : real;
155
	Out2_1 : real;
156
	Out3_1 : real;);
157
var ExecutionCond_of_Subsystem1_66_067 : bool;
158
	Subsystem1_1 : real;
159
	ExecutionCond_of_Subsystem2_77_065 : bool;
160
	Subsystem2_1 : real;
161
	ExecutionCond_of_Subsystem3_87_284 : bool;
162
	Subsystem3_1 : real;
163
	__time_step : real;
164
	__nb_step : int;
165
let
166
	ExecutionCond_of_Subsystem1_66_067 = In2_1;
167
	Subsystem1_1 = Subsystem1_66_067_automaton(In1_1, In2_1, ExecutionCond_of_Subsystem1_66_067, __time_step, __nb_step);
168
	ExecutionCond_of_Subsystem2_77_065 = In2_1;
169
	Subsystem2_1 = Subsystem2_77_065_automaton(In1_1, In2_1, ExecutionCond_of_Subsystem2_77_065, __time_step, __nb_step);
170
	ExecutionCond_of_Subsystem3_87_284 = In2_1;
171
	Subsystem3_1 = Subsystem3_87_284_automaton(In1_1, In2_1, ExecutionCond_of_Subsystem3_87_284, __time_step, __nb_step);
172
	Out1_1 = Subsystem1_1;
173
	Out2_1 = Subsystem2_1;
174
	Out3_1 = Subsystem3_1;
175
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
176
	__nb_step = (0 -> ((pre __nb_step) + 1));
177
tel
178

    
(1055-1055/1153)