Project

General

Profile

Bug #77 ยป MinMaxRunningResettable1_PP.LUSTREC.lus

Hamza Bourbouh, 04/17/2019 02:26 AM

 
1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (nasa_toLustre.ToLustre.m)
4
-- Time: 16-Apr-2019 17:29:10
5
node  _min_real(x : real;
6
	y : real;)
7
returns(z : real;);
8
let
9
	z = if (x < y) then
10
		x
11
	    else y;
12
tel
13

    
14
(*
15
Original block name: MinMaxRunningResettable1_PP/MinMax
16
Running
17
Resettable/Unit Delay
18
With Preview
19
Resettable
20
*)
21
node  UnitDelayWithPreviewResettable_98_254(u_1 : real;
22
	R_1 : bool;
23
	__time_step : real;
24
	__nb_step : int;)
25
returns(y_1 : real;
26
	x_1 : real;);
27
var FixPtUnitDelay1_1 : real;
28
	InitialCondition_1 : real;
29
	Reset_1 : real;
30
let
31
	FixPtUnitDelay1_1 = (0.0 -> (pre Reset_1));
32
	InitialCondition_1 = 0.0;
33
	Reset_1 = if R_1 then
34
		InitialCondition_1
35
	    else u_1;
36
	y_1 = Reset_1;
37
	x_1 = FixPtUnitDelay1_1;
38
tel
39

    
40
(*
41
Original block name: MinMaxRunningResettable1_PP/MinMax
42
Running
43
Resettable
44
*)
45
node  MinMaxRunningResettable_87_491(u_1 : real;
46
	R_1 : bool;
47
	__time_step : real;
48
	__nb_step : int;)
49
returns(y_1 : real;);
50
var MinMax_1 : real;
51
	UnitDelayWithPreviewResettable_1 : real;
52
	UnitDelayWithPreviewResettable_2 : real;
53
let
54
	MinMax_1 = _min_real(u_1, UnitDelayWithPreviewResettable_2);
55
	(UnitDelayWithPreviewResettable_1, UnitDelayWithPreviewResettable_2) = UnitDelayWithPreviewResettable_98_254(MinMax_1, R_1, __time_step, __nb_step);
56
	y_1 = UnitDelayWithPreviewResettable_1;
57
tel
58

    
59
(*
60
Original block name: MinMaxRunningResettable1_PP
61
*)
62
node  MinMaxRunningResettable1_PP(In2_1 : real;)
63
returns(Out1_1 : real;);
64
var Constant_1 : bool;
65
	MinMaxRunningResettable_1 : real;
66
	__time_step : real;
67
	__nb_step : int;
68
let
69
	Constant_1 = false;
70
	MinMaxRunningResettable_1 = MinMaxRunningResettable_87_491(In2_1, Constant_1, __time_step, __nb_step);
71
	Out1_1 = MinMaxRunningResettable_1;
72
	__time_step = (0.0 -> ((pre __time_step) + 0.20));
73
	__nb_step = (0 -> ((pre __nb_step) + 1));
74
tel
75

    
    (1-1/1)