Project

General

Profile

Download (21.3 KB) Statistics
| Branch: | Tag: | Revision:
1
{
2
  "DESIGN_FILE" : {
3
    "design_units" : [{
4
      "contexts" : [], "library" : ["ENTITY_DECLARATION", {
5
        "name" : ["IDENTIFIER", "fg_07_16"], "ENTITY_DECLARATIVE_PART" : [], "ENTITY_STATEMENT_PART" : []}
6
      ]}
7
    , {
8
      "contexts" : [], "library" : ["ARCHITECTURE_BODY", {
9
        "name" : ["IDENTIFIER", "test"], "entity" : ["IDENTIFIER", "fg_07_16"], "ARCHITECTURE_DECLARATIVE_PART" : [{
10
          "declaration" : ["SUBPROGRAM_BODY", {
11
            "spec" : {
12
              "name" : "limit", "subprogram_type" : "function", "parameters" : [{
13
                "names" : [["IDENTIFIER", "value"], ["IDENTIFIER", "min"], ["IDENTIFIER", "max"]], "typ" : {
14
                  "name" : ["SIMPLE_NAME", "integer"]}
15
                }
16
              ], "typeMark" : ["SIMPLE_NAME", "integer"], "isPure" : false}
17
            , "stmts" : [["IF_STATEMENT", {
18
              "if_cases" : [{
19
                "if_cond" : ["EXPRESSION", {
20
                  "id" : ">", "args" : [["EXPRESSION", {
21
                    "args" : [["EXPRESSION", {
22
                      "args" : [["EXPRESSION", {
23
                        "args" : [["CALL", ["SIMPLE_NAME", "value"]]]}
24
                      ]]}
25
                    ]]}
26
                  ], ["EXPRESSION", {
27
                    "args" : [["EXPRESSION", {
28
                      "args" : [["EXPRESSION", {
29
                        "args" : [["CALL", ["SIMPLE_NAME", "max"]]]}
30
                      ]]}
31
                    ]]}
32
                  ]]}
33
                ], "if_block" : [["RETURN_STATEMENT", {
34
                  "expr" : ["EXPRESSION", {
35
                    "args" : [["EXPRESSION", {
36
                      "args" : [["EXPRESSION", {
37
                        "args" : [["EXPRESSION", {
38
                          "args" : [["CALL", ["SIMPLE_NAME", "max"]]]}
39
                        ]]}
40
                      ]]}
41
                    ]]}
42
                  ]}
43
                ]]}
44
              , {
45
                "if_cond" : ["EXPRESSION", {
46
                  "id" : "<", "args" : [["EXPRESSION", {
47
                    "args" : [["EXPRESSION", {
48
                      "args" : [["EXPRESSION", {
49
                        "args" : [["CALL", ["SIMPLE_NAME", "value"]]]}
50
                      ]]}
51
                    ]]}
52
                  ], ["EXPRESSION", {
53
                    "args" : [["EXPRESSION", {
54
                      "args" : [["EXPRESSION", {
55
                        "args" : [["CALL", ["SIMPLE_NAME", "min"]]]}
56
                      ]]}
57
                    ]]}
58
                  ]]}
59
                ], "if_block" : [["RETURN_STATEMENT", {
60
                  "expr" : ["EXPRESSION", {
61
                    "args" : [["EXPRESSION", {
62
                      "args" : [["EXPRESSION", {
63
                        "args" : [["EXPRESSION", {
64
                          "args" : [["CALL", ["SIMPLE_NAME", "min"]]]}
65
                        ]]}
66
                      ]]}
67
                    ]]}
68
                  ]}
69
                ]]}
70
              ], "default" : [["RETURN_STATEMENT", {
71
                "expr" : ["EXPRESSION", {
72
                  "args" : [["EXPRESSION", {
73
                    "args" : [["EXPRESSION", {
74
                      "args" : [["EXPRESSION", {
75
                        "args" : [["CALL", ["SIMPLE_NAME", "value"]]]}
76
                      ]]}
77
                    ]]}
78
                  ]]}
79
                ]}
80
              ]]}
81
            ]]}
82
          ]}
83
        ], "ARCHITECTURE_STATEMENT_PART" : [["PROCESS_STATEMENT", {
84
          "id" : ["IDENTIFIER", "tester"], "PROCESS_DECLARATIVE_PART" : [{
85
            "declaration" : ["VARIABLE_DECLARATION", {
86
              "names" : [["IDENTIFIER", "new_temperature"], ["IDENTIFIER", "current_temperature"], ["IDENTIFIER", "increment"]], "typ" : {
87
                "name" : ["SIMPLE_NAME", "integer"]}
88
              }
89
            ]}
90
          , {
91
            "declaration" : ["VARIABLE_DECLARATION", {
92
              "names" : [["IDENTIFIER", "new_motor_speed"], ["IDENTIFIER", "old_motor_speed"], ["IDENTIFIER", "scale_factor"], ["IDENTIFIER", "error"]], "typ" : {
93
                "name" : ["SIMPLE_NAME", "integer"]}
94
              }
95
            ]}
96
          ], "PROCESS_STATEMENT_PART" : [["VARIABLE_ASSIGNMENT_STATEMENT", {
97
            "lhs" : ["SIMPLE_NAME", "current_temperature"], "rhs" : ["EXPRESSION", {
98
              "args" : [["EXPRESSION", {
99
                "args" : [["EXPRESSION", {
100
                  "args" : [["EXPRESSION", {
101
                    "args" : [["CONSTANT_VALUE", {
102
                      "value" : ["CST_LITERAL", "75"]}
103
                    ]]}
104
                  ]]}
105
                ]]}
106
              ]]}
107
            ]}
108
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
109
            "lhs" : ["SIMPLE_NAME", "increment"], "rhs" : ["EXPRESSION", {
110
              "args" : [["EXPRESSION", {
111
                "args" : [["EXPRESSION", {
112
                  "args" : [["EXPRESSION", {
113
                    "args" : [["CONSTANT_VALUE", {
114
                      "value" : ["CST_LITERAL", "10"]}
115
                    ]]}
116
                  ]]}
117
                ]]}
118
              ]]}
119
            ]}
120
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
121
            "lhs" : ["SIMPLE_NAME", "new_temperature"], "rhs" : ["EXPRESSION", {
122
              "args" : [["EXPRESSION", {
123
                "args" : [["EXPRESSION", {
124
                  "args" : [["EXPRESSION", {
125
                    "args" : [["CALL", ["FUNCTION_CALL", {
126
                      "id" : ["SIMPLE_NAME", "limit"], "assoc_list" : [{
127
                        "actual_expr" : ["EXPRESSION", {
128
                          "args" : [["EXPRESSION", {
129
                            "args" : [["EXPRESSION", {
130
                              "args" : [["EXPRESSION", {
131
                                "id" : "+", "args" : [["EXPRESSION", {
132
                                  "args" : [["CALL", ["SIMPLE_NAME", "current_temperature"]]]}
133
                                ], ["EXPRESSION", {
134
                                  "args" : [["CALL", ["SIMPLE_NAME", "increment"]]]}
135
                                ]]}
136
                              ]]}
137
                            ]]}
138
                          ]]}
139
                        ]}
140
                      , {
141
                        "actual_expr" : ["EXPRESSION", {
142
                          "args" : [["EXPRESSION", {
143
                            "args" : [["EXPRESSION", {
144
                              "args" : [["EXPRESSION", {
145
                                "args" : [["CONSTANT_VALUE", {
146
                                  "value" : ["CST_LITERAL", "10"]}
147
                                ]]}
148
                              ]]}
149
                            ]]}
150
                          ]]}
151
                        ]}
152
                      , {
153
                        "actual_expr" : ["EXPRESSION", {
154
                          "args" : [["EXPRESSION", {
155
                            "args" : [["EXPRESSION", {
156
                              "args" : [["EXPRESSION", {
157
                                "args" : [["CONSTANT_VALUE", {
158
                                  "value" : ["CST_LITERAL", "100"]}
159
                                ]]}
160
                              ]]}
161
                            ]]}
162
                          ]]}
163
                        ]}
164
                      ]}
165
                    ]]]}
166
                  ]]}
167
                ]]}
168
              ]]}
169
            ]}
170
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
171
            "lhs" : ["SIMPLE_NAME", "increment"], "rhs" : ["EXPRESSION", {
172
              "args" : [["EXPRESSION", {
173
                "args" : [["EXPRESSION", {
174
                  "args" : [["EXPRESSION", {
175
                    "args" : [["CONSTANT_VALUE", {
176
                      "value" : ["CST_LITERAL", "60"]}
177
                    ]]}
178
                  ]]}
179
                ]]}
180
              ]]}
181
            ]}
182
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
183
            "lhs" : ["SIMPLE_NAME", "new_temperature"], "rhs" : ["EXPRESSION", {
184
              "args" : [["EXPRESSION", {
185
                "args" : [["EXPRESSION", {
186
                  "args" : [["EXPRESSION", {
187
                    "args" : [["CALL", ["FUNCTION_CALL", {
188
                      "id" : ["SIMPLE_NAME", "limit"], "assoc_list" : [{
189
                        "actual_expr" : ["EXPRESSION", {
190
                          "args" : [["EXPRESSION", {
191
                            "args" : [["EXPRESSION", {
192
                              "args" : [["EXPRESSION", {
193
                                "id" : "+", "args" : [["EXPRESSION", {
194
                                  "args" : [["CALL", ["SIMPLE_NAME", "current_temperature"]]]}
195
                                ], ["EXPRESSION", {
196
                                  "args" : [["CALL", ["SIMPLE_NAME", "increment"]]]}
197
                                ]]}
198
                              ]]}
199
                            ]]}
200
                          ]]}
201
                        ]}
202
                      , {
203
                        "actual_expr" : ["EXPRESSION", {
204
                          "args" : [["EXPRESSION", {
205
                            "args" : [["EXPRESSION", {
206
                              "args" : [["EXPRESSION", {
207
                                "args" : [["CONSTANT_VALUE", {
208
                                  "value" : ["CST_LITERAL", "10"]}
209
                                ]]}
210
                              ]]}
211
                            ]]}
212
                          ]]}
213
                        ]}
214
                      , {
215
                        "actual_expr" : ["EXPRESSION", {
216
                          "args" : [["EXPRESSION", {
217
                            "args" : [["EXPRESSION", {
218
                              "args" : [["EXPRESSION", {
219
                                "args" : [["CONSTANT_VALUE", {
220
                                  "value" : ["CST_LITERAL", "100"]}
221
                                ]]}
222
                              ]]}
223
                            ]]}
224
                          ]]}
225
                        ]}
226
                      ]}
227
                    ]]]}
228
                  ]]}
229
                ]]}
230
              ]]}
231
            ]}
232
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
233
            "lhs" : ["SIMPLE_NAME", "increment"], "rhs" : ["EXPRESSION", {
234
              "args" : [["EXPRESSION", {
235
                "args" : [["EXPRESSION", {
236
                  "id" : "-", "args" : [["EXPRESSION", {
237
                    "args" : [["CONSTANT_VALUE", {
238
                      "value" : ["CST_LITERAL", "100"]}
239
                    ]]}
240
                  ]]}
241
                ]]}
242
              ]]}
243
            ]}
244
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
245
            "lhs" : ["SIMPLE_NAME", "new_temperature"], "rhs" : ["EXPRESSION", {
246
              "args" : [["EXPRESSION", {
247
                "args" : [["EXPRESSION", {
248
                  "args" : [["EXPRESSION", {
249
                    "args" : [["CALL", ["FUNCTION_CALL", {
250
                      "id" : ["SIMPLE_NAME", "limit"], "assoc_list" : [{
251
                        "actual_expr" : ["EXPRESSION", {
252
                          "args" : [["EXPRESSION", {
253
                            "args" : [["EXPRESSION", {
254
                              "args" : [["EXPRESSION", {
255
                                "id" : "+", "args" : [["EXPRESSION", {
256
                                  "args" : [["CALL", ["SIMPLE_NAME", "current_temperature"]]]}
257
                                ], ["EXPRESSION", {
258
                                  "args" : [["CALL", ["SIMPLE_NAME", "increment"]]]}
259
                                ]]}
260
                              ]]}
261
                            ]]}
262
                          ]]}
263
                        ]}
264
                      , {
265
                        "actual_expr" : ["EXPRESSION", {
266
                          "args" : [["EXPRESSION", {
267
                            "args" : [["EXPRESSION", {
268
                              "args" : [["EXPRESSION", {
269
                                "args" : [["CONSTANT_VALUE", {
270
                                  "value" : ["CST_LITERAL", "10"]}
271
                                ]]}
272
                              ]]}
273
                            ]]}
274
                          ]]}
275
                        ]}
276
                      , {
277
                        "actual_expr" : ["EXPRESSION", {
278
                          "args" : [["EXPRESSION", {
279
                            "args" : [["EXPRESSION", {
280
                              "args" : [["EXPRESSION", {
281
                                "args" : [["CONSTANT_VALUE", {
282
                                  "value" : ["CST_LITERAL", "100"]}
283
                                ]]}
284
                              ]]}
285
                            ]]}
286
                          ]]}
287
                        ]}
288
                      ]}
289
                    ]]]}
290
                  ]]}
291
                ]]}
292
              ]]}
293
            ]}
294
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
295
            "lhs" : ["SIMPLE_NAME", "old_motor_speed"], "rhs" : ["EXPRESSION", {
296
              "args" : [["EXPRESSION", {
297
                "args" : [["EXPRESSION", {
298
                  "args" : [["EXPRESSION", {
299
                    "args" : [["CONSTANT_VALUE", {
300
                      "value" : ["CST_LITERAL", "1000"]}
301
                    ]]}
302
                  ]]}
303
                ]]}
304
              ]]}
305
            ]}
306
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
307
            "lhs" : ["SIMPLE_NAME", "scale_factor"], "rhs" : ["EXPRESSION", {
308
              "args" : [["EXPRESSION", {
309
                "args" : [["EXPRESSION", {
310
                  "args" : [["EXPRESSION", {
311
                    "args" : [["CONSTANT_VALUE", {
312
                      "value" : ["CST_LITERAL", "5"]}
313
                    ]]}
314
                  ]]}
315
                ]]}
316
              ]]}
317
            ]}
318
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
319
            "lhs" : ["SIMPLE_NAME", "error"], "rhs" : ["EXPRESSION", {
320
              "args" : [["EXPRESSION", {
321
                "args" : [["EXPRESSION", {
322
                  "args" : [["EXPRESSION", {
323
                    "args" : [["CONSTANT_VALUE", {
324
                      "value" : ["CST_LITERAL", "5"]}
325
                    ]]}
326
                  ]]}
327
                ]]}
328
              ]]}
329
            ]}
330
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
331
            "lhs" : ["SIMPLE_NAME", "new_motor_speed"], "rhs" : ["EXPRESSION", {
332
              "args" : [["EXPRESSION", {
333
                "args" : [["EXPRESSION", {
334
                  "args" : [["EXPRESSION", {
335
                    "id" : "+", "args" : [["EXPRESSION", {
336
                      "args" : [["CALL", ["SIMPLE_NAME", "old_motor_speed"]]]}
337
                    ], ["EXPRESSION", {
338
                      "id" : "*", "args" : [["EXPRESSION", {
339
                        "args" : [["CALL", ["SIMPLE_NAME", "scale_factor"]]]}
340
                      ], ["EXPRESSION", {
341
                        "args" : [["CALL", ["FUNCTION_CALL", {
342
                          "id" : ["SIMPLE_NAME", "limit"], "assoc_list" : [{
343
                            "actual_designator" : ["SIMPLE_NAME", "error"]}
344
                          , {
345
                            "actual_expr" : ["EXPRESSION", {
346
                              "args" : [["EXPRESSION", {
347
                                "args" : [["EXPRESSION", {
348
                                  "id" : "-", "args" : [["EXPRESSION", {
349
                                    "args" : [["CONSTANT_VALUE", {
350
                                      "value" : ["CST_LITERAL", "10"]}
351
                                    ]]}
352
                                  ]]}
353
                                ]]}
354
                              ]]}
355
                            ]}
356
                          , {
357
                            "actual_expr" : ["EXPRESSION", {
358
                              "args" : [["EXPRESSION", {
359
                                "args" : [["EXPRESSION", {
360
                                  "id" : "+", "args" : [["EXPRESSION", {
361
                                    "args" : [["CONSTANT_VALUE", {
362
                                      "value" : ["CST_LITERAL", "10"]}
363
                                    ]]}
364
                                  ]]}
365
                                ]]}
366
                              ]]}
367
                            ]}
368
                          ]}
369
                        ]]]}
370
                      ]]}
371
                    ]]}
372
                  ]]}
373
                ]]}
374
              ]]}
375
            ]}
376
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
377
            "lhs" : ["SIMPLE_NAME", "error"], "rhs" : ["EXPRESSION", {
378
              "args" : [["EXPRESSION", {
379
                "args" : [["EXPRESSION", {
380
                  "args" : [["EXPRESSION", {
381
                    "args" : [["CONSTANT_VALUE", {
382
                      "value" : ["CST_LITERAL", "15"]}
383
                    ]]}
384
                  ]]}
385
                ]]}
386
              ]]}
387
            ]}
388
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
389
            "lhs" : ["SIMPLE_NAME", "new_motor_speed"], "rhs" : ["EXPRESSION", {
390
              "args" : [["EXPRESSION", {
391
                "args" : [["EXPRESSION", {
392
                  "args" : [["EXPRESSION", {
393
                    "id" : "+", "args" : [["EXPRESSION", {
394
                      "args" : [["CALL", ["SIMPLE_NAME", "old_motor_speed"]]]}
395
                    ], ["EXPRESSION", {
396
                      "id" : "*", "args" : [["EXPRESSION", {
397
                        "args" : [["CALL", ["SIMPLE_NAME", "scale_factor"]]]}
398
                      ], ["EXPRESSION", {
399
                        "args" : [["CALL", ["FUNCTION_CALL", {
400
                          "id" : ["SIMPLE_NAME", "limit"], "assoc_list" : [{
401
                            "actual_designator" : ["SIMPLE_NAME", "error"]}
402
                          , {
403
                            "actual_expr" : ["EXPRESSION", {
404
                              "args" : [["EXPRESSION", {
405
                                "args" : [["EXPRESSION", {
406
                                  "id" : "-", "args" : [["EXPRESSION", {
407
                                    "args" : [["CONSTANT_VALUE", {
408
                                      "value" : ["CST_LITERAL", "10"]}
409
                                    ]]}
410
                                  ]]}
411
                                ]]}
412
                              ]]}
413
                            ]}
414
                          , {
415
                            "actual_expr" : ["EXPRESSION", {
416
                              "args" : [["EXPRESSION", {
417
                                "args" : [["EXPRESSION", {
418
                                  "id" : "+", "args" : [["EXPRESSION", {
419
                                    "args" : [["CONSTANT_VALUE", {
420
                                      "value" : ["CST_LITERAL", "10"]}
421
                                    ]]}
422
                                  ]]}
423
                                ]]}
424
                              ]]}
425
                            ]}
426
                          ]}
427
                        ]]]}
428
                      ]]}
429
                    ]]}
430
                  ]]}
431
                ]]}
432
              ]]}
433
            ]}
434
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
435
            "lhs" : ["SIMPLE_NAME", "error"], "rhs" : ["EXPRESSION", {
436
              "args" : [["EXPRESSION", {
437
                "args" : [["EXPRESSION", {
438
                  "id" : "-", "args" : [["EXPRESSION", {
439
                    "args" : [["CONSTANT_VALUE", {
440
                      "value" : ["CST_LITERAL", "20"]}
441
                    ]]}
442
                  ]]}
443
                ]]}
444
              ]]}
445
            ]}
446
          ], ["VARIABLE_ASSIGNMENT_STATEMENT", {
447
            "lhs" : ["SIMPLE_NAME", "new_motor_speed"], "rhs" : ["EXPRESSION", {
448
              "args" : [["EXPRESSION", {
449
                "args" : [["EXPRESSION", {
450
                  "args" : [["EXPRESSION", {
451
                    "id" : "+", "args" : [["EXPRESSION", {
452
                      "args" : [["CALL", ["SIMPLE_NAME", "old_motor_speed"]]]}
453
                    ], ["EXPRESSION", {
454
                      "id" : "*", "args" : [["EXPRESSION", {
455
                        "args" : [["CALL", ["SIMPLE_NAME", "scale_factor"]]]}
456
                      ], ["EXPRESSION", {
457
                        "args" : [["CALL", ["FUNCTION_CALL", {
458
                          "id" : ["SIMPLE_NAME", "limit"], "assoc_list" : [{
459
                            "actual_designator" : ["SIMPLE_NAME", "error"]}
460
                          , {
461
                            "actual_expr" : ["EXPRESSION", {
462
                              "args" : [["EXPRESSION", {
463
                                "args" : [["EXPRESSION", {
464
                                  "id" : "-", "args" : [["EXPRESSION", {
465
                                    "args" : [["CONSTANT_VALUE", {
466
                                      "value" : ["CST_LITERAL", "10"]}
467
                                    ]]}
468
                                  ]]}
469
                                ]]}
470
                              ]]}
471
                            ]}
472
                          , {
473
                            "actual_expr" : ["EXPRESSION", {
474
                              "args" : [["EXPRESSION", {
475
                                "args" : [["EXPRESSION", {
476
                                  "id" : "+", "args" : [["EXPRESSION", {
477
                                    "args" : [["CONSTANT_VALUE", {
478
                                      "value" : ["CST_LITERAL", "10"]}
479
                                    ]]}
480
                                  ]]}
481
                                ]]}
482
                              ]]}
483
                            ]}
484
                          ]}
485
                        ]]]}
486
                      ]]}
487
                    ]]}
488
                  ]]}
489
                ]]}
490
              ]]}
491
            ]}
492
          ], ["WAIT_STATEMENT"]]}
493
        ]]}
494
      ]}
495
    ]}
496
  }
(161-161/276)