Project

General

Profile

Revision b58cc410 regression_tests/lustre_files/success/Simulink/src_many_files/EnablePort6_PP.LUSTREC.lus

View differences:

regression_tests/lustre_files/success/Simulink/src_many_files/EnablePort6_PP.LUSTREC.lus
1 1
-- This file has been generated by CoCoSim2.
2 2

  
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:34:45
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 20-Mar-2019 13:42:16
5 5
(*
6 6
Original block name: EnablePort6_PP/Enabled_Counter/Subsystem
7 7
*)
8
node  Subsystem_76_056_automaton(In1_1 : real;
8
node  Subsystem_30_931_condExecSS(In1_1 : real;
9 9
	Enable_1 : real;
10 10
	_isEnabled : bool;
11 11
	__time_step : real;
......
14 14
	Out2_1 : real;);
15 15
var pre_Out1_1 : real;
16 16
	pre_Out2_1 : real;
17
	_isEnabled_clock : bool clock;
17 18
let
18
	pre_Out1_1 = 1.000000000000000;
19
	pre_Out2_1 = 1.000000000000000;
20
	automaton enabled_Subsystem_76_056
21
	state Active_Subsystem_76_056:
22
	unless (not _isEnabled) restart Inactive_Subsystem_76_056
23
	let
24
		(Out1_1, Out2_1) = Subsystem_76_056(In1_1, Enable_1, __time_step, __nb_step);
25
	tel
26

  
27
	state Inactive_Subsystem_76_056:
28
	unless _isEnabled restart Active_Subsystem_76_056
29
	let
30
		Out1_1 = pre_Out1_1;
31
		Out2_1 = pre_Out2_1;
32
	tel
33

  
34

  
19
	pre_Out1_1 = 1.0;
20
	pre_Out2_1 = 1.0;
21
	_isEnabled_clock = _isEnabled;
22
	(Out1_1, Out2_1) = (merge _isEnabled_clock 
23
		(true -> (Subsystem_30_931((In1_1 when _isEnabled_clock), (Enable_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock)) every (false -> (_isEnabled_clock and (not (pre _isEnabled_clock)))))) 
24
		(false -> (pre_Out1_1, pre_Out2_1) when false(_isEnabled_clock)));
35 25
tel
36 26

  
37 27
(*
38 28
Original block name: EnablePort6_PP/Enabled_Counter/Subsystem
39 29
*)
40
node  Subsystem_76_056(In1_1 : real;
30
node  Subsystem_30_931(In1_1 : real;
41 31
	Enable_1 : real;
42 32
	__time_step : real;
43 33
	__nb_step : int;)
......
47 37
	UnitDelay_1 : real;
48 38
let
49 39
	Add_1 = 0.0 + In1_1 + UnitDelay_1;
50
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
40
	UnitDelay_1 = (0.0 -> (pre Add_1));
51 41
	Out1_1 = Add_1;
52 42
	Out2_1 = Enable_1;
53 43
tel
......
55 45
(*
56 46
Original block name: EnablePort6_PP/Enabled_Counter
57 47
*)
58
node  Enabled_Counter_70_296_automaton(In1_1 : real;
48
node  Enabled_Counter_18_598_condExecSS(In1_1 : real;
59 49
	_isEnabled : bool;
60 50
	__time_step : real;
61 51
	__nb_step : int;)
......
65 55
var pre_Out1_1 : real;
66 56
	pre_Out2_1 : real;
67 57
	pre_Out3_1 : real;
58
	_isEnabled_clock : bool clock;
68 59
let
69
	pre_Out1_1 = 1.000000000000000;
70
	pre_Out2_1 = 1.000000000000000;
71
	pre_Out3_1 = 1.000000000000000;
72
	automaton enabled_Enabled_Counter_70_296
73
	state Active_Enabled_Counter_70_296:
74
	unless (not _isEnabled) restart Inactive_Enabled_Counter_70_296
75
	let
76
		(Out1_1, Out2_1, Out3_1) = Enabled_Counter_70_296(In1_1, __time_step, __nb_step);
77
	tel
78

  
79
	state Inactive_Enabled_Counter_70_296:
80
	unless _isEnabled restart Active_Enabled_Counter_70_296
81
	let
82
		Out1_1 = pre_Out1_1;
83
		Out2_1 = pre_Out2_1;
84
		Out3_1 = pre_Out3_1;
85
	tel
86

  
87

  
60
	pre_Out1_1 = 1.0;
61
	pre_Out2_1 = 1.0;
62
	pre_Out3_1 = 1.0;
63
	_isEnabled_clock = _isEnabled;
64
	(Out1_1, Out2_1, Out3_1) = (merge _isEnabled_clock 
65
		(true -> (Enabled_Counter_18_598((In1_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock)) every (false -> (_isEnabled_clock and (not (pre _isEnabled_clock)))))) 
66
		(false -> (pre_Out1_1, pre_Out2_1, pre_Out3_1) when false(_isEnabled_clock)));
88 67
tel
89 68

  
90 69
(*
91 70
Original block name: EnablePort6_PP/Enabled_Counter
92 71
*)
93
node  Enabled_Counter_70_296(In1_1 : real;
72
node  Enabled_Counter_18_598(In1_1 : real;
94 73
	__time_step : real;
95 74
	__nb_step : int;)
96 75
returns(Out1_1 : real;
97 76
	Out2_1 : real;
98 77
	Out3_1 : real;);
99 78
var Add_1 : real;
100
	ExecutionCond_of_Subsystem_76_056 : bool;
79
	ExecutionCond_of_Subsystem_30_931 : bool;
101 80
	Subsystem_1 : real;
102 81
	Subsystem_2 : real;
103 82
	UnitDelay_1 : real;
104 83
let
105 84
	Add_1 = 0.0 + In1_1 + UnitDelay_1;
106
	ExecutionCond_of_Subsystem_76_056 = (In1_1 > 0.0);
107
	(Subsystem_1, Subsystem_2) = Subsystem_76_056_automaton(In1_1, In1_1, ExecutionCond_of_Subsystem_76_056, __time_step, __nb_step);
108
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
85
	ExecutionCond_of_Subsystem_30_931 = (In1_1 > 0.0);
86
	(Subsystem_1, Subsystem_2) = Subsystem_30_931_condExecSS(In1_1, In1_1, ExecutionCond_of_Subsystem_30_931, __time_step, __nb_step);
87
	UnitDelay_1 = (0.0 -> (pre Add_1));
109 88
	Out1_1 = Add_1;
110 89
	Out2_1 = Subsystem_1;
111 90
	Out3_1 = Subsystem_2;
......
119 98
returns(Out1_1 : real;
120 99
	Out2_1 : real;
121 100
	Out3_1 : real;);
122
var ExecutionCond_of_Enabled_Counter_70_296 : bool;
101
var ExecutionCond_of_Enabled_Counter_18_598 : bool;
123 102
	Enabled_Counter_1 : real;
124 103
	Enabled_Counter_2 : real;
125 104
	Enabled_Counter_3 : real;
126 105
	__time_step : real;
127 106
	__nb_step : int;
128 107
let
129
	ExecutionCond_of_Enabled_Counter_70_296 = (Enable_1 > 0.0);
130
	(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);
108
	ExecutionCond_of_Enabled_Counter_18_598 = (Enable_1 > 0.0);
109
	(Enabled_Counter_1, Enabled_Counter_2, Enabled_Counter_3) = Enabled_Counter_18_598_condExecSS(In1_1, ExecutionCond_of_Enabled_Counter_18_598, __time_step, __nb_step);
131 110
	Out1_1 = Enabled_Counter_1;
132 111
	Out2_1 = Enabled_Counter_2;
133 112
	Out3_1 = Enabled_Counter_3;
134
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
113
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
135 114
	__nb_step = (0 -> ((pre __nb_step) + 1));
136 115
tel
137 116

  

Also available in: Unified diff