Project

General

Profile

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

View differences:

regression_tests/lustre_files/success/Simulink/src_many_files/EnablePort2_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:06
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 20-Mar-2019 13:40:06
5 5
(*
6 6
Original block name: EnablePort2_PP/case_reset_held_held
7 7
*)
8
node  case_reset_held_held_39_080_automaton(Cpre_compx_1 : real;
8
node  case_reset_held_held_18_596_condExecSS(Cpre_compx_1 : real;
9 9
	_isEnabled : bool;
10 10
	__time_step : real;
11 11
	__nb_step : int;)
......
13 13
	pre_x_1 : real;);
14 14
var pre_Ccor_x_1 : real;
15 15
	pre_pre_x_1 : real;
16
	_isEnabled_clock : bool clock;
16 17
let
17 18
	pre_Ccor_x_1 = if (__nb_step > 0) then
18 19
		(pre Ccor_x_1)
19
	    else 0.000000000000000;
20
	    else 0.0;
20 21
	pre_pre_x_1 = if (__nb_step > 0) then
21 22
		(pre pre_x_1)
22
	    else 0.000000000000000;
23
	automaton enabled_case_reset_held_held_39_080
24
	state Active_case_reset_held_held_39_080:
25
	unless (not _isEnabled) restart Inactive_case_reset_held_held_39_080
26
	let
27
		(Ccor_x_1, pre_x_1) = case_reset_held_held_39_080(Cpre_compx_1, __time_step, __nb_step);
28
	tel
29

  
30
	state Inactive_case_reset_held_held_39_080:
31
	unless _isEnabled restart Active_case_reset_held_held_39_080
32
	let
33
		Ccor_x_1 = pre_Ccor_x_1;
34
		pre_x_1 = pre_pre_x_1;
35
	tel
36

  
37

  
23
	    else 0.0;
24
	_isEnabled_clock = _isEnabled;
25
	(Ccor_x_1, pre_x_1) = (merge _isEnabled_clock 
26
		(true -> (case_reset_held_held_18_596((Cpre_compx_1 when _isEnabled_clock), (__time_step when _isEnabled_clock), (__nb_step when _isEnabled_clock)) every (false -> (_isEnabled_clock and (not (pre _isEnabled_clock)))))) 
27
		(false -> (pre_Ccor_x_1, pre_pre_x_1) when false(_isEnabled_clock)));
38 28
tel
39 29

  
40 30
(*
41 31
Original block name: EnablePort2_PP/case_reset_held_held
42 32
*)
43
node  case_reset_held_held_39_080(Cpre_compx_1 : real;
33
node  case_reset_held_held_18_596(Cpre_compx_1 : real;
44 34
	__time_step : real;
45 35
	__nb_step : int;)
46 36
returns(Ccor_x_1 : real;
......
49 39
	UnitDelay_1 : real;
50 40
let
51 41
	Add_1 = 0.0 + Cpre_compx_1 + UnitDelay_1;
52
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
42
	UnitDelay_1 = (0.0 -> (pre Add_1));
53 43
	Ccor_x_1 = Add_1;
54 44
	pre_x_1 = UnitDelay_1;
55 45
tel
......
61 51
	Enable_1 : real;)
62 52
returns(Out6_1 : real;
63 53
	pre_Out3_1 : real;);
64
var ExecutionCond_of_case_reset_held_held_39_080 : bool;
54
var ExecutionCond_of_case_reset_held_held_18_596 : bool;
65 55
	case_reset_held_held_1 : real;
66 56
	case_reset_held_held_2 : real;
67 57
	__time_step : real;
68 58
	__nb_step : int;
69 59
let
70
	ExecutionCond_of_case_reset_held_held_39_080 = (Enable_1 > 0.0);
71
	(case_reset_held_held_1, case_reset_held_held_2) = case_reset_held_held_39_080_automaton(In1_1, ExecutionCond_of_case_reset_held_held_39_080, __time_step, __nb_step);
60
	ExecutionCond_of_case_reset_held_held_18_596 = (Enable_1 > 0.0);
61
	(case_reset_held_held_1, case_reset_held_held_2) = case_reset_held_held_18_596_condExecSS(In1_1, ExecutionCond_of_case_reset_held_held_18_596, __time_step, __nb_step);
72 62
	Out6_1 = case_reset_held_held_1;
73 63
	pre_Out3_1 = case_reset_held_held_2;
74
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
64
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
75 65
	__nb_step = (0 -> ((pre __nb_step) + 1));
76 66
tel
77 67

  

Also available in: Unified diff