Project

General

Profile

Download (3.6 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:34:36
5
(*
6
Original block name: EnablePort5_PP/Enabled_Counter/Subsystem
7
*)
8
node  Subsystem_76_056_automaton(In1_1 : real;
9
	Enable_1 : real;
10
	_isEnabled : bool;
11
	__time_step : real;
12
	__nb_step : int;)
13
returns(Out1_1 : real;
14
	Out2_1 : real;);
15
var pre_Out1_1 : real;
16
	pre_Out2_1 : real;
17
let
18
	pre_Out1_1 = if (__nb_step > 0) then
19
		(pre Out1_1)
20
	    else 0.000000000000000;
21
	pre_Out2_1 = if (__nb_step > 0) then
22
		(pre Out2_1)
23
	    else 0.000000000000000;
24
	automaton enabled_Subsystem_76_056
25
	state Active_Subsystem_76_056:
26
	unless (not _isEnabled) restart Inactive_Subsystem_76_056
27
	let
28
		(Out1_1, Out2_1) = Subsystem_76_056(In1_1, Enable_1, __time_step, __nb_step);
29
	tel
30

    
31
	state Inactive_Subsystem_76_056:
32
	unless _isEnabled resume Active_Subsystem_76_056
33
	let
34
		Out1_1 = pre_Out1_1;
35
		Out2_1 = pre_Out2_1;
36
	tel
37

    
38

    
39
tel
40

    
41
(*
42
Original block name: EnablePort5_PP/Enabled_Counter/Subsystem
43
*)
44
node  Subsystem_76_056(In1_1 : real;
45
	Enable_1 : real;
46
	__time_step : real;
47
	__nb_step : int;)
48
returns(Out1_1 : real;
49
	Out2_1 : real;);
50
var Add_1 : real;
51
	UnitDelay_1 : real;
52
let
53
	Add_1 = 0.0 + In1_1 + UnitDelay_1;
54
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
55
	Out1_1 = Add_1;
56
	Out2_1 = Enable_1;
57
tel
58

    
59
(*
60
Original block name: EnablePort5_PP/Enabled_Counter
61
*)
62
node  Enabled_Counter_70_296_automaton(In1_1 : real;
63
	_isEnabled : bool;
64
	__time_step : real;
65
	__nb_step : int;)
66
returns(Out1_1 : real;
67
	Out2_1 : real;
68
	Out3_1 : real;);
69
var pre_Out1_1 : real;
70
	pre_Out2_1 : real;
71
	pre_Out3_1 : real;
72
let
73
	pre_Out1_1 = if (__nb_step > 0) then
74
		(pre Out1_1)
75
	    else 0.000000000000000;
76
	pre_Out2_1 = if (__nb_step > 0) then
77
		(pre Out2_1)
78
	    else 0.000000000000000;
79
	pre_Out3_1 = if (__nb_step > 0) then
80
		(pre Out3_1)
81
	    else 0.000000000000000;
82
	automaton enabled_Enabled_Counter_70_296
83
	state Active_Enabled_Counter_70_296:
84
	unless (not _isEnabled) restart Inactive_Enabled_Counter_70_296
85
	let
86
		(Out1_1, Out2_1, Out3_1) = Enabled_Counter_70_296(In1_1, __time_step, __nb_step);
87
	tel
88

    
89
	state Inactive_Enabled_Counter_70_296:
90
	unless _isEnabled resume Active_Enabled_Counter_70_296
91
	let
92
		Out1_1 = pre_Out1_1;
93
		Out2_1 = pre_Out2_1;
94
		Out3_1 = pre_Out3_1;
95
	tel
96

    
97

    
98
tel
99

    
100
(*
101
Original block name: EnablePort5_PP/Enabled_Counter
102
*)
103
node  Enabled_Counter_70_296(In1_1 : real;
104
	__time_step : real;
105
	__nb_step : int;)
106
returns(Out1_1 : real;
107
	Out2_1 : real;
108
	Out3_1 : real;);
109
var Add_1 : real;
110
	ExecutionCond_of_Subsystem_76_056 : bool;
111
	Subsystem_1 : real;
112
	Subsystem_2 : real;
113
	UnitDelay_1 : real;
114
let
115
	Add_1 = 0.0 + In1_1 + UnitDelay_1;
116
	ExecutionCond_of_Subsystem_76_056 = (In1_1 > 0.0);
117
	(Subsystem_1, Subsystem_2) = Subsystem_76_056_automaton(In1_1, In1_1, ExecutionCond_of_Subsystem_76_056, __time_step, __nb_step);
118
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
119
	Out1_1 = Add_1;
120
	Out2_1 = Subsystem_1;
121
	Out3_1 = Subsystem_2;
122
tel
123

    
124
(*
125
Original block name: EnablePort5_PP
126
*)
127
node  EnablePort5_PP(In1_1 : real;
128
	Enable_1 : real;)
129
returns(Out1_1 : real;
130
	Out2_1 : real;
131
	Out3_1 : real;);
132
var ExecutionCond_of_Enabled_Counter_70_296 : bool;
133
	Enabled_Counter_1 : real;
134
	Enabled_Counter_2 : real;
135
	Enabled_Counter_3 : real;
136
	__time_step : real;
137
	__nb_step : int;
138
let
139
	ExecutionCond_of_Enabled_Counter_70_296 = (Enable_1 > 0.0);
140
	(Enabled_Counter_1, Enabled_Counter_2, Enabled_Counter_3) = Enabled_Counter_70_296_automaton(In1_1, ExecutionCond_of_Enabled_Counter_70_296, __time_step, __nb_step);
141
	Out1_1 = Enabled_Counter_1;
142
	Out2_1 = Enabled_Counter_2;
143
	Out3_1 = Enabled_Counter_3;
144
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
145
	__nb_step = (0 -> ((pre __nb_step) + 1));
146
tel
147

    
(589-589/1153)