Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / test / src / kind_fmcad08 / large / microwave40.lus @ 22fe1c93

History | View | Annotate | Download (40 KB)

1
node top(KP_START: bool; 
2
      KP_CLEAR: bool; 
3
      KP_0: bool; 
4
      KP_1: bool; 
5
      KP_2: bool; 
6
      KP_3: bool; 
7
      KP_4: bool; 
8
      KP_5: bool; 
9
      KP_6: bool; 
10
      KP_7: bool; 
11
      KP_8: bool; 
12
      KP_9: bool; 
13
      DOOR_CLOSED: bool
14
) returns (OK:bool);
15

    
16
   
17
var
18
   LEFT_DIGIT: int; 
19
      SETUP: bool; 
20
      COOKING: bool; 
21
      SUSPENDED: bool; 
22
      START_PRESSED: bool; 
23
      CLEAR_PRESSED: bool; 
24
      MIDDLE_DIGIT: int; 
25
      RIGHT_DIGIT: int; 
26
      enable: bool; 
27
      STEPS_TO_COOK: int;
28
      
29
   rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock: bool; 
30
   KP_01: bool; 
31
   KP_11: bool; 
32
   KP_21: bool; 
33
   KP_31: bool; 
34
   KP_41: bool; 
35
   KP_51: bool; 
36
   KP_61: bool; 
37
   KP_71: bool; 
38
   KP_81: bool; 
39
   KP_91: bool; 
40
   rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_init_step: bool; 
41
   microwave_microwave_KEYPAD_PROCESSING_DISPLAY_LEFT_DIGIT_DIGIT_TO_DISPLAY: int; 
42
   microwave_microwave_KEYPAD_PROCESSING_DISPLAY_MIDDLE_DIGIT_DIGIT_TO_DISPLAY: int; 
43
   microwave_microwave_KEYPAD_PROCESSING_DISPLAY_RIGHT_DIGIT_DIGIT_TO_DISPLAY: int; 
44
   rlt__Arrow5: int; 
45
   rlt__Arrow4: int; 
46
   rlt__Arrow3: int; 
47
   rlt__Arrow2: int; 
48
   rlt__Arrow1: int; 
49
   rlt__Arrow: int; 
50
   chart_microwave_mode_logic_start: int; 
51
   chart_microwave_mode_logic_clear_off: int; 
52
   chart_microwave_mode_logic_door_closed: int; 
53
   chart_microwave_mode_logic____wakeup___: bool; 
54
   rlt_eval_microwave_mode_logic_ON_rlt_fired_1: bool; 
55
   rlt_eval_microwave_mode_logic_ON_rlt_state_1_states___root: int; 
56
   rlt_eval_microwave_mode_logic_ON_rlt_state_2_states___root: int; 
57
   rlt_eval_microwave_mode_logic_ON_rlt_fired_2: bool; 
58
   rlt_eval_microwave_mode_logic_ON_rlt_complete_1: bool; 
59
   rlt_eval_microwave_mode_logic_ON_rlt_state_3_states___root: int; 
60
   rlt_eval_microwave_mode_logic_ON_rlt_state_3_outports_mode: int; 
61
   rlt_eval_microwave_mode_logic_ON_rlt_state_4_states___root: int; 
62
   rlt_eval_microwave_mode_logic_ON_rlt_state_4_outports_mode: int; 
63
   rlt_eval_microwave_mode_logic_ON_rlt_fired_4: bool; 
64
   rlt_eval_microwave_mode_logic_ON_rlt_complete_2: bool; 
65
   rlt_eval_microwave_mode_logic_ON_rlt_state_6_states___root: int; 
66
   rlt_eval_microwave_mode_logic_ON_rlt_state_6_outports_steps_remaining: int; 
67
   rlt_eval_microwave_mode_logic_ON_rlt_state_7_states___root: int; 
68
   rlt_eval_microwave_mode_logic_ON_rlt_fired_5: bool; 
69
   rlt_eval_microwave_mode_logic_ON_rlt_state_8_outports_mode: int; 
70
   rlt_eval_microwave_mode_logic_ON_rlt_state_9_states___root: int; 
71
   rlt_eval_microwave_mode_logic_ON_rlt_state_10_states___root: int; 
72
   rlt_eval_microwave_mode_logic_ON_rlt_fired_6: bool; 
73
   rlt_eval_microwave_mode_logic_ON_rlt_state_11_states___root: int; 
74
   rlt_eval_microwave_mode_logic_ON_rlt_state_11_outports_mode: int; 
75
   rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root: int; 
76
   rlt_enter_microwave_mode_logic_ON_rlt_fired_0: bool; 
77
   rlt_enter_microwave_mode_logic_ON_rlt_fired_1: bool; 
78
   rlt_enter_microwave_mode_logic_ON_rlt_state_2_states___root: int; 
79
   rlt_enter_microwave_mode_logic_ON_rlt_state_2_outports_mode: int; 
80
   rlt_enter_microwave_mode_logic_ON_rlt_fired_2: bool; 
81
   rlt_enter_microwave_mode_logic_ON_rlt_state_4_states___root: int; 
82
   rlt_eval_microwave_mode_logic_rlt_fired_0: bool; 
83
   rlt_eval_microwave_mode_logic_rlt_state_1_outports_steps_remaining: int; 
84
   rlt_eval_microwave_mode_logic_rlt_fired_1: bool; 
85
   rlt_eval_microwave_mode_logic_rlt_state_2_states___root: int; 
86
   rlt_eval_microwave_mode_logic_rlt_state_3_states___root: int; 
87
   rlt_eval_microwave_mode_logic_rlt_state_3_outports_mode: int; 
88
   rlt_enter_microwave_mode_logic_rlt_state_2_states___root: int; 
89
   chart_microwave_mode_logic_rlt_evtInitStep: bool; 
90
   chart_microwave_mode_logic_begin_state_states___root: int; 
91
   chart_microwave_mode_logic_begin_state_outports_mode: int; 
92
   chart_microwave_mode_logic_begin_state_outports_steps_remaining: int; 
93
   chart_microwave_mode_logic_final_state_states___root: int; 
94
   chart_microwave_mode_logic_mode: int; 
95
   chart_microwave_mode_logic_steps_remaining: int; 
96
   microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_MINUTES__QUOTIENT: int; 
97
   microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_TENS__QUOTIENT: int; 
98
   microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_TENS__REMAINDER: int; 
99
   microwave_microwave_mode_logic_mode: int; 
100
   MWI_FcnMaxI_In16: int; 
101
   MWI_FcnMaxI_In15: int; 
102
   MWI_FcnMaxI_In13: int; 
103
   MWI_FcnMaxI_In12: int; 
104
   MWI_FcnMaxI_In11: int; 
105
   MWI_FcnMaxI_In1: int; 
106
let 
107
   rlt__Arrow5 = (639 -> 
108
      (if (not (not SETUP))
109
         then 
110
               (if (MWI_FcnMaxI_In13 > 0)
111
                  then MWI_FcnMaxI_In13
112
                  else 0)
113
         else 639));
114

    
115
   rlt__Arrow4 = (639 -> 
116
      (if (not SUSPENDED)
117
         then 
118
               (if (MWI_FcnMaxI_In12 > 0)
119
                  then MWI_FcnMaxI_In12
120
                  else 0)
121
         else 639));
122

    
123
   rlt__Arrow3 = (639 -> 
124
      (if (not (not COOKING))
125
         then 
126
               (if (MWI_FcnMaxI_In16 > 0)
127
                  then MWI_FcnMaxI_In16
128
                  else 0)
129
         else 639));
130

    
131
   rlt__Arrow2 = (639 -> 
132
      (if (not (not SUSPENDED))
133
         then 
134
               (if (MWI_FcnMaxI_In15 > 0)
135
                  then MWI_FcnMaxI_In15
136
                  else 0)
137
         else 639));
138

    
139
   rlt__Arrow1 = (639 -> 
140
      (if (not COOKING)
141
         then 
142
               (if (MWI_FcnMaxI_In11 > 0)
143
                  then MWI_FcnMaxI_In11
144
                  else 0)
145
         else 639));
146

    
147
   rlt__Arrow = (639 -> 
148
      (if (not SETUP)
149
         then 
150
               (if (MWI_FcnMaxI_In1 > 0)
151
                  then MWI_FcnMaxI_In1
152
                  else 0)
153
         else 639));
154

    
155

    
156

    
157

    
158

    
159
   MIDDLE_DIGIT = microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_TENS__QUOTIENT;
160

    
161
   RIGHT_DIGIT = microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_TENS__REMAINDER;
162

    
163

    
164

    
165

    
166
   MWI_FcnMaxI_In1 = ((pre rlt__Arrow) - 1);
167

    
168
   CLEAR_PRESSED = (KP_CLEAR -> (KP_CLEAR and 
169
      (not (pre KP_CLEAR))));
170

    
171
   microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_MINUTES__QUOTIENT = ((chart_microwave_mode_logic_steps_remaining div 1) div 60);
172

    
173
   microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_TENS__REMAINDER = (((chart_microwave_mode_logic_steps_remaining div 1) - (((chart_microwave_mode_logic_steps_remaining div 1) div 60) * 60)) - ((((chart_microwave_mode_logic_steps_remaining div 1) - (((chart_microwave_mode_logic_steps_remaining div 1) div 60) * 60)) div 10) * 10));
174

    
175
   SUSPENDED = 
176
      (if (3 = microwave_microwave_mode_logic_mode)
177
         then true
178
         else false);
179

    
180
   OK = (true -> ((not (enable and 
181
      (not KP_CLEAR))) or 
182
      (((((((((((KP_1 and 
183
      (not (pre KP_1))) or 
184
      (KP_2 and 
185
      (not (pre KP_2)))) or 
186
      (KP_3 and 
187
      (not (pre KP_3)))) or 
188
      (KP_4 and 
189
      (not (pre KP_4)))) or 
190
      (KP_5 and 
191
      (not (pre KP_5)))) or 
192
      (KP_6 and 
193
      (not (pre KP_6)))) or 
194
      (KP_7 and 
195
      (not (pre KP_7)))) or 
196
      (KP_8 and 
197
      (not (pre KP_8)))) or 
198
      (KP_9 and 
199
      (not (pre KP_9)))) or 
200
      (KP_0 and 
201
      (not (pre KP_0)))) or 
202
      (RIGHT_DIGIT = (pre RIGHT_DIGIT)))));
203

    
204
   MWI_FcnMaxI_In11 = ((pre rlt__Arrow1) - 1);
205

    
206
   MWI_FcnMaxI_In15 = ((pre rlt__Arrow2) - 1);
207

    
208

    
209

    
210

    
211
   microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_TENS__QUOTIENT = (((chart_microwave_mode_logic_steps_remaining div 1) - (((chart_microwave_mode_logic_steps_remaining div 1) div 60) * 60)) div 10);
212

    
213
   MWI_FcnMaxI_In16 = ((pre rlt__Arrow3) - 1);
214

    
215

    
216
   MWI_FcnMaxI_In12 = ((pre rlt__Arrow4) - 1);
217

    
218

    
219

    
220
   COOKING = 
221
      (if (2 = microwave_microwave_mode_logic_mode)
222
         then true
223
         else false);
224

    
225
   LEFT_DIGIT = microwave_microwave_TIME_ON_DISPLAY_SECONDS_TO_MINUTES__QUOTIENT;
226

    
227
   START_PRESSED = (KP_START -> (KP_START and 
228
      (not (pre KP_START))));
229

    
230
   chart_microwave_mode_logic_start = 
231
      (if (START_PRESSED = false)
232
         then 0
233
         else 1);
234

    
235
   chart_microwave_mode_logic_clear_off = 
236
      (if (CLEAR_PRESSED = false)
237
         then 0
238
         else 1);
239

    
240
   chart_microwave_mode_logic_door_closed = 
241
      (if (DOOR_CLOSED = false)
242
         then 0
243
         else 1);
244

    
245
   chart_microwave_mode_logic____wakeup___ = true;
246

    
247
   chart_microwave_mode_logic_rlt_evtInitStep = (true -> 
248
      (if (pre chart_microwave_mode_logic____wakeup___)
249
         then false
250
         else (pre chart_microwave_mode_logic_rlt_evtInitStep)));
251

    
252
   chart_microwave_mode_logic_begin_state_states___root = (0 -> (pre chart_microwave_mode_logic_final_state_states___root));
253

    
254
   chart_microwave_mode_logic_begin_state_outports_mode = (0 -> (pre chart_microwave_mode_logic_mode));
255

    
256
   chart_microwave_mode_logic_begin_state_outports_steps_remaining = (0 -> (pre chart_microwave_mode_logic_steps_remaining));
257

    
258
   chart_microwave_mode_logic_final_state_states___root = 
259
      (if chart_microwave_mode_logic____wakeup___
260
         then 
261
               (if chart_microwave_mode_logic_rlt_evtInitStep
262
                  then rlt_enter_microwave_mode_logic_rlt_state_2_states___root
263
                  else 
264
               (if ((not rlt_eval_microwave_mode_logic_rlt_fired_1) and 
265
                  
266
                  
267
                  ((rlt_eval_microwave_mode_logic_rlt_state_3_states___root >= 1) and 
268
                  (rlt_eval_microwave_mode_logic_rlt_state_3_states___root <= 3)))
269
                  then 
270
                        (if rlt_eval_microwave_mode_logic_ON_rlt_fired_6
271
                           then 
272
                                 (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_11_states___root = 3))
273
                                    then 
274
                                          
275
                                          3
276
                                    else rlt_eval_microwave_mode_logic_ON_rlt_state_11_states___root)
277
                           else rlt_eval_microwave_mode_logic_ON_rlt_state_11_states___root)
278
                  else rlt_eval_microwave_mode_logic_rlt_state_3_states___root))
279
         else chart_microwave_mode_logic_begin_state_states___root);
280

    
281
   chart_microwave_mode_logic_mode = 
282
      (if chart_microwave_mode_logic____wakeup___
283
         then 
284
               (if chart_microwave_mode_logic_rlt_evtInitStep
285
                  then 
286
                        (if (not (chart_microwave_mode_logic_begin_state_states___root = 4))
287
                           then 1
288
                           else chart_microwave_mode_logic_begin_state_outports_mode)
289
                  else 
290
               (if ((not rlt_eval_microwave_mode_logic_rlt_fired_1) and 
291
                  
292
                  
293
                  ((rlt_eval_microwave_mode_logic_rlt_state_3_states___root >= 1) and 
294
                  (rlt_eval_microwave_mode_logic_rlt_state_3_states___root <= 3)))
295
                  then 
296
                        (if rlt_eval_microwave_mode_logic_ON_rlt_fired_6
297
                           then 
298
                                 (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_11_states___root = 3))
299
                                    then 3
300
                                    else rlt_eval_microwave_mode_logic_ON_rlt_state_11_outports_mode)
301
                           else rlt_eval_microwave_mode_logic_ON_rlt_state_11_outports_mode)
302
                  else rlt_eval_microwave_mode_logic_rlt_state_3_outports_mode))
303
         else chart_microwave_mode_logic_begin_state_outports_mode);
304

    
305
   chart_microwave_mode_logic_steps_remaining = 
306
      (if chart_microwave_mode_logic____wakeup___
307
         then 
308
               (if chart_microwave_mode_logic_rlt_evtInitStep
309
                  then chart_microwave_mode_logic_begin_state_outports_steps_remaining
310
                  else 
311
               (if ((not rlt_eval_microwave_mode_logic_rlt_fired_1) and 
312
                  
313
                  
314
                  ((rlt_eval_microwave_mode_logic_rlt_state_3_states___root >= 1) and 
315
                  (rlt_eval_microwave_mode_logic_rlt_state_3_states___root <= 3)))
316
                  then 
317
                        (if rlt_eval_microwave_mode_logic_ON_rlt_fired_5
318
                           then (rlt_eval_microwave_mode_logic_ON_rlt_state_6_outports_steps_remaining - 1)
319
                           else rlt_eval_microwave_mode_logic_ON_rlt_state_6_outports_steps_remaining)
320
                  else rlt_eval_microwave_mode_logic_rlt_state_1_outports_steps_remaining))
321
         else chart_microwave_mode_logic_begin_state_outports_steps_remaining);
322

    
323
   
324
   
325
   rlt_eval_microwave_mode_logic_rlt_fired_0 = (chart_microwave_mode_logic_begin_state_states___root = 4);
326

    
327
   
328
   
329
   rlt_eval_microwave_mode_logic_rlt_state_1_outports_steps_remaining = 
330
      (if rlt_eval_microwave_mode_logic_rlt_fired_0
331
         then STEPS_TO_COOK
332
         else chart_microwave_mode_logic_begin_state_outports_steps_remaining);
333

    
334
   
335
   
336
   rlt_eval_microwave_mode_logic_rlt_fired_1 = (rlt_eval_microwave_mode_logic_rlt_fired_0 and 
337
      ((chart_microwave_mode_logic_begin_state_states___root = 4) and 
338
      (
339
      (if (chart_microwave_mode_logic_start <> 0)
340
         then true
341
         else false) and 
342
      
343
      (if (
344
         (if ((STEPS_TO_COOK > 0) = false)
345
            then 0
346
            else 1) <> 0)
347
         then true
348
         else false))));
349

    
350
   
351
   
352
   rlt_eval_microwave_mode_logic_rlt_state_2_states___root = 
353
      (if rlt_eval_microwave_mode_logic_rlt_fired_1
354
         then 
355
               (if (chart_microwave_mode_logic_begin_state_states___root = 4)
356
                  then 
357
                        
358
                        0
359
                  else chart_microwave_mode_logic_begin_state_states___root)
360
         else chart_microwave_mode_logic_begin_state_states___root);
361

    
362
   
363
   
364
   rlt_eval_microwave_mode_logic_rlt_state_3_states___root = 
365
      (if rlt_eval_microwave_mode_logic_rlt_fired_1
366
         then rlt_enter_microwave_mode_logic_ON_rlt_state_4_states___root
367
         else rlt_eval_microwave_mode_logic_rlt_state_2_states___root);
368
   
369
   
370

    
371
   
372
   
373
   rlt_eval_microwave_mode_logic_rlt_state_3_outports_mode = 
374
      (if rlt_eval_microwave_mode_logic_rlt_fired_1
375
         then 
376
               (if rlt_enter_microwave_mode_logic_ON_rlt_fired_2
377
                  then 
378
                        (if (not (rlt_enter_microwave_mode_logic_ON_rlt_state_2_states___root = 3))
379
                           then 3
380
                           else rlt_enter_microwave_mode_logic_ON_rlt_state_2_outports_mode)
381
                  else rlt_enter_microwave_mode_logic_ON_rlt_state_2_outports_mode)
382
         else chart_microwave_mode_logic_begin_state_outports_mode);
383
   
384
   
385

    
386
   
387
   
388
   rlt_eval_microwave_mode_logic_ON_rlt_fired_1 = (((rlt_eval_microwave_mode_logic_rlt_state_3_states___root = 2) and 
389
      (rlt_eval_microwave_mode_logic_rlt_state_1_outports_steps_remaining <= 0)) and 
390
      (rlt_eval_microwave_mode_logic_rlt_state_3_states___root = 2));
391

    
392
   
393
   
394
   rlt_eval_microwave_mode_logic_ON_rlt_state_1_states___root = 
395
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_1
396
         then 
397
               (if 
398
                  
399
                  ((rlt_eval_microwave_mode_logic_rlt_state_3_states___root >= 1) and 
400
                  (rlt_eval_microwave_mode_logic_rlt_state_3_states___root <= 3))
401
                  then 
402
                        
403
                        0
404
                  else rlt_eval_microwave_mode_logic_rlt_state_3_states___root)
405
         else rlt_eval_microwave_mode_logic_rlt_state_3_states___root);
406

    
407
   
408
   
409
   rlt_eval_microwave_mode_logic_ON_rlt_state_2_states___root = 
410
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_1
411
         then 
412
               (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_1_states___root = 4))
413
                  then 
414
                        
415
                        4
416
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_1_states___root)
417
         else rlt_eval_microwave_mode_logic_ON_rlt_state_1_states___root);
418
   
419
   
420

    
421
   
422
   
423
   rlt_eval_microwave_mode_logic_ON_rlt_fired_2 = ((rlt_eval_microwave_mode_logic_ON_rlt_state_2_states___root = 3) and 
424
      ((
425
      (if (chart_microwave_mode_logic_start <> 0)
426
         then true
427
         else false) and 
428
      
429
      (if (chart_microwave_mode_logic_door_closed <> 0)
430
         then true
431
         else false)) and 
432
      (not rlt_eval_microwave_mode_logic_ON_rlt_fired_1)));
433

    
434
   
435
   
436
   rlt_eval_microwave_mode_logic_ON_rlt_complete_1 = (rlt_eval_microwave_mode_logic_ON_rlt_fired_2 or 
437
      rlt_eval_microwave_mode_logic_ON_rlt_fired_1);
438

    
439
   
440
   
441
   rlt_eval_microwave_mode_logic_ON_rlt_state_3_states___root = 
442
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_2
443
         then 
444
               (if (rlt_eval_microwave_mode_logic_ON_rlt_state_2_states___root = 3)
445
                  then 
446
                        
447
                        1
448
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_2_states___root)
449
         else rlt_eval_microwave_mode_logic_ON_rlt_state_2_states___root);
450

    
451
   
452
   
453
   rlt_eval_microwave_mode_logic_ON_rlt_state_3_outports_mode = 
454
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_1
455
         then 
456
               (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_1_states___root = 4))
457
                  then 1
458
                  else rlt_eval_microwave_mode_logic_rlt_state_3_outports_mode)
459
         else rlt_eval_microwave_mode_logic_rlt_state_3_outports_mode);
460

    
461
   
462
   
463
   rlt_eval_microwave_mode_logic_ON_rlt_state_4_states___root = 
464
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_2
465
         then 
466
               (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_3_states___root = 2))
467
                  then 
468
                        
469
                        2
470
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_3_states___root)
471
         else rlt_eval_microwave_mode_logic_ON_rlt_state_3_states___root);
472
   
473
   
474

    
475
   
476
   
477
   rlt_eval_microwave_mode_logic_ON_rlt_state_4_outports_mode = 
478
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_2
479
         then 
480
               (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_3_states___root = 2))
481
                  then 2
482
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_3_outports_mode)
483
         else rlt_eval_microwave_mode_logic_ON_rlt_state_3_outports_mode);
484
   
485
   
486

    
487
   
488
   
489
   rlt_eval_microwave_mode_logic_ON_rlt_fired_4 = (((rlt_eval_microwave_mode_logic_ON_rlt_state_4_states___root = 3) and 
490
      (
491
      (if (chart_microwave_mode_logic_clear_off <> 0)
492
         then true
493
         else false) and 
494
      (not rlt_eval_microwave_mode_logic_ON_rlt_complete_1))) and 
495
      ((rlt_eval_microwave_mode_logic_ON_rlt_state_4_states___root = 3) and 
496
      (not rlt_eval_microwave_mode_logic_ON_rlt_complete_1)));
497

    
498
   
499
   
500
   rlt_eval_microwave_mode_logic_ON_rlt_complete_2 = (rlt_eval_microwave_mode_logic_ON_rlt_fired_4 or 
501
      rlt_eval_microwave_mode_logic_ON_rlt_complete_1);
502

    
503
   
504
   
505
   rlt_eval_microwave_mode_logic_ON_rlt_state_6_states___root = 
506
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_4
507
         then 
508
               (if 
509
                  
510
                  ((rlt_eval_microwave_mode_logic_ON_rlt_state_4_states___root >= 1) and 
511
                  (rlt_eval_microwave_mode_logic_ON_rlt_state_4_states___root <= 3))
512
                  then 
513
                        
514
                        0
515
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_4_states___root)
516
         else rlt_eval_microwave_mode_logic_ON_rlt_state_4_states___root);
517

    
518
   
519
   
520
   rlt_eval_microwave_mode_logic_ON_rlt_state_6_outports_steps_remaining = 
521
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_4
522
         then 0
523
         else rlt_eval_microwave_mode_logic_rlt_state_1_outports_steps_remaining);
524

    
525
   
526
   
527
   rlt_eval_microwave_mode_logic_ON_rlt_state_7_states___root = 
528
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_4
529
         then 
530
               (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_6_states___root = 4))
531
                  then 
532
                        
533
                        4
534
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_6_states___root)
535
         else rlt_eval_microwave_mode_logic_ON_rlt_state_6_states___root);
536
   
537
   
538

    
539
   
540
   
541
   rlt_eval_microwave_mode_logic_ON_rlt_fired_5 = ((rlt_eval_microwave_mode_logic_ON_rlt_state_7_states___root = 2) and 
542
      ((rlt_eval_microwave_mode_logic_ON_rlt_state_6_outports_steps_remaining > 0) and 
543
      (not rlt_eval_microwave_mode_logic_ON_rlt_complete_2)));
544

    
545
   
546
   
547
   rlt_eval_microwave_mode_logic_ON_rlt_state_8_outports_mode = 
548
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_4
549
         then 
550
               (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_6_states___root = 4))
551
                  then 1
552
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_4_outports_mode)
553
         else rlt_eval_microwave_mode_logic_ON_rlt_state_4_outports_mode);
554

    
555
   
556
   
557
   rlt_eval_microwave_mode_logic_ON_rlt_state_9_states___root = 
558
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_5
559
         then 
560
               (if (rlt_eval_microwave_mode_logic_ON_rlt_state_7_states___root = 2)
561
                  then 
562
                        
563
                        1
564
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_7_states___root)
565
         else rlt_eval_microwave_mode_logic_ON_rlt_state_7_states___root);
566

    
567
   
568
   
569
   rlt_eval_microwave_mode_logic_ON_rlt_state_10_states___root = 
570
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_5
571
         then 
572
               (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_9_states___root = 2))
573
                  then 
574
                        
575
                        2
576
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_9_states___root)
577
         else rlt_eval_microwave_mode_logic_ON_rlt_state_9_states___root);
578
   
579
   
580

    
581
   
582
   
583
   rlt_eval_microwave_mode_logic_ON_rlt_fired_6 = ((rlt_eval_microwave_mode_logic_ON_rlt_state_10_states___root = 2) and 
584
      ((
585
      (if (chart_microwave_mode_logic_clear_off <> 0)
586
         then true
587
         else false) or 
588
      (not 
589
      (if (chart_microwave_mode_logic_door_closed <> 0)
590
         then true
591
         else false))) and 
592
      (not (rlt_eval_microwave_mode_logic_ON_rlt_fired_5 or 
593
      rlt_eval_microwave_mode_logic_ON_rlt_complete_2))));
594

    
595
   
596
   
597
   rlt_eval_microwave_mode_logic_ON_rlt_state_11_states___root = 
598
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_6
599
         then 
600
               (if (rlt_eval_microwave_mode_logic_ON_rlt_state_10_states___root = 2)
601
                  then 
602
                        
603
                        1
604
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_10_states___root)
605
         else rlt_eval_microwave_mode_logic_ON_rlt_state_10_states___root);
606

    
607
   
608
   
609
   rlt_eval_microwave_mode_logic_ON_rlt_state_11_outports_mode = 
610
      (if rlt_eval_microwave_mode_logic_ON_rlt_fired_5
611
         then 
612
               (if (not (rlt_eval_microwave_mode_logic_ON_rlt_state_9_states___root = 2))
613
                  then 2
614
                  else rlt_eval_microwave_mode_logic_ON_rlt_state_8_outports_mode)
615
         else rlt_eval_microwave_mode_logic_ON_rlt_state_8_outports_mode);
616

    
617
   rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root = 
618
      (if (not 
619
         
620
         ((rlt_eval_microwave_mode_logic_rlt_state_2_states___root >= 1) and 
621
         (rlt_eval_microwave_mode_logic_rlt_state_2_states___root <= 3)))
622
         then 
623
               
624
               1
625
         else rlt_eval_microwave_mode_logic_rlt_state_2_states___root);
626

    
627
   
628
   
629
   rlt_enter_microwave_mode_logic_ON_rlt_fired_0 = ((not 
630
      
631
      ((rlt_eval_microwave_mode_logic_rlt_state_2_states___root >= 1) and 
632
      (rlt_eval_microwave_mode_logic_rlt_state_2_states___root <= 3))) and 
633
      
634
      
635
      ((rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root >= 1) and 
636
      (rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root <= 3)));
637

    
638
   
639
   
640
   rlt_enter_microwave_mode_logic_ON_rlt_fired_1 = (rlt_enter_microwave_mode_logic_ON_rlt_fired_0 and 
641
      (
642
      
643
      ((rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root >= 1) and 
644
      (rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root <= 3)) and 
645
      
646
      (if (chart_microwave_mode_logic_door_closed <> 0)
647
         then true
648
         else false)));
649

    
650
   
651
   
652
   rlt_enter_microwave_mode_logic_ON_rlt_state_2_states___root = 
653
      (if rlt_enter_microwave_mode_logic_ON_rlt_fired_1
654
         then 
655
               (if (not (rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root = 2))
656
                  then 
657
                        
658
                        2
659
                  else rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root)
660
         else rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root);
661
   
662
   
663

    
664
   
665
   
666
   rlt_enter_microwave_mode_logic_ON_rlt_state_2_outports_mode = 
667
      (if rlt_enter_microwave_mode_logic_ON_rlt_fired_1
668
         then 
669
               (if (not (rlt_enter_microwave_mode_logic_ON_rlt_state_1_states___root = 2))
670
                  then 2
671
                  else chart_microwave_mode_logic_begin_state_outports_mode)
672
         else chart_microwave_mode_logic_begin_state_outports_mode);
673
   
674
   
675

    
676
   
677
   
678
   rlt_enter_microwave_mode_logic_ON_rlt_fired_2 = (rlt_enter_microwave_mode_logic_ON_rlt_fired_0 and 
679
      (
680
      
681
      ((rlt_enter_microwave_mode_logic_ON_rlt_state_2_states___root >= 1) and 
682
      (rlt_enter_microwave_mode_logic_ON_rlt_state_2_states___root <= 3)) and 
683
      (not rlt_enter_microwave_mode_logic_ON_rlt_fired_1)));
684

    
685
   
686
   
687
   rlt_enter_microwave_mode_logic_ON_rlt_state_4_states___root = 
688
      (if rlt_enter_microwave_mode_logic_ON_rlt_fired_2
689
         then 
690
               (if (not (rlt_enter_microwave_mode_logic_ON_rlt_state_2_states___root = 3))
691
                  then 
692
                        
693
                        3
694
                  else rlt_enter_microwave_mode_logic_ON_rlt_state_2_states___root)
695
         else rlt_enter_microwave_mode_logic_ON_rlt_state_2_states___root);
696
   
697
   
698

    
699
   
700
   
701
   rlt_enter_microwave_mode_logic_rlt_state_2_states___root = 
702
      (if (not (chart_microwave_mode_logic_begin_state_states___root = 4))
703
         then 
704
               
705
               4
706
         else chart_microwave_mode_logic_begin_state_states___root);
707
   
708
   
709

    
710
   microwave_microwave_mode_logic_mode = chart_microwave_mode_logic_mode;
711

    
712

    
713
   MWI_FcnMaxI_In13 = ((pre rlt__Arrow5) - 1);
714

    
715

    
716
   rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock = enable;
717

    
718
   KP_01 = KP_0;
719

    
720
   KP_11 = KP_1;
721

    
722
   KP_21 = KP_2;
723

    
724
   KP_31 = KP_3;
725

    
726
   KP_41 = KP_4;
727

    
728
   KP_51 = KP_5;
729

    
730
   KP_61 = KP_6;
731

    
732
   KP_71 = KP_7;
733

    
734
   KP_81 = KP_8;
735

    
736
   KP_91 = KP_9;
737

    
738
   microwave_microwave_KEYPAD_PROCESSING_DISPLAY_LEFT_DIGIT_DIGIT_TO_DISPLAY = (0 -> 
739
      (if rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock
740
         then 
741
               (if rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_init_step
742
                  then 0
743
                  else 
744
               (if KP_CLEAR
745
                  then 0
746
                  else 
747
               (if 
748
                  (if (
749
                     (if (KP_01 and 
750
                        (not (pre KP_01)))
751
                        then 0
752
                        else 
753
                     (if (KP_11 and 
754
                        (not (pre KP_11)))
755
                        then 1
756
                        else 
757
                     (if (KP_21 and 
758
                        (not (pre KP_21)))
759
                        then 2
760
                        else 
761
                     (if (KP_31 and 
762
                        (not (pre KP_31)))
763
                        then 3
764
                        else 
765
                     (if (KP_41 and 
766
                        (not (pre KP_41)))
767
                        then 4
768
                        else 
769
                     (if (KP_51 and 
770
                        (not (pre KP_51)))
771
                        then 5
772
                        else 
773
                     (if (KP_61 and 
774
                        (not (pre KP_61)))
775
                        then 6
776
                        else 
777
                     (if (KP_71 and 
778
                        (not (pre KP_71)))
779
                        then 7
780
                        else 
781
                     (if (KP_81 and 
782
                        (not (pre KP_81)))
783
                        then 8
784
                        else 
785
                     (if (KP_91 and 
786
                        (not (pre KP_91)))
787
                        then 9
788
                        else 10)))))))))) <= 9)
789
                     then true
790
                     else false)
791
                  then (pre microwave_microwave_KEYPAD_PROCESSING_DISPLAY_MIDDLE_DIGIT_DIGIT_TO_DISPLAY)
792
                  else (pre microwave_microwave_KEYPAD_PROCESSING_DISPLAY_LEFT_DIGIT_DIGIT_TO_DISPLAY))))
793
         else (pre microwave_microwave_KEYPAD_PROCESSING_DISPLAY_LEFT_DIGIT_DIGIT_TO_DISPLAY)));
794

    
795
   microwave_microwave_KEYPAD_PROCESSING_DISPLAY_MIDDLE_DIGIT_DIGIT_TO_DISPLAY = (0 -> 
796
      (if rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock
797
         then 
798
               (if rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_init_step
799
                  then 0
800
                  else 
801
               (if KP_CLEAR
802
                  then 0
803
                  else 
804
               (if 
805
                  (if (
806
                     (if (KP_01 and 
807
                        (not (pre KP_01)))
808
                        then 0
809
                        else 
810
                     (if (KP_11 and 
811
                        (not (pre KP_11)))
812
                        then 1
813
                        else 
814
                     (if (KP_21 and 
815
                        (not (pre KP_21)))
816
                        then 2
817
                        else 
818
                     (if (KP_31 and 
819
                        (not (pre KP_31)))
820
                        then 3
821
                        else 
822
                     (if (KP_41 and 
823
                        (not (pre KP_41)))
824
                        then 4
825
                        else 
826
                     (if (KP_51 and 
827
                        (not (pre KP_51)))
828
                        then 5
829
                        else 
830
                     (if (KP_61 and 
831
                        (not (pre KP_61)))
832
                        then 6
833
                        else 
834
                     (if (KP_71 and 
835
                        (not (pre KP_71)))
836
                        then 7
837
                        else 
838
                     (if (KP_81 and 
839
                        (not (pre KP_81)))
840
                        then 8
841
                        else 
842
                     (if (KP_91 and 
843
                        (not (pre KP_91)))
844
                        then 9
845
                        else 10)))))))))) <= 9)
846
                     then true
847
                     else false)
848
                  then (pre microwave_microwave_KEYPAD_PROCESSING_DISPLAY_RIGHT_DIGIT_DIGIT_TO_DISPLAY)
849
                  else (pre microwave_microwave_KEYPAD_PROCESSING_DISPLAY_MIDDLE_DIGIT_DIGIT_TO_DISPLAY))))
850
         else (pre microwave_microwave_KEYPAD_PROCESSING_DISPLAY_MIDDLE_DIGIT_DIGIT_TO_DISPLAY)));
851

    
852
   microwave_microwave_KEYPAD_PROCESSING_DISPLAY_RIGHT_DIGIT_DIGIT_TO_DISPLAY = (
853
      (if KP_CLEAR
854
         then 0
855
         else 
856
      (if 
857
         (if (
858
            (if KP_01
859
               then 0
860
               else 
861
            (if KP_11
862
               then 1
863
               else 
864
            (if KP_21
865
               then 2
866
               else 
867
            (if KP_31
868
               then 3
869
               else 
870
            (if KP_41
871
               then 4
872
               else 
873
            (if KP_51
874
               then 5
875
               else 
876
            (if KP_61
877
               then 6
878
               else 
879
            (if KP_71
880
               then 7
881
               else 
882
            (if KP_81
883
               then 8
884
               else 
885
            (if KP_91
886
               then 9
887
               else 10)))))))))) <= 9)
888
            then true
889
            else false)
890
         then 
891
               (if KP_01
892
                  then 0
893
                  else 
894
               (if KP_11
895
                  then 1
896
                  else 
897
               (if KP_21
898
                  then 2
899
                  else 
900
               (if KP_31
901
                  then 3
902
                  else 
903
               (if KP_41
904
                  then 4
905
                  else 
906
               (if KP_51
907
                  then 5
908
                  else 
909
               (if KP_61
910
                  then 6
911
                  else 
912
               (if KP_71
913
                  then 7
914
                  else 
915
               (if KP_81
916
                  then 8
917
                  else 
918
               (if KP_91
919
                  then 9
920
                  else 10))))))))))
921
         else 0)) -> 
922
      (if rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock
923
         then 
924
               (if rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_init_step
925
                  then 
926
                        (if KP_CLEAR
927
                           then 0
928
                           else 
929
                        (if 
930
                           (if (
931
                              (if KP_01
932
                                 then 0
933
                                 else 
934
                              (if KP_11
935
                                 then 1
936
                                 else 
937
                              (if KP_21
938
                                 then 2
939
                                 else 
940
                              (if KP_31
941
                                 then 3
942
                                 else 
943
                              (if KP_41
944
                                 then 4
945
                                 else 
946
                              (if KP_51
947
                                 then 5
948
                                 else 
949
                              (if KP_61
950
                                 then 6
951
                                 else 
952
                              (if KP_71
953
                                 then 7
954
                                 else 
955
                              (if KP_81
956
                                 then 8
957
                                 else 
958
                              (if KP_91
959
                                 then 9
960
                                 else 10)))))))))) <= 9)
961
                              then true
962
                              else false)
963
                           then 
964
                                 (if KP_01
965
                                    then 0
966
                                    else 
967
                                 (if KP_11
968
                                    then 1
969
                                    else 
970
                                 (if KP_21
971
                                    then 2
972
                                    else 
973
                                 (if KP_31
974
                                    then 3
975
                                    else 
976
                                 (if KP_41
977
                                    then 4
978
                                    else 
979
                                 (if KP_51
980
                                    then 5
981
                                    else 
982
                                 (if KP_61
983
                                    then 6
984
                                    else 
985
                                 (if KP_71
986
                                    then 7
987
                                    else 
988
                                 (if KP_81
989
                                    then 8
990
                                    else 
991
                                 (if KP_91
992
                                    then 9
993
                                    else 10))))))))))
994
                           else 0))
995
                  else 
996
               (if KP_CLEAR
997
                  then 0
998
                  else 
999
               (if 
1000
                  (if (
1001
                     (if (KP_01 and 
1002
                        (not (pre KP_01)))
1003
                        then 0
1004
                        else 
1005
                     (if (KP_11 and 
1006
                        (not (pre KP_11)))
1007
                        then 1
1008
                        else 
1009
                     (if (KP_21 and 
1010
                        (not (pre KP_21)))
1011
                        then 2
1012
                        else 
1013
                     (if (KP_31 and 
1014
                        (not (pre KP_31)))
1015
                        then 3
1016
                        else 
1017
                     (if (KP_41 and 
1018
                        (not (pre KP_41)))
1019
                        then 4
1020
                        else 
1021
                     (if (KP_51 and 
1022
                        (not (pre KP_51)))
1023
                        then 5
1024
                        else 
1025
                     (if (KP_61 and 
1026
                        (not (pre KP_61)))
1027
                        then 6
1028
                        else 
1029
                     (if (KP_71 and 
1030
                        (not (pre KP_71)))
1031
                        then 7
1032
                        else 
1033
                     (if (KP_81 and 
1034
                        (not (pre KP_81)))
1035
                        then 8
1036
                        else 
1037
                     (if (KP_91 and 
1038
                        (not (pre KP_91)))
1039
                        then 9
1040
                        else 10)))))))))) <= 9)
1041
                     then true
1042
                     else false)
1043
                  then 
1044
                        (if (KP_01 and 
1045
                           (not (pre KP_01)))
1046
                           then 0
1047
                           else 
1048
                        (if (KP_11 and 
1049
                           (not (pre KP_11)))
1050
                           then 1
1051
                           else 
1052
                        (if (KP_21 and 
1053
                           (not (pre KP_21)))
1054
                           then 2
1055
                           else 
1056
                        (if (KP_31 and 
1057
                           (not (pre KP_31)))
1058
                           then 3
1059
                           else 
1060
                        (if (KP_41 and 
1061
                           (not (pre KP_41)))
1062
                           then 4
1063
                           else 
1064
                        (if (KP_51 and 
1065
                           (not (pre KP_51)))
1066
                           then 5
1067
                           else 
1068
                        (if (KP_61 and 
1069
                           (not (pre KP_61)))
1070
                           then 6
1071
                           else 
1072
                        (if (KP_71 and 
1073
                           (not (pre KP_71)))
1074
                           then 7
1075
                           else 
1076
                        (if (KP_81 and 
1077
                           (not (pre KP_81)))
1078
                           then 8
1079
                           else 
1080
                        (if (KP_91 and 
1081
                           (not (pre KP_91)))
1082
                           then 9
1083
                           else 10))))))))))
1084
                  else (pre microwave_microwave_KEYPAD_PROCESSING_DISPLAY_RIGHT_DIGIT_DIGIT_TO_DISPLAY))))
1085
         else (pre microwave_microwave_KEYPAD_PROCESSING_DISPLAY_RIGHT_DIGIT_DIGIT_TO_DISPLAY)));
1086

    
1087
   STEPS_TO_COOK = (
1088
      (if (rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_init_step and 
1089
         (not rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock))
1090
         then 0
1091
         else ((((microwave_microwave_KEYPAD_PROCESSING_DISPLAY_RIGHT_DIGIT_DIGIT_TO_DISPLAY * 1) + (microwave_microwave_KEYPAD_PROCESSING_DISPLAY_MIDDLE_DIGIT_DIGIT_TO_DISPLAY * 10)) + (microwave_microwave_KEYPAD_PROCESSING_DISPLAY_LEFT_DIGIT_DIGIT_TO_DISPLAY * 60)) * 1)) -> 
1092
      (if (rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_init_step and 
1093
         (not rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock))
1094
         then 0
1095
         else 
1096
      (if rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock
1097
         then ((((microwave_microwave_KEYPAD_PROCESSING_DISPLAY_RIGHT_DIGIT_DIGIT_TO_DISPLAY * 1) + (microwave_microwave_KEYPAD_PROCESSING_DISPLAY_MIDDLE_DIGIT_DIGIT_TO_DISPLAY * 10)) + (microwave_microwave_KEYPAD_PROCESSING_DISPLAY_LEFT_DIGIT_DIGIT_TO_DISPLAY * 60)) * 1)
1098
         else (pre STEPS_TO_COOK))));
1099

    
1100
   rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_init_step = (true -> 
1101
      (if (not rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock)
1102
         then true
1103
         else 
1104
      (if (pre rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_clock)
1105
         then false
1106
         else (pre rlt_condact_resetmicrowave_microwave_KEYPAD_PROCESSING_rlt_init_step))));
1107

    
1108
   SETUP = 
1109
      (if (1 = microwave_microwave_mode_logic_mode)
1110
         then true
1111
         else false);
1112

    
1113
   enable = (true -> 
1114
      (if (1 = (pre microwave_microwave_mode_logic_mode))
1115
         then true
1116
         else false));
1117

    
1118

    
1119

    
1120

    
1121

    
1122

    
1123
  --%PROPERTY OK=true;
1124
  --%MAIN;
1125

    
1126
tel
1127