Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (2.01 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:06
5
(*
6
Original block name: EnablePort2_PP/case_reset_held_held
7
*)
8
node  case_reset_held_held_18_596_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 = if (__nb_step > 0) then
19
		(pre Ccor_x_1)
20
	    else 0.0;
21
	pre_pre_x_1 = if (__nb_step > 0) then
22
		(pre pre_x_1)
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)));
28
tel
29

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

    
47
(*
48
Original block name: EnablePort2_PP
49
*)
50
node  EnablePort2_PP(In1_1 : real;
51
	Enable_1 : real;)
52
returns(Out6_1 : real;
53
	pre_Out3_1 : real;);
54
var ExecutionCond_of_case_reset_held_held_18_596 : bool;
55
	case_reset_held_held_1 : real;
56
	case_reset_held_held_2 : real;
57
	__time_step : real;
58
	__nb_step : int;
59
let
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);
62
	Out6_1 = case_reset_held_held_1;
63
	pre_Out3_1 = case_reset_held_held_2;
64
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
65
	__nb_step = (0 -> ((pre __nb_step) + 1));
66
tel
67