Project

General

Profile

Download (2.07 KB) Statistics
| Branch: | Tag: | Revision:
1
-- This file has been generated by CoCoSim2.
2

    
3
-- Compiler: Lustre compiler 2 (ToLustre.m)
4
-- Time: 03-Dec-2018 22:20:42
5
node  _AND_Bitwise_Unsigned_8(x : int;
6
	y : int;)
7
returns(z : int;);
8
let
9
	z = ( ((x mod 2) * (y mod 2)) + ( 2 * ((x / 2) mod 2) * ((y / 2) mod 2) ) + ( 4 * ((x / 4) mod 2) * ((y / 4) mod 2) ) + ( 8 * ((x / 8) mod 2) * ((y / 8) mod 2) ) + ( 16 * ((x / 16) mod 2) * ((y / 16) mod 2) ) + ( 32 * ((x / 32) mod 2) * ((y / 32) mod 2) ) + ( 64 * ((x / 64) mod 2) * ((y / 64) mod 2) ) + ( 128 * ((x / 128) mod 2) * ((y / 128) mod 2) ) );
10
tel
11

    
12
node  _NAND_Bitwise_Unsigned_8(x : int;
13
	y : int;)
14
returns(z : int;);
15
let
16
	z = _NOT_Bitwise_Unsigned_8(_AND_Bitwise_Unsigned_8(x, y));
17
tel
18

    
19
node  _NOT_Bitwise_Unsigned_8(x : int;)
20
returns(y : int;);
21
let
22
	y = (255 - x);
23
tel
24

    
25
(*
26
Original block name: BitwiseNAND_uint8_PP
27
*)
28
node  BitwiseNAND_uint8_PP(In1_1 : int;
29
	In2_1 : int;
30
	In3_1 : int;
31
	In4_1 : int;
32
	In4_2 : int;
33
	In4_3 : int;
34
	In5_1 : int;
35
	In5_2 : int;
36
	In5_3 : int;
37
	In6_1 : int;
38
	In6_2 : int;
39
	In6_3 : int;)
40
returns(Out1_1 : int;
41
	Out2_1 : int;
42
	Out2_2 : int;
43
	Out2_3 : int;
44
	Out3_1 : int;
45
	Out3_2 : int;
46
	Out3_3 : int;
47
	Out4_1 : int;);
48
var Bitwise_1 : int;
49
	Bitwise1_1 : int;
50
	Bitwise1_2 : int;
51
	Bitwise1_3 : int;
52
	Bitwise2_1 : int;
53
	Bitwise2_2 : int;
54
	Bitwise2_3 : int;
55
	Bitwise3_1 : int;
56
	__time_step : real;
57
	__nb_step : int;
58
let
59
	Bitwise_1 = _NAND_Bitwise_Unsigned_8(In1_1, In2_1);
60
	Bitwise1_1 = _NAND_Bitwise_Unsigned_8(In3_1, In4_1);
61
	Bitwise1_2 = _NAND_Bitwise_Unsigned_8(In3_1, In4_2);
62
	Bitwise1_3 = _NAND_Bitwise_Unsigned_8(In3_1, In4_3);
63
	Bitwise2_1 = _NAND_Bitwise_Unsigned_8(In5_1, 217);
64
	Bitwise2_2 = _NAND_Bitwise_Unsigned_8(In5_2, 217);
65
	Bitwise2_3 = _NAND_Bitwise_Unsigned_8(In5_3, 217);
66
	Bitwise3_1 = _NOT_Bitwise_Unsigned_8(_AND_Bitwise_Unsigned_8(In6_1, _AND_Bitwise_Unsigned_8(In6_2, In6_3)));
67
	Out1_1 = Bitwise_1;
68
	Out2_1 = Bitwise1_1;
69
	Out2_2 = Bitwise1_2;
70
	Out2_3 = Bitwise1_3;
71
	Out3_1 = Bitwise2_1;
72
	Out3_2 = Bitwise2_2;
73
	Out3_3 = Bitwise2_3;
74
	Out4_1 = Bitwise3_1;
75
	__time_step = (0.0 -> ((pre __time_step) + 0.200000000000000));
76
	__nb_step = (0 -> ((pre __nb_step) + 1));
77
tel
78

    
(157-157/1153)