Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / regression_tests / lustre_files / success / Simulink / src_many_files / Clock_PP.LUSTREC.lus @ cd1faebc

History | View | Annotate | Download (1.56 KB)

1 4748b215 hbourbou
-- This file has been generated by CoCoSim2.
2
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:23:46
5
(*
6
Original block name: Clock_PP/EnabledSubsystem
7
*)
8
node  EnabledSubsystem_30_268_automaton(_isEnabled : bool;
9
	__time_step : real;
10
	__nb_step : int;)
11
returns(Out1_1 : real;);
12
var pre_Out1_1 : real;
13
let
14
	pre_Out1_1 = if (__nb_step > 0) then
15
		(pre Out1_1)
16
	    else 0.000000000000000;
17
	automaton enabled_EnabledSubsystem_30_268
18
	state Active_EnabledSubsystem_30_268:
19
	unless (not _isEnabled) restart Inactive_EnabledSubsystem_30_268
20
	let
21
		Out1_1 = EnabledSubsystem_30_268(__time_step, __nb_step);
22
	tel
23
24
	state Inactive_EnabledSubsystem_30_268:
25
	unless _isEnabled restart Active_EnabledSubsystem_30_268
26
	let
27
		Out1_1 = pre_Out1_1;
28
	tel
29
30
31
tel
32
33
(*
34
Original block name: Clock_PP/EnabledSubsystem
35
*)
36
node  EnabledSubsystem_30_268(__time_step : real;
37
	__nb_step : int;)
38
returns(Out1_1 : real;);
39
var Clock_1 : real;
40
let
41
	Clock_1 = __time_step;
42
	Out1_1 = Clock_1;
43
tel
44
45
(*
46
Original block name: Clock_PP
47
*)
48
node  Clock_PP(In1_1 : real;)
49
returns(Out1_1 : real;
50
	Out2_1 : real;);
51
var Clock_1 : real;
52
	ExecutionCond_of_EnabledSubsystem_30_268 : bool;
53
	EnabledSubsystem_1 : real;
54
	__time_step : real;
55
	__nb_step : int;
56
let
57
	Clock_1 = __time_step;
58
	ExecutionCond_of_EnabledSubsystem_30_268 = (In1_1 > 0.0);
59
	EnabledSubsystem_1 = EnabledSubsystem_30_268_automaton(ExecutionCond_of_EnabledSubsystem_30_268, __time_step, __nb_step);
60
	Out1_1 = EnabledSubsystem_1;
61
	Out2_1 = Clock_1;
62
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
63
	__nb_step = (0 -> ((pre __nb_step) + 1));
64
tel