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

History | View | Annotate | Download (3.81 KB)

1 | 4748b215 | hbourbou | -- This file has been generated by CoCoSim2. |
---|---|---|---|

2 | |||

3 | -- Compiler: Lustre compiler 2 (ToLustre.m) |
||

4 | -- Time: 03-Dec-2018 23:10:06 |
||

5 | (* |
||

6 | Original block name: SampleTimeMath_PP/WeightedSampleTime |
||

7 | *) |
||

8 | node WeightedSampleTime_94_779(u_1 : real; |
||

9 | __time_step : real; |
||

10 | __nb_step : int;) |
||

11 | returns(Out1_1 : real;); |
||

12 | var Add_1 : real; |
||

13 | Product_1 : real; |
||

14 | Ts_1 : real; |
||

15 | weightValue_1 : real; |
||

16 | let |
||

17 | Add_1 = 0.0 + u_1 + Product_1; |
||

18 | Product_1 = 1.0 * weightValue_1 * Ts_1; |
||

19 | Ts_1 = 0.200000000000000; |
||

20 | weightValue_1 = 2.000000000000000; |
||

21 | Out1_1 = Add_1; |
||

22 | tel |
||

23 | |||

24 | (* |
||

25 | Original block name: SampleTimeMath_PP/WeightedSampleTime1 |
||

26 | *) |
||

27 | node WeightedSampleTime1_95_101(u_1 : real; |
||

28 | __time_step : real; |
||

29 | __nb_step : int;) |
||

30 | returns(Out1_1 : real;); |
||

31 | var Add_1 : real; |
||

32 | Product_1 : real; |
||

33 | Ts_1 : real; |
||

34 | weightValue_1 : real; |
||

35 | let |
||

36 | Add_1 = 0.0 + u_1 - Product_1; |
||

37 | Product_1 = 1.0 * weightValue_1 * Ts_1; |
||

38 | Ts_1 = 0.200000000000000; |
||

39 | weightValue_1 = 2.000000000000000; |
||

40 | Out1_1 = Add_1; |
||

41 | tel |
||

42 | |||

43 | (* |
||

44 | Original block name: SampleTimeMath_PP/WeightedSampleTime2 |
||

45 | *) |
||

46 | node WeightedSampleTime2_96_559(u_1 : real; |
||

47 | __time_step : real; |
||

48 | __nb_step : int;) |
||

49 | returns(Out1_1 : real;); |
||

50 | var Product_1 : real; |
||

51 | Ts_1 : real; |
||

52 | weightValue_1 : real; |
||

53 | let |
||

54 | Product_1 = 1.0 * weightValue_1 * Ts_1 * u_1; |
||

55 | Ts_1 = 0.200000000000000; |
||

56 | weightValue_1 = 2.000000000000000; |
||

57 | Out1_1 = Product_1; |
||

58 | tel |
||

59 | |||

60 | (* |
||

61 | Original block name: SampleTimeMath_PP/WeightedSampleTime3 |
||

62 | *) |
||

63 | node WeightedSampleTime3_97_315(u_1 : real; |
||

64 | __time_step : real; |
||

65 | __nb_step : int;) |
||

66 | returns(Out1_1 : real;); |
||

67 | var Divide_1 : real; |
||

68 | Divide1_1 : real; |
||

69 | Ts_1 : real; |
||

70 | weightValue_1 : real; |
||

71 | let |
||

72 | Divide_1 = 1.0 * u_1 / Ts_1; |
||

73 | Divide1_1 = 1.0 * Divide_1 / weightValue_1; |
||

74 | Ts_1 = 0.200000000000000; |
||

75 | weightValue_1 = 2.000000000000000; |
||

76 | Out1_1 = Divide1_1; |
||

77 | tel |
||

78 | |||

79 | (* |
||

80 | Original block name: SampleTimeMath_PP/WeightedSampleTime4 |
||

81 | *) |
||

82 | node WeightedSampleTime4_98_348(u_1 : real; |
||

83 | __time_step : real; |
||

84 | __nb_step : int;) |
||

85 | returns(Out1_1 : real;); |
||

86 | var Product_1 : real; |
||

87 | Ts_1 : real; |
||

88 | weightValue_1 : real; |
||

89 | let |
||

90 | Product_1 = 1.0 * weightValue_1 * Ts_1; |
||

91 | Ts_1 = 0.200000000000000; |
||

92 | weightValue_1 = 2.000000000000000; |
||

93 | Out1_1 = Product_1; |
||

94 | tel |
||

95 | |||

96 | (* |
||

97 | Original block name: SampleTimeMath_PP/WeightedSampleTime5 |
||

98 | *) |
||

99 | node WeightedSampleTime5_99_741(u_1 : real; |
||

100 | __time_step : real; |
||

101 | __nb_step : int;) |
||

102 | returns(Out1_1 : real;); |
||

103 | var Constant_1 : real; |
||

104 | Divide_1 : real; |
||

105 | Divide1_1 : real; |
||

106 | Ts_1 : real; |
||

107 | weightValue_1 : real; |
||

108 | let |
||

109 | Constant_1 = 1.000000000000000; |
||

110 | Divide_1 = 1.0 * Constant_1 / Ts_1; |
||

111 | Divide1_1 = 1.0 * Divide_1 / weightValue_1; |
||

112 | Ts_1 = 0.200000000000000; |
||

113 | weightValue_1 = 2.000000000000000; |
||

114 | Out1_1 = Divide1_1; |
||

115 | tel |
||

116 | |||

117 | (* |
||

118 | Original block name: SampleTimeMath_PP |
||

119 | *) |
||

120 | node SampleTimeMath_PP(_virtual : bool;) |
||

121 | returns(Out1_1 : real; |
||

122 | Out2_1 : real; |
||

123 | Out3_1 : real; |
||

124 | Out4_1 : real; |
||

125 | Out5_1 : real; |
||

126 | Out6_1 : real;); |
||

127 | var Constant_1 : real; |
||

128 | WeightedSampleTime_1 : real; |
||

129 | WeightedSampleTime1_1 : real; |
||

130 | WeightedSampleTime2_1 : real; |
||

131 | WeightedSampleTime3_1 : real; |
||

132 | WeightedSampleTime4_1 : real; |
||

133 | WeightedSampleTime5_1 : real; |
||

134 | __time_step : real; |
||

135 | __nb_step : int; |
||

136 | let |
||

137 | Constant_1 = 1.000000000000000; |
||

138 | WeightedSampleTime_1 = WeightedSampleTime_94_779(Constant_1, __time_step, __nb_step); |
||

139 | WeightedSampleTime1_1 = WeightedSampleTime1_95_101(Constant_1, __time_step, __nb_step); |
||

140 | WeightedSampleTime2_1 = WeightedSampleTime2_96_559(Constant_1, __time_step, __nb_step); |
||

141 | WeightedSampleTime3_1 = WeightedSampleTime3_97_315(Constant_1, __time_step, __nb_step); |
||

142 | WeightedSampleTime4_1 = WeightedSampleTime4_98_348(Constant_1, __time_step, __nb_step); |
||

143 | WeightedSampleTime5_1 = WeightedSampleTime5_99_741(Constant_1, __time_step, __nb_step); |
||

144 | Out1_1 = WeightedSampleTime_1; |
||

145 | Out2_1 = WeightedSampleTime1_1; |
||

146 | Out3_1 = WeightedSampleTime2_1; |
||

147 | Out4_1 = WeightedSampleTime3_1; |
||

148 | Out5_1 = WeightedSampleTime4_1; |
||

149 | Out6_1 = WeightedSampleTime5_1; |
||

150 | __time_step = (0.0 -> ((pre __time_step) + 0.200000000000000)); |
||

151 | __nb_step = (0 -> ((pre __nb_step) + 1)); |
||

152 | tel |