Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.97 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:40:41
5
(*
6
Original block name: EnablePort3_PP/case_reset_reset_held
7
*)
8
node  case_reset_reset_held_18_597_condExecSS(Cpre_compx_1 : real;
9
	_isEnabled : bool;
10
	__time_step : real;
11
	__nb_step : int;)
12
returns(Ccor_x_1 : real;
13
	pre_x_1 : real;);
14
var pre_Ccor_x_1 : real;
15
	pre_pre_x_1 : real;
16
	_isEnabled_clock : bool clock;
17
let
18
	pre_Ccor_x_1 = 0.0;
19
	pre_pre_x_1 = if (__nb_step > 0) then
20
		(pre pre_x_1)
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)));
26
tel
27

    
28
(*
29
Original block name: EnablePort3_PP/case_reset_reset_held
30
*)
31
node  case_reset_reset_held_18_597(Cpre_compx_1 : real;
32
	__time_step : real;
33
	__nb_step : int;)
34
returns(Ccor_x_1 : real;
35
	pre_x_1 : real;);
36
var Add_1 : real;
37
	UnitDelay_1 : real;
38
let
39
	Add_1 = 0.0 + Cpre_compx_1 + UnitDelay_1;
40
	UnitDelay_1 = (0.0 -> (pre Add_1));
41
	Ccor_x_1 = Add_1;
42
	pre_x_1 = UnitDelay_1;
43
tel
44

    
45
(*
46
Original block name: EnablePort3_PP
47
*)
48
node  EnablePort3_PP(In1_1 : real;
49
	Enable_1 : real;)
50
returns(Out7_1 : real;
51
	pre_Out4_1 : real;);
52
var ExecutionCond_of_case_reset_reset_held_18_597 : bool;
53
	case_reset_reset_held_1 : real;
54
	case_reset_reset_held_2 : real;
55
	__time_step : real;
56
	__nb_step : int;
57
let
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);
60
	Out7_1 = case_reset_reset_held_1;
61
	pre_Out4_1 = case_reset_reset_held_2;
62
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
63
	__nb_step = (0 -> ((pre __nb_step) + 1));
64
tel
65