Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / Simulink / src_many_files / EnablePort6_PP.LUSTREC.lus @ b58cc410

History | View | Annotate | Download (3.32 KB)

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

    
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 20-Mar-2019 13:42:16
5
(*
6
Original block name: EnablePort6_PP/Enabled_Counter/Subsystem
7
*)
8
node  Subsystem_30_931_condExecSS(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
	_isEnabled_clock : bool clock;
18
let
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)));
25
tel
26

    
27
(*
28
Original block name: EnablePort6_PP/Enabled_Counter/Subsystem
29
*)
30
node  Subsystem_30_931(In1_1 : real;
31
	Enable_1 : real;
32
	__time_step : real;
33
	__nb_step : int;)
34
returns(Out1_1 : real;
35
	Out2_1 : real;);
36
var Add_1 : real;
37
	UnitDelay_1 : real;
38
let
39
	Add_1 = 0.0 + In1_1 + UnitDelay_1;
40
	UnitDelay_1 = (0.0 -> (pre Add_1));
41
	Out1_1 = Add_1;
42
	Out2_1 = Enable_1;
43
tel
44

    
45
(*
46
Original block name: EnablePort6_PP/Enabled_Counter
47
*)
48
node  Enabled_Counter_18_598_condExecSS(In1_1 : real;
49
	_isEnabled : bool;
50
	__time_step : real;
51
	__nb_step : int;)
52
returns(Out1_1 : real;
53
	Out2_1 : real;
54
	Out3_1 : real;);
55
var pre_Out1_1 : real;
56
	pre_Out2_1 : real;
57
	pre_Out3_1 : real;
58
	_isEnabled_clock : bool clock;
59
let
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)));
67
tel
68

    
69
(*
70
Original block name: EnablePort6_PP/Enabled_Counter
71
*)
72
node  Enabled_Counter_18_598(In1_1 : real;
73
	__time_step : real;
74
	__nb_step : int;)
75
returns(Out1_1 : real;
76
	Out2_1 : real;
77
	Out3_1 : real;);
78
var Add_1 : real;
79
	ExecutionCond_of_Subsystem_30_931 : bool;
80
	Subsystem_1 : real;
81
	Subsystem_2 : real;
82
	UnitDelay_1 : real;
83
let
84
	Add_1 = 0.0 + In1_1 + UnitDelay_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));
88
	Out1_1 = Add_1;
89
	Out2_1 = Subsystem_1;
90
	Out3_1 = Subsystem_2;
91
tel
92

    
93
(*
94
Original block name: EnablePort6_PP
95
*)
96
node  EnablePort6_PP(In1_1 : real;
97
	Enable_1 : real;)
98
returns(Out1_1 : real;
99
	Out2_1 : real;
100
	Out3_1 : real;);
101
var ExecutionCond_of_Enabled_Counter_18_598 : bool;
102
	Enabled_Counter_1 : real;
103
	Enabled_Counter_2 : real;
104
	Enabled_Counter_3 : real;
105
	__time_step : real;
106
	__nb_step : int;
107
let
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);
110
	Out1_1 = Enabled_Counter_1;
111
	Out2_1 = Enabled_Counter_2;
112
	Out3_1 = Enabled_Counter_3;
113
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
114
	__nb_step = (0 -> ((pre __nb_step) + 1));
115
tel
116