Project

General

Profile

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

View differences:

regression_tests/lustre_files/success/Simulink/src_many_files/EnablePort3_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:14
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 20-Mar-2019 13:40:41
5 5
(*
6 6
Original block name: EnablePort3_PP/case_reset_reset_held
7 7
*)
8
node  case_reset_reset_held_39_080_automaton(Cpre_compx_1 : real;
8
node  case_reset_reset_held_18_597_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
	pre_Ccor_x_1 = 0.000000000000000;
18
	pre_Ccor_x_1 = 0.0;
18 19
	pre_pre_x_1 = if (__nb_step > 0) then
19 20
		(pre pre_x_1)
20
	    else 0.000000000000000;
21
	automaton enabled_case_reset_reset_held_39_080
22
	state Active_case_reset_reset_held_39_080:
23
	unless (not _isEnabled) restart Inactive_case_reset_reset_held_39_080
24
	let
25
		(Ccor_x_1, pre_x_1) = case_reset_reset_held_39_080(Cpre_compx_1, __time_step, __nb_step);
26
	tel
27

  
28
	state Inactive_case_reset_reset_held_39_080:
29
	unless _isEnabled restart Active_case_reset_reset_held_39_080
30
	let
31
		Ccor_x_1 = pre_Ccor_x_1;
32
		pre_x_1 = pre_pre_x_1;
33
	tel
34

  
35

  
21
	    else 0.0;
22
	_isEnabled_clock = _isEnabled;
23
	(Ccor_x_1, pre_x_1) = (merge _isEnabled_clock 
24
		(true -> (case_reset_reset_held_18_597((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)))))) 
25
		(false -> (pre_Ccor_x_1, pre_pre_x_1) when false(_isEnabled_clock)));
36 26
tel
37 27

  
38 28
(*
39 29
Original block name: EnablePort3_PP/case_reset_reset_held
40 30
*)
41
node  case_reset_reset_held_39_080(Cpre_compx_1 : real;
31
node  case_reset_reset_held_18_597(Cpre_compx_1 : real;
42 32
	__time_step : real;
43 33
	__nb_step : int;)
44 34
returns(Ccor_x_1 : real;
......
47 37
	UnitDelay_1 : real;
48 38
let
49 39
	Add_1 = 0.0 + Cpre_compx_1 + UnitDelay_1;
50
	UnitDelay_1 = (0.000000000000000 -> (pre Add_1));
40
	UnitDelay_1 = (0.0 -> (pre Add_1));
51 41
	Ccor_x_1 = Add_1;
52 42
	pre_x_1 = UnitDelay_1;
53 43
tel
......
59 49
	Enable_1 : real;)
60 50
returns(Out7_1 : real;
61 51
	pre_Out4_1 : real;);
62
var ExecutionCond_of_case_reset_reset_held_39_080 : bool;
52
var ExecutionCond_of_case_reset_reset_held_18_597 : bool;
63 53
	case_reset_reset_held_1 : real;
64 54
	case_reset_reset_held_2 : real;
65 55
	__time_step : real;
66 56
	__nb_step : int;
67 57
let
68
	ExecutionCond_of_case_reset_reset_held_39_080 = (Enable_1 > 0.0);
69
	(case_reset_reset_held_1, case_reset_reset_held_2) = case_reset_reset_held_39_080_automaton(In1_1, ExecutionCond_of_case_reset_reset_held_39_080, __time_step, __nb_step);
58
	ExecutionCond_of_case_reset_reset_held_18_597 = (Enable_1 > 0.0);
59
	(case_reset_reset_held_1, case_reset_reset_held_2) = case_reset_reset_held_18_597_condExecSS(In1_1, ExecutionCond_of_case_reset_reset_held_18_597, __time_step, __nb_step);
70 60
	Out7_1 = case_reset_reset_held_1;
71 61
	pre_Out4_1 = case_reset_reset_held_2;
72
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
62
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
73 63
	__nb_step = (0 -> ((pre __nb_step) + 1));
74 64
tel
75 65

  

Also available in: Unified diff