Project

General

Profile

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

View differences:

regression_tests/lustre_files/success/Simulink/src_many_files/EnablePort4_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:25
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 20-Mar-2019 13:41:12
5 5
(*
6 6
Original block name: EnablePort4_PP/case_held_held_held
7 7
*)
8
node  case_held_held_held_45_285_automaton(Cpre_compx_1 : real;
8
node  case_held_held_held_18_597_condExecSS(Cpre_compx_1 : real;
9 9
	Enable_1 : real;
10 10
	_isEnabled : bool;
11 11
	__time_step : real;
......
16 16
var pre_Ccor_x_1 : real;
17 17
	pre_pre_x_1 : real;
18 18
	pre_Out1_1 : real;
19
	_isEnabled_clock : bool clock;
19 20
let
20 21
	pre_Ccor_x_1 = if (__nb_step > 0) then
21 22
		(pre Ccor_x_1)
22
	    else 0.000000000000000;
23
	    else 0.0;
23 24
	pre_pre_x_1 = if (__nb_step > 0) then
24 25
		(pre pre_x_1)
25
	    else 0.000000000000000;
26
	    else 0.0;
26 27
	pre_Out1_1 = if (__nb_step > 0) then
27 28
		(pre Out1_1)
28
	    else 0.000000000000000;
29
	automaton enabled_case_held_held_held_45_285
30
	state Active_case_held_held_held_45_285:
31
	unless (not _isEnabled) restart Inactive_case_held_held_held_45_285
32
	let
33
		(Ccor_x_1, pre_x_1, Out1_1) = case_held_held_held_45_285(Cpre_compx_1, Enable_1, __time_step, __nb_step);
34
	tel
35

  
36
	state Inactive_case_held_held_held_45_285:
37
	unless _isEnabled resume Active_case_held_held_held_45_285
38
	let
39
		Ccor_x_1 = pre_Ccor_x_1;
40
		pre_x_1 = pre_pre_x_1;
41
		Out1_1 = pre_Out1_1;
42
	tel
43

  
44

  
29
	    else 0.0;
30
	_isEnabled_clock = _isEnabled;
31
	(Ccor_x_1, pre_x_1, Out1_1) = (merge _isEnabled_clock 
32
		(true -> case_held_held_held_18_597((Cpre_compx_1 when _isEnabled_clock), (Enable_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock))) 
33
		(false -> (pre_Ccor_x_1, pre_pre_x_1, pre_Out1_1) when false(_isEnabled_clock)));
45 34
tel
46 35

  
47 36
(*
48 37
Original block name: EnablePort4_PP/case_held_held_held
49 38
*)
50
node  case_held_held_held_45_285(Cpre_compx_1 : real;
39
node  case_held_held_held_18_597(Cpre_compx_1 : real;
51 40
	Enable_1 : real;
52 41
	__time_step : real;
53 42
	__nb_step : int;)
......
59 48
	UnitDelay1_1 : real;
60 49
let
61 50
	Add_1 = 0.0 + Cpre_compx_1 + UnitDelay_1;
62
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
63
	UnitDelay1_1 = (0.000000000000000 -> (pre Cpre_compx_1));
51
	UnitDelay_1 = (0.0 -> (pre Add_1));
52
	UnitDelay1_1 = (0.0 -> (pre Cpre_compx_1));
64 53
	Ccor_x_1 = Add_1;
65 54
	pre_x_1 = UnitDelay1_1;
66 55
	Out1_1 = Enable_1;
......
74 63
returns(Out1_1 : real;
75 64
	Out2_1 : real;
76 65
	Out3_1 : real;);
77
var ExecutionCond_of_case_held_held_held_45_285 : bool;
66
var ExecutionCond_of_case_held_held_held_18_597 : bool;
78 67
	case_held_held_held_1 : real;
79 68
	case_held_held_held_2 : real;
80 69
	case_held_held_held_3 : real;
81 70
	__time_step : real;
82 71
	__nb_step : int;
83 72
let
84
	ExecutionCond_of_case_held_held_held_45_285 = (In1_1 > 0.0);
85
	(case_held_held_held_1, case_held_held_held_2, case_held_held_held_3) = case_held_held_held_45_285_automaton(In2_1, In1_1, ExecutionCond_of_case_held_held_held_45_285, __time_step, __nb_step);
73
	ExecutionCond_of_case_held_held_held_18_597 = (In1_1 > 0.0);
74
	(case_held_held_held_1, case_held_held_held_2, case_held_held_held_3) = case_held_held_held_18_597_condExecSS(In2_1, In1_1, ExecutionCond_of_case_held_held_held_18_597, __time_step, __nb_step);
86 75
	Out1_1 = case_held_held_held_1;
87 76
	Out2_1 = case_held_held_held_2;
88 77
	Out3_1 = case_held_held_held_3;
89
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
78
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
90 79
	__nb_step = (0 -> ((pre __nb_step) + 1));
91 80
tel
92 81

  

Also available in: Unified diff