Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (1.62 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:57
5
node  bool_to_int(x : bool;)
6
returns(y : int;);
7
let
8
	y = if x then
9
		1
10
	    else 0;
11
tel
12
13
(*
14
Original block name: CombinatorialLogic1_PP
15
*)
16
node  CombinatorialLogic1_PP(In1_1 : bool;
17
	In1_2 : bool;
18
	In1_3 : bool;)
19
returns(Out2_1 : real;
20
	Out2_2 : real;);
21
var C_1 : real;
22
	C_2 : real;
23
	row_index_C_14_501 : int;
24
	__time_step : real;
25
	__nb_step : int;
26
let
27
	row_index_C_14_501 = ( (bool_to_int(In1_3) * 1) + (bool_to_int(In1_2) * 2) + (bool_to_int(In1_1) * 4) + 1 );
28
	C_1 = if (row_index_C_14_501 = 1) then
29
		0.000000000000000
30
	    else if (row_index_C_14_501 = 2) then
31
		30.000000000000000
32
	    else if (row_index_C_14_501 = 3) then
33
		10.000000000000000
34
	    else if (row_index_C_14_501 = 4) then
35
		1.000000000000000
36
	    else if (row_index_C_14_501 = 5) then
37
		0.000000000000000
38
	    else if (row_index_C_14_501 = 6) then
39
		1.000000000000000
40
	    else if (row_index_C_14_501 = 7) then
41
		5.000000000000000
42
	    else 1.000000000000000;
43
	C_2 = if (row_index_C_14_501 = 1) then
44
		20.000000000000000
45
	    else if (row_index_C_14_501 = 2) then
46
		1.000000000000000
47
	    else if (row_index_C_14_501 = 3) then
48
		1.000000000000000
49
	    else if (row_index_C_14_501 = 4) then
50
		7.000000000000000
51
	    else if (row_index_C_14_501 = 5) then
52
		1.000000000000000
53
	    else if (row_index_C_14_501 = 6) then
54
		0.000000000000000
55
	    else if (row_index_C_14_501 = 7) then
56
		0.000000000000000
57
	    else 1.000000000000000;
58
	Out2_1 = C_1;
59
	Out2_2 = C_2;
60
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
61
	__nb_step = (0 -> ((pre __nb_step) + 1));
62
tel